/* 通信の事業と制度。style.css・flow.css・fm.css の上に重ねる（接頭辞 tl-） */
.tl-lead { margin: 0 0 10px; font-size: 13px; color: var(--ink2); max-width: 56em; }
.tl-lab { margin: 10px 0 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.tl-lab:first-child { margin-top: 0; }
.tl-small { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.tl-k { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; font-weight: 700; color: var(--muted); }
.tl-panel { padding: 14px 16px; min-width: 0; position: sticky; top: 12px; }
.tl-panel h3 { margin: 6px 0 6px; font-size: 17px; }
.tl-panel > p { margin: 0 0 6px; font-size: 13.5px; color: var(--ink2); }
.tl-dl { margin: 6px 0 0; display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 6px 12px; font-size: 13.5px; }
.tl-dl dt { font-size: 12px; font-weight: 700; color: var(--muted); padding-top: 2px; }
.tl-dl dd { margin: 0; color: var(--ink2); }
.tl-judge { margin: 8px 0 0; font-size: 13px; font-weight: 700; border-radius: 8px; padding: 7px 10px; }
.tl-judge.ok { background: #f0fdf4; color: #14532d; }
.tl-judge.ng { background: #fef2f2; color: #7f1d1d; }
.tl-judge.mid { background: #fffbeb; color: #78350f; }
.tl-judge.info { background: #eff6ff; color: #1e3a8a; }
.tl-why { margin: 6px 0 0; padding-left: 1.2em; font-size: 12.5px; color: var(--ink2); display: grid; gap: 3px; }
.tl-big { margin: 2px 0 4px; font-size: 21px; font-weight: 700; line-height: 1.4; font-variant-numeric: tabular-nums; color: #1d4ed8; }

/* 登場人物 */
.tl-pmap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 14px; align-items: start; margin-bottom: 12px; }
.tl-lanes { display: grid; gap: 14px; }
.tl-lane { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 10px; align-items: center; position: relative; }
.tl-lane + .tl-lane::before { content: "↓"; position: absolute; left: calc(7.5em + 10px + 18px); top: -15px; color: #94a3b8; font-weight: 700; font-size: 13px; }
.tl-lanename { font-size: 12px; font-weight: 700; color: var(--muted); }
.tl-lanebody { display: flex; flex-wrap: wrap; gap: 6px; background: #f8fafc; border: 1px solid var(--line2); border-radius: 12px; padding: 7px; }
.tl-node { appearance: none; font: inherit; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 1px; border: 1px solid var(--line); background: var(--paper); border-radius: 10px; padding: 7px 10px; color: var(--ink); flex: 1 1 9em; min-width: 0; }
.tl-node b { font-size: 13.5px; }
.tl-node small { font-size: 11.5px; color: var(--muted); }
.tl-node:hover { border-color: #94a3b8; }
.tl-node[aria-pressed="true"] { background: #0f172a; border-color: #0f172a; color: #fff; }
.tl-node[aria-pressed="true"] small { color: #cbd5e1; }
.tl-share { padding: 12px 14px; margin: 10px 0; }
.tl-bar { display: flex; height: 30px; border-radius: 8px; overflow: hidden; background: #e2e8f0; }
.tl-bar span { display: flex; align-items: center; justify-content: center; font: 600 11.5px var(--latin); color: #fff; white-space: nowrap; overflow: hidden; min-width: 0; }
.tl-legend { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink2); }
.tl-legend li { display: flex; align-items: center; gap: 6px; }
.tl-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.tl-legend b { font-family: var(--latin); }
.tl-stat td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
#tlPlayerNotes { margin-top: 10px; }

/* 練習（選んで答える） */
.tl-quiz { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tl-q { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.tl-q > p:first-child { margin: 0; font-size: 13.5px; color: var(--ink); }
.tl-q.ok { border-color: #86efac; }
.tl-q.ng { border-color: #fca5a5; }
.tl-ans { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 6px; }
.tl-ans button { appearance: none; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; border: 1px solid var(--line); background: var(--paper); border-radius: 10px; padding: 7px 6px; color: var(--ink2); }
.tl-ans button:hover { border-color: #94a3b8; }
.tl-ans button[aria-pressed="true"] { background: #0f172a; border-color: #0f172a; color: #fff; }
.tl-fb { margin: 0; font-size: 12.5px; border-radius: 8px; padding: 6px 10px; background: var(--line2); color: var(--ink2); }
.tl-q.ok .tl-fb { background: #f0fdf4; color: #14532d; }
.tl-q.ng .tl-fb { background: #fef2f2; color: #7f1d1d; }
.tl-fb .srcl { margin-top: 4px; }
.tl-score { margin: 8px 0 0; font-size: 13px; font-weight: 700; color: var(--ink2); }

/* 入れて計算する */
.tl-two { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 12px; align-items: start; margin: 10px 0 14px; }
.tl-form, .tl-out { padding: 12px 14px; min-width: 0; margin: 0; }
.tl-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px 12px; align-items: end; margin-top: 10px; }
.tl-inputs label, .tl-wide { display: grid; gap: 3px; font-size: 12px; font-weight: 700; color: var(--muted); min-width: 0; }
.tl-inputs input, .tl-inputs select, .tl-wide input { font: inherit; font-size: 15px; font-weight: 500; color: var(--ink); background: #f8fafc; border: 1px solid #cbd5e1; border-radius: 9px; padding: 6px 9px; min-width: 0; width: 100%; }
.tl-wide input { font-family: var(--latin); }
.tl-opts { display: grid; gap: 6px; }
.tl-opt { appearance: none; font: inherit; text-align: left; cursor: pointer; border: 1px solid var(--line); background: var(--paper); border-radius: 10px; padding: 7px 10px; color: var(--ink); font-size: 13px; font-weight: 700; }
.tl-opt:hover { border-color: #94a3b8; }
.tl-opt[aria-pressed="true"] { background: #0f172a; border-color: #0f172a; color: #fff; }
.tl-mm { margin-top: 10px; }
.tl-days { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; margin: 8px 0 4px; }
.tl-day { border: 1px solid var(--line); border-radius: 8px; padding: 4px 3px; text-align: center; background: var(--paper); min-width: 0; }
.tl-day small { display: block; font-size: 10.5px; font-weight: 700; color: var(--muted); }
.tl-day b { display: block; font: 600 13px var(--latin); }
.tl-day i { display: block; font-style: normal; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-day.off { background: #fef2f2; border-color: #fecaca; }
.tl-day.last { background: #0f172a; border-color: #0f172a; }
.tl-day.last b, .tl-day.last small, .tl-day.last i { color: #fff; }
.tl-res { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
.tl-res th, .tl-res td { text-align: left; vertical-align: top; padding: 6px 8px; border-bottom: 1px solid var(--line2); }
.tl-res th { font-size: 12px; color: var(--muted); white-space: nowrap; width: 9em; }
.tl-res td b { font-family: var(--latin); }
.tl-res tr.sum th, .tl-res tr.sum td { border-top: 2px solid var(--line); font-size: 14px; }
.tl-res tr.sum b { color: #1d4ed8; font-size: 16px; }

/* 外部送信 */
.tl-checks { display: grid; gap: 4px; }
.tl-checks label { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; cursor: pointer; padding: 3px 0; }
.tl-checks input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; accent-color: #0d9488; cursor: pointer; }
.tl-ntable { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 6px; }
.tl-ntable th, .tl-ntable td { text-align: left; vertical-align: top; padding: 6px 8px; border: 1px solid var(--line); }
.tl-ntable thead th { background: #f8fafc; font-size: 12px; color: var(--muted); }

/* 番号 */
.tl-numt td, .tl-numt th { font-size: 12.5px; }
.tl-numt tbody th { white-space: nowrap; }

/* MNP */
.tl-mnpnav { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; }
.tl-mnpnav button { appearance: none; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; cursor: pointer; }
.tl-mnpnav button[disabled] { color: #94a3b8; cursor: default; }
.tl-mnpnav span { font: 600 13px var(--latin); color: var(--ink2); }
.tl-mnpcols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.tl-mnpcol { padding: 12px 14px; min-width: 0; }
.tl-mnpcol h3 { margin: 0 0 8px; font-size: 14px; }
.tl-mnpsteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tl-mnpsteps li { border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; background: var(--paper); }
.tl-mnpsteps li b { font-size: 13px; }
.tl-mnpsteps li small { display: block; font-size: 11.5px; color: var(--muted); }
.tl-mnpsteps li p { margin: 4px 0 0; font-size: 12.5px; color: var(--ink2); }
.tl-mnpsteps li.past { opacity: .55; }
.tl-mnpsteps li.next { opacity: .45; }
.tl-mnpsteps li.next p { display: none; }
.tl-mnpsteps li.now { border-color: #0d9488; background: #f0fdfa; }
.tl-sys { margin-top: 6px !important; font-size: 12px !important; color: #134e4a !important; background: #ecfdf5; border-radius: 6px; padding: 4px 8px; }
#tlKotei { margin-top: 10px; }

/* 重大な事故 */
.tl-jikot td, .tl-jikot th { font-size: 12.5px; }
.tl-jikot tbody th { min-width: 9em; }
.tl-jikot td:nth-child(2) { font-variant-numeric: tabular-nums; }
.tl-cases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.tl-case { appearance: none; font: inherit; font-size: 12.5px; font-weight: 700; text-align: left; cursor: pointer; border: 1px solid var(--line); background: var(--paper); border-radius: 10px; padding: 7px 10px; color: var(--ink); }
.tl-case:hover { border-color: #94a3b8; }
.tl-case[aria-pressed="true"] { background: #0f172a; border-color: #0f172a; color: #fff; }

/* 料金 */
.tl-feeyear th, .tl-feeyear td { font-size: 12px; text-align: center; white-space: nowrap; }
.tl-feeyear thead th:first-child, .tl-feeyear tbody th { text-align: left; }
.tl-feeyear td.chg { background: #fef3c7; font-weight: 700; }
.tl-feeyear td.on, .tl-feeyear th.on { outline: 2px solid #0d9488; outline-offset: -2px; }

/* データの形 */
.tl-tbl dl { margin: 6px 0 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 10px; font-size: 12.5px; }
.tl-tbl dt { font: 600 12px var(--latin); color: var(--ink); overflow-wrap: anywhere; }
.tl-tbl dd { margin: 0; color: var(--ink2); }

.tl-node:focus-visible, .tl-ans button:focus-visible, .tl-opt:focus-visible, .tl-case:focus-visible, .tl-mnpnav button:focus-visible, .tl-inputs input:focus-visible, .tl-inputs select:focus-visible, .tl-wide input:focus-visible, .tl-checks input:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }

@media (max-width: 1100px) {
  .tl-pmap, .tl-two { grid-template-columns: minmax(0, 1fr); }
  .tl-panel { position: static; }
}
@media (max-width: 760px) {
  .tl-quiz, .tl-mnpcols, .tl-cases { grid-template-columns: minmax(0, 1fr); }
  .tl-lane { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .tl-lane + .tl-lane::before { left: 50%; }
  .tl-dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .tl-dl dd { margin-bottom: 6px; }
  .tl-days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tl-res th { width: auto; white-space: normal; }
  .tl-ans { grid-template-columns: minmax(0, 1fr); }
  .tl-stat td:last-child { white-space: normal; }
  .tl-numt tbody th { white-space: normal; min-width: 6.5em; }
  .tl-jikot tbody th { min-width: 7em; }
}
