/* 捷運時刻表（機場捷運頁、捷運首末班車頁共用） */
#mt-tool [hidden], .mt-stale[hidden] { display: none !important; }
.mt-notice { background: #fff7e6; border-left: 4px solid var(--warn); padding: 10px 14px; border-radius: 6px; font-size: 1rem; margin: .75rem 0; }
#mt-tool select { display: block; width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 1rem; background: #fff; color: var(--fg); margin-top: 4px; }
#mt-tool fieldset { border: 0; padding: 0; margin: 10px 0; min-width: 0; }
#mt-tool legend { font-weight: 600; font-size: 1rem; padding: 0; margin-bottom: 4px; }
.mt-dirs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.mt-dirs legend { grid-column: 1 / -1; }
.mt-dirs label, .mt-day-box label { display: flex; align-items: center; gap: 8px; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; background: #fff; font-size: 1rem; line-height: 1.35; cursor: pointer; }
.mt-day-box #mt-days, .mt-day-box #mt-fl-days, .mt-day-box #mt-d-days { display: grid; gap: 6px; }
.mt-opt { display: block; font-weight: 600; font-size: 1rem; margin: 10px 0; }
.mt-today { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 6px; background: var(--brand); color: #fff; font-style: normal; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.mt-summary { margin: .5rem 0; font-weight: 600; font-size: 1.05rem; }
.mt-stale { background: #fef2f2; border-left: 4px solid var(--bad); padding: 8px 12px; border-radius: 6px; font-size: .95rem; margin: .5rem 0; }
.mt-empty { background: var(--soft); border-radius: 10px; padding: 12px 14px; font-size: 1rem; margin: .5rem 0; }
.mt-fine { color: var(--muted); font-size: .9rem; margin: .5rem 0; }
.mt-dash { color: var(--muted); }
.mt-nd { margin-left: 3px; color: var(--warn); font-size: .72em; font-weight: 600; white-space: nowrap; }

/* 首末班摘要 */
.mt-fl-line { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: .25rem 0 .75rem; font-size: 1rem; }
.mt-fl-line b { font-size: 1.2rem; font-variant-numeric: tabular-nums; }

/* 逐班時刻：依小時分組，時間大字 */
.mt-hours { margin: .5rem 0; }
.mt-hour { display: grid; grid-template-columns: 4.2em 1fr; gap: 4px 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.mt-hour h4 { margin: 0; font-size: 1.05rem; line-height: 1.8; }
.mt-hour h4 small { display: block; color: var(--warn); font-size: .75rem; line-height: 1.2; font-weight: 600; }
.mt-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.mt-chip { display: block; position: relative; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; background: #fff; min-width: 0; }
.mt-chip b { display: block; font-size: 1.35rem; line-height: 1.25; font-variant-numeric: tabular-nums; }
.mt-chip small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.35; overflow-wrap: anywhere; }
.mt-chip .mt-nd { font-size: .7rem; }
.mt-chip.mt-direct { background: #fef2f2; border-color: #fca5a5; }
.mt-chip.mt-direct small { color: #991b1b; font-weight: 600; }
.mt-chip.mt-next { background: #fff7e6; border: 2px solid var(--warn); }
.mt-flag { display: inline-block; margin-top: 2px; padding: 0 6px; border-radius: 6px; background: var(--warn); color: #fff; font-style: normal; font-size: .75rem; font-weight: 600; }
.mt-dir h5 { margin: 1rem 0 .25rem; font-size: 1.05rem; line-height: 1.5; }
.mt-detail-days { margin-top: 6px; }

/* 全線首末班車表（機捷） */
.mt-fl-wrap { overflow: hidden; }
.mt-fl-table, .mt-tbl { border-collapse: collapse; width: 100%; font-size: 1rem; }
.mt-fl-table th, .mt-fl-table td, .mt-tbl th, .mt-tbl td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; vertical-align: top; }
.mt-fl-table thead th, .mt-tbl thead th { background: var(--soft); font-size: .92rem; }
.mt-fl-table th[scope=row] { font-weight: 600; }
.mt-fl-table th i { font-style: normal; color: var(--muted); font-size: .85rem; font-weight: 400; margin-right: 2px; }
.mt-fl-table td span { display: block; white-space: nowrap; }
.mt-fl-table td span i { font-style: normal; color: var(--muted); font-size: .8rem; margin-right: 4px; }
.mt-fl-table td b, .mt-tbl td b { font-variant-numeric: tabular-nums; font-size: 1.1rem; }

/* 捷運頁：卡片 */
.mt-st-title { margin: .5rem 0; font-size: 1.15rem; line-height: 1.5; }
.mt-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; }
.mt-sec { margin: 1.25rem 0 .4rem; font-size: 1.05rem; }
.mt-card { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 8px 0; background: #fff; }
.mt-card-today { border-color: var(--warn); background: #fffaf0; }
.mt-card-h { margin: 0 0 4px; font-weight: 600; }
.mt-peak { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; font-size: .88rem; font-weight: 600; }

@media (max-width: 640px) {
  .mt-hour { grid-template-columns: 1fr; }
  .mt-hour h4 { line-height: 1.4; }
  .mt-hour h4 small { display: inline; margin-left: 4px; }
  .mt-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .mt-chip { padding: 6px 6px; }
  .mt-chip b { font-size: 1.3rem; }
  .mt-fl-table th, .mt-fl-table td { padding: 8px 4px; font-size: .95rem; }
  .mt-fl-table thead th { font-size: .82rem; }
  .mt-fl-table thead th, .mt-fl-table td { width: 33%; }
  .mt-tbl th, .mt-tbl td { padding: 8px 4px; font-size: .98rem; }
  .mt-tbl thead th { font-size: .85rem; }
}

.mt-partial { background: #fff7e6; border-left: 4px solid var(--warn); padding: 8px 12px; border-radius: 6px; font-size: .95rem; margin: .5rem 0; }
.mt-note { display: block; color: var(--muted); font-size: .8rem; }
.mt-missing td { color: var(--muted); font-size: .92rem; background: var(--soft); }
.mt-routehead th { background: var(--soft); font-size: .92rem; font-weight: 600; padding: 6px; border-bottom: 1px solid var(--line); }
