:root {
 color-scheme: dark;
 font: 17px/1.5 system-ui, "Microsoft YaHei", sans-serif;
 color: #e0e5e9;
 background: #212529;
}
* { box-sizing: border-box; }
body { margin: 0; }
main { width: 90%; max-width: 1700px; margin: 20px auto; }
nav { display: flex; gap: 18px; padding-bottom: 13px; margin-bottom: 17px; border-bottom: 1px solid #444b51; }
a { color: #6eacff; text-decoration: none; }
a:hover { text-decoration: underline; }
input, button {
 font: inherit;
 color: inherit;
 background: transparent;
 border: 1px solid #495057;
 padding: .48em .75em;
}
input { width: 100%; min-width: 0; border-radius: 6px; }
button { cursor: pointer; }
button:hover { background: #343a40; }
:focus-visible { outline: 2px solid #75adfa; outline-offset: 2px; }
#route-list { border-top: 1px solid #444b51; margin-top: 16px; padding-top: 14px; }
#route-list a { display: block; width: fit-content; }
.vehicle-form { display: flex; }
.vehicle-form input { flex: 1; border-radius: 6px 0 0 6px; }
.vehicle-form button { white-space: nowrap; border-left: 0; }
.vehicle-form button:last-child { border-radius: 0 6px 6px 0; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 8px 0 16px; font-size: .85rem; }
.legend i { display: inline-block; width: 15px; height: 9px; margin-right: 4px; }
.up { background: #71a8f5; }
.down { background: #e3e8ec; }
.other { background: #858c95; }
.muted { color: #aeb8c0; font-size: .88rem; }
.scroll { overflow-x: auto; }
.timeline { width: 100%; min-width: 0; font-size: .9rem; }
.timeline-row { display: grid; grid-template-columns: minmax(72px, 9vw) minmax(0, 1fr); min-height: 25px; align-items: center; }
.track { position: relative; height: 19px; }
.segment { position: absolute; top: 4px; min-width: 1px; height: 10px; }
.axis { height: 33px; border-bottom: 1px solid #444b51; }
.tick { position: absolute; max-width: 12%; overflow: hidden; font-size: .72rem; color: #b9c3cc; white-space: nowrap; }
.records, .matrix { border-collapse: collapse; margin: 14px 0; }
.records { width: 100%; min-width: 760px; }
th, td { text-align: left; padding: 2px 10px 2px 0; white-space: nowrap; font-weight: normal; }
th { border-bottom: 1px solid #444b51; padding-bottom: 7px; }
.matrix th, .matrix td { min-width: 72px; text-align: center; padding: 0 6px; }
.matrix th { padding-bottom: 10px; }
.matrix tbody tr:nth-child(odd) td:first-child { background: #303438; }
.matrix td.active { background: #236e35; padding: 0; }
.matrix td.active a { display: block; min-height: 26px; }
.pagination { display: flex; gap: 8px; align-items: center; margin: 18px 0 4px; }
.pagination a, .pagination .current { min-width: 1.9rem; padding: .18rem .55rem; border-radius: 6px; text-align: center; font-size: .9rem; line-height: 1.6; }
.pagination a { color: #98a2ab; border: 1px solid #3a4249; text-decoration: none; }
.pagination a:hover { color: #e0e5e9; border-color: #5b666f; background: #2a2f34; }
.pagination .current { color: #cdd4da; background: #31373d; border: 1px solid #454e56; }
.error { color: #ffb4a9; }
