* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Tahoma, sans-serif;
    background: #f5f5f5;
    color: #222;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

.site-header {
    background: #ffffff;
    border-bottom: 1px solid #cccccc;
}

.nav-wrap {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    font-size: 20px;
    font-weight: bold;
}

nav {
    display: flex;
    gap: 10px;
}

nav a {
    padding: 8px 12px;
}

nav a:hover,
nav a.active {
    background: #eeeeee;
}

.hero,
.search-hero {
    padding: 40px 0 25px;
}

.hero h1,
.search-hero h1,
.detail-hero h1 {
    margin: 5px 0 10px;
}

.hero p,
.search-hero p,
.detail-hero p {
    color: #666666;
}

.eyebrow {
    margin: 0;
    color: #1677c8;
    font-size: 13px;
    font-weight: bold;
}

.summary-grid {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.summary-card {
    min-width: 180px;
    padding: 15px;
    background: #ffffff;
    border: 1px solid #dddddd;
}

.summary-number {
    display: block;
    margin-bottom: 5px;
    font-size: 28px;
    font-weight: bold;
}

.section-heading {
    margin: 25px 0 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.section-heading h2,
.section-heading p {
    margin: 0;
}

.section-heading p {
    margin-top: 5px;
    color: #666666;
}

.route-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding-bottom: 40px;
}

.route-card {
    padding: 18px;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-left: 6px solid var(--route-color);
}

.route-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.route-top h3,
.route-top p {
    margin: 0;
}

.route-top p {
    margin-top: 4px;
    color: #666666;
}

.route-badge {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--route-color);
    color: white;
    font-weight: bold;
}

.route-badge.large {
    width: 60px;
    height: 60px;
    font-size: 24px;
}

.route-stat {
    margin: 20px 0;
}

.route-stat strong {
    font-size: 28px;
}

.route-stat span {
    color: #666666;
}

.button {
    display: inline-block;
    padding: 9px 14px;
    border: 1px solid #999999;
    background: #ffffff;
    color: #222222;
    font: inherit;
    cursor: pointer;
}

.button:hover {
    background: #eeeeee;
}

.button.primary {
    background: #1677c8;
    border-color: #1677c8;
    color: white;
}

.button.secondary {
    background: #ffffff;
    color: #333333;
}

.route-button {
    border-color: var(--route-color);
    color: var(--route-color);
}

.page-actions {
    margin-top: 25px;
}

.detail-hero {
    margin: 20px 0;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-left: 6px solid var(--route-color);
}

.panel {
    margin-bottom: 40px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #dddddd;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 10px;
    border: 1px solid #dddddd;
    text-align: left;
}

th {
    background: #eeeeee;
}

.number-cell {
    text-align: center;
}

.muted {
    color: #666666;
}

.stop-code {
    font-family: Consolas, monospace;
    font-weight: bold;
}

.score {
    font-weight: bold;
}

.search-form,
.destination-form {
    display: flex;
    align-items: end;
    gap: 12px;
}

.destination-form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #dddddd;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field.grow {
    flex: 1;
}

.field label {
    font-weight: bold;
}

.field small {
    color: #666666;
}

input,
select {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #aaaaaa;
    background: white;
    font: inherit;
}

.notice {
    margin-top: 15px;
    padding: 12px;
    border: 1px solid #dddddd;
    background: #f7f7f7;
}

.notice.error {
    color: #b00020;
}

.notice.warning {
    color: #8a6100;
}

.origin-result {
    margin-top: 20px;
}

.chip-row {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    padding: 5px 8px;
    background: #eeeeee;
    border: 1px solid #dddddd;
}

.results-section {
    padding-bottom: 40px;
}

.result-count {
    font-weight: bold;
}

.journey-card {
    margin-bottom: 20px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #dddddd;
}

.journey-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.route-ident {
    display: flex;
    align-items: center;
    gap: 12px;
}

.route-ident h3,
.route-ident p {
    margin: 0;
}

.route-ident p {
    margin-top: 4px;
    color: #666666;
}

.journey-summary {
    display: flex;
    gap: 20px;
}

.journey-summary strong,
.journey-summary span {
    display: block;
    text-align: center;
}

.journey-summary span {
    color: #666666;
    font-size: 13px;
}

.trip-points {
    margin: 20px 0;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: #f3f3f3;
}

.trip-points > div {
    flex: 1;
}

.trip-points .label {
    display: block;
    margin-bottom: 5px;
    color: #666666;
    font-size: 13px;
}

.arrow {
    font-size: 22px;
}

.map-legend {
    margin: 15px 0 8px;
    font-size: 13px;
    color: #666666;
}

.map-legend span {
    margin-right: 15px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    display: inline-block;
    margin-right: 4px;
    border-radius: 50%;
}

.active-dot {
    background: #1677c8;
}

.inactive-dot {
    background: #bbbbbb;
}

.route-map {
    overflow-x: auto;
    padding: 20px 10px;
    border: 1px solid #dddddd;
    background: #fafafa;
}

.route-track {
    min-width: max-content;
    display: flex;
    align-items: flex-start;
}

.map-stop {
    position: relative;
    width: 110px;
    flex: 0 0 110px;
    text-align: center;
}

.map-stop .segment {
    position: absolute;
    top: 8px;
    left: 50%;
    width: 110px;
    height: 3px;
    background: #bbbbbb;
}

.map-stop .segment.active {
    background: #1677c8;
}

.map-stop .dot {
    position: relative;
    z-index: 2;
    width: 16px;
    height: 16px;
    display: inline-block;
    border: 3px solid #bbbbbb;
    border-radius: 50%;
    background: white;
}

.map-stop.active .dot {
    border-color: #1677c8;
}

.map-stop .dot.origin,
.map-stop .dot.destination {
    background: #1677c8;
}

.map-label {
    margin-top: 7px;
}

.map-label strong,
.map-label span {
    display: block;
}

.map-label strong {
    font-family: Consolas, monospace;
    font-size: 13px;
}

.map-label span {
    margin-top: 3px;
    color: #666666;
    font-size: 11px;
    line-height: 1.3;
}

.path-list {
    margin-top: 20px;
}

.path-list ol {
    margin-bottom: 0;
}

.path-list li {
    margin-bottom: 6px;
}

.empty-state {
    margin: 30px 0;
    padding: 25px;
    text-align: center;
    background: #ffffff;
    border: 1px solid #dddddd;
}

@media (max-width: 700px) {
    .nav-wrap,
    .section-heading,
    .journey-header,
    .search-form,
    .destination-form,
    .trip-points {
        align-items: stretch;
        flex-direction: column;
    }

    .route-grid {
        grid-template-columns: 1fr;
    }

    .summary-grid {
        flex-direction: column;
    }

    .summary-card {
        min-width: 0;
    }

    nav {
        margin-bottom: 10px;
    }

    .detail-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .button {
        text-align: center;
    }
}

.banner {
    position: relative;
    margin-top: 25px;
    height: 400px;
    overflow: hidden;
    background: #dddddd;
}

.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-text {
    position: absolute;
    left: 30px;
    bottom: 30px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.9);
}

.banner-text h1 {
    margin: 0 0 5px;
}

.banner-text p {
    margin: 0;
}

.summary {
    margin-top: 30px;
}

.summary-grid {
    display: flex;
    gap: 15px;
}

.summary-card {
    width: 200px;
    padding: 20px;
    background: white;
    border: 1px solid #dddddd;
}

.summary-card strong {
    display: block;
    font-size: 30px;
}

.summary-card span {
    color: #666666;
}

.routes {
    margin-top: 35px;
    margin-bottom: 50px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.route-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.route-card {
    background: white;
    border: 1px solid #cccccc;
}

.route-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.route-content {
    padding: 15px;
}

.route-content h3 {
    margin-top: 0;
    margin-bottom: 5px;
}

.route-name-en {
    margin-top: 0;
    color: #666666;
}

.button {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #1677c8;
    color: #1677c8;
    text-decoration: none;
}

.button:hover {
    background: #eeeeee;
}

.button.primary {
    background: #1677c8;
    color: white;
}

@media (max-width: 700px) {

    .route-grid {
        grid-template-columns: 1fr;
    }

    .summary-grid {
        flex-direction: column;
    }

    .summary-card {
        width: 100%;
    }

    .banner {
        height: 220px;
    }

    .banner-text {
        left: 15px;
        right: 15px;
        bottom: 15px;
    }

}