/* 旅行とホテル。style.css・flow.css・fm.css の上に重ねる（接頭辞 tv-） */
.tv-lead { margin: 0 0 8px; font-size: 13px; color: var(--ink2); }
.tv-intro { margin: 10px 0; font-size: 13.5px; color: var(--ink2); background: var(--line2); border-radius: 10px; padding: 8px 12px; }
.tv-note { margin: 8px 0 0; font-size: 12.5px; color: var(--ink2); background: var(--line2); border-radius: 8px; padding: 6px 10px; }
.tv-judge { margin: 8px 0 0; font-size: 13px; font-weight: 700; border-radius: 8px; padding: 7px 10px; }
.tv-judge.ok { background: #f0fdf4; color: #14532d; }
.tv-judge.ng { background: #fef2f2; color: #7f1d1d; }
.tv-judge.mid { background: #fffbeb; color: #78350f; }
.tv-big { margin: 10px 0 0; font: 700 22px var(--sans); color: #1d4ed8; display: flex; flex-direction: column; gap: 2px; }
.tv-big small { font: 500 12px var(--sans); color: var(--muted); overflow-wrap: anywhere; }
.tv-flbl { margin: 10px 0 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.tv-box > .tv-flbl:first-child { margin-top: 0; }
.tv-chk { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--ink); cursor: pointer; margin-top: 8px; }
.tv-chk[hidden] { display: none; }
.tv-chk input { width: 17px; height: 17px; flex: none; margin: 1px 0 0; accent-color: #0d9488; cursor: pointer; }
.tv-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.tv-gap { margin-top: 10px; }
.tv-ph { margin: 0; font-size: 13px; color: var(--muted); }
.tv-bad { color: #b91c1c; font-weight: 700; }
.tv-cast small { display: block; margin-top: 2px; font-size: 12px; font-weight: 700; color: #0f766e; }

/* 業務の流れ */
.tv-flow { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 14px; align-items: start; }
.tv-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tv-step { appearance: none; width: 100%; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: center; text-align: left; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; cursor: pointer; }
.tv-step:hover { border-color: #94a3b8; }
.tv-step.on { border-color: #0d9488; background: #f0fdfa; }
.tv-sn { width: 26px; height: 26px; border-radius: 50%; background: var(--line2); color: var(--ink2); font: 600 12.5px/26px var(--latin); text-align: center; display: inline-block; flex: none; }
.tv-step.on .tv-sn { background: #0d9488; color: #fff; }
.tv-st { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.tv-st b { font-size: 14px; }
.tv-st small { font-size: 12px; color: var(--muted); }
.tv-panel { position: sticky; top: 12px; padding: 14px 16px; min-width: 0; }
.tv-k { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.tv-panel .tv-k .tv-sn { background: #0d9488; color: #fff; }
.tv-panel h3 { margin: 6px 0; font-size: 17px; }
.tv-dl { margin: 0; display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 6px 12px; font-size: 13.5px; }
.tv-dl dt { font-size: 12px; font-weight: 700; color: var(--muted); padding-top: 2px; }
.tv-dl dd { margin: 0; color: var(--ink2); }
.tv-nav { display: flex; gap: 6px; margin-top: 12px; }
.tv-nav 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; }
.tv-nav button[disabled] { color: #94a3b8; cursor: default; }

/* 箱と入力（共通） */
.tv-box { padding: 12px 14px; min-width: 0; }
.tv-box > h3, #tvSyncOut h3, #tvMOut h3 { margin: 0 0 8px; font-size: 15px; }
.tv-box .pills + .pills { margin-top: 6px; }
.tv-fields { display: grid; gap: 8px; margin-top: 10px; }
.tv-fields.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tv-fields label, .tv-night label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 700; color: var(--ink2); min-width: 0; }
.tv-fields input, .tv-night 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%; box-sizing: border-box; }
.tv-run .pill[disabled] { opacity: .45; cursor: default; }

/* 同期の練習 */
.tv-sync { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); gap: 10px; align-items: start; }
.tv-run { margin-bottom: 8px; }
.tv-time th, .tv-time td { font-size: 12.5px; }
.tv-time tbody th { font-family: var(--latin); color: var(--muted); white-space: nowrap; }
.tv-time td { color: var(--ink2); overflow-wrap: anywhere; }
.tv-time td.n, .tv-time th.n { text-align: right; font-family: var(--latin); color: var(--ink); }
.tv-time tr.now th, .tv-time tr.now td { background: #fef9c3; }

/* 名簿の練習 */
.tv-meibo { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 10px; align-items: start; }
.tv-checks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.tv-checks .tv-chk { margin-top: 6px; }
.tv-finds { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tv-finds li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 6px; font-size: 12.5px; padding: 5px 8px; border-radius: 8px; background: #f8fafc; }
.tv-finds li.ok { background: #f0fdf4; }
.tv-finds li.ng { background: #fef2f2; }
.tv-finds small { display: block; font-size: 11.5px; color: var(--muted); }
.tv-mk { font-weight: 700; text-align: center; }
.tv-finds li.ok .tv-mk { color: #15803d; }
.tv-finds li.ng .tv-mk { color: #b91c1c; }
.tv-finds li.na .tv-mk { color: var(--muted); }

/* 宿泊費の計算 */
#tvStayPre, #tvCPre { margin-bottom: 10px; }
.tv-stay { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: 10px; align-items: start; }
.tv-nights { display: grid; gap: 8px; }
.tv-night { display: grid; grid-template-columns: 4.2em minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: end; padding: 6px 8px; background: #f8fafc; border-radius: 10px; }
.tv-nn { font: 600 12px var(--latin); color: var(--muted); padding-bottom: 9px; }
.tv-stayt th, .tv-stayt td { font-size: 12.5px; }
.tv-stayt td.n, .tv-stayt thead th.n { text-align: right; white-space: nowrap; font-family: var(--latin); }
.tv-stayt small { display: block; font: 500 11px var(--sans); color: var(--muted); white-space: normal; }
.tv-stayt td.tv-bad small { color: #b91c1c; }
.tv-stayt tbody th, .tv-stayt small.tv-nw { white-space: nowrap; }
.tv-sumdl { margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; }
.tv-sumdl > div { background: #f8fafc; border-radius: 8px; padding: 6px 8px; min-width: 0; }
.tv-sumdl dt { font-size: 11px; font-weight: 700; color: var(--muted); }
.tv-sumdl dd { margin: 0; font-size: 14px; font-weight: 700; font-family: var(--latin); overflow-wrap: anywhere; }

/* 取消料 */
.tv-cancel { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 10px; align-items: start; }
.tv-ct th { font-size: 12.5px; white-space: nowrap; width: 6.5em; }
.tv-ct td { font-size: 13px; color: var(--ink2); }
.tv-ct b { color: var(--ink); }
.tv-marks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px; }
.tv-marks li { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; font-size: 12.5px; color: var(--ink2); min-width: 0; }
.tv-marks li b { display: block; font-size: 12.5px; color: var(--ink); }
.tv-marks li small { display: block; font-size: 11px; color: var(--muted); }
.tv-marks li.hit { background: #fef9c3; border-color: #ca8a04; }

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

.tv-step:focus-visible, .tv-nav button:focus-visible, .tv-fields input:focus-visible, .tv-night input:focus-visible, .tv-chk input:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
@media (max-width: 1100px) {
  .tv-flow, .tv-sync, .tv-meibo, .tv-stay, .tv-cancel { grid-template-columns: minmax(0, 1fr); }
  .tv-panel { position: static; }
}
@media (max-width: 760px) {
  .tv-dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .tv-dl dd { margin-bottom: 6px; }
  .tv-checks { grid-template-columns: minmax(0, 1fr); }
  .tv-night { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tv-nn { grid-column: 1 / -1; padding-bottom: 0; }
  .tv-ct th { width: auto; white-space: nowrap; }
  /* 表は 1 行ずつのカードに */
  .tv-time thead, .tv-stayt thead { display: none; }
  .tv-time tr, .tv-stayt tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 10px; border-bottom: 1px solid var(--line); padding: 6px 0; }
  .tv-time tbody th, .tv-stayt tbody th { grid-column: 1 / -1; border: 0; padding: 2px 4px; }
  .tv-time td, .tv-stayt td { border: 0; padding: 2px 4px; text-align: left !important; white-space: normal !important; }
  .tv-time td:empty { display: none; }
  .tv-time td[data-l]::before, .tv-stayt td[data-l]::before { content: attr(data-l); display: block; font: 700 11px var(--sans); color: var(--muted); }
  .tv-time td.tv-ph { grid-column: 1 / -1; }
  .tv-time tr { grid-template-columns: minmax(0, 1fr); }
}
