:root {
    --brand: #ff7a00;
    --brand-dark: #f05f00;
    --yellow: #ffd929;
    --ink: #1f2937;
    --muted: #7a8493;
    --line: #e5e7eb;
    --panel: #ffffff;
    --soft: #f5f7fa;
    --blue: #1677ff;
    --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Google Sans", Arial, sans-serif;
    color: var(--ink);
    background: #f4f6f9;
}

.site-head {
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.head-inner,
.page {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.head-inner {
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 950;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: var(--brand);
    color: #fff;
    font-weight: 950;
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav a {
    text-decoration: none;
    color: #475467;
    border-radius: 999px;
    padding: 9px 13px;
    font-weight: 850;
}

.nav a.active,
.nav a:hover {
    color: var(--brand-dark);
    background: #fff4e6;
}

.page {
    padding: 22px 0 48px;
}

.search-panel {
    background: linear-gradient(135deg, #ff8a00 0%, #ffb000 100%);
    border-radius: 10px;
    padding: 18px;
    box-shadow: var(--shadow);
}

.title-block {
    color: #fff;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin: 2px 4px 16px;
}

h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: 0;
}

.title-block p {
    margin: 8px 0 0;
    color: rgba(255,255,255,0.88);
    line-height: 1.6;
    font-weight: 750;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1px;
    background: rgba(255,255,255,0.45);
    border-radius: 8px;
    overflow: hidden;
}

label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-height: 86px;
    background: #fff;
    padding: 12px;
    color: #667085;
    font-size: 13px;
    font-weight: 900;
}

label.wide { grid-column: span 2; }

input,
select {
    width: 100%;
    height: 36px;
    border: 0;
    border-bottom: 2px solid transparent;
    padding: 0;
    font-size: 18px;
    font-weight: 900;
    color: var(--ink);
    background: #fff;
    outline: none;
}

input::placeholder { color: #b1b8c4; }

input:focus,
select:focus {
    border-bottom-color: var(--brand);
}

button {
    min-height: 86px;
    border: 0;
    background: var(--yellow);
    color: #111827;
    font-size: 20px;
    font-weight: 950;
    cursor: pointer;
}

button:hover { background: #ffcf00; }

.tips {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tip {
    color: #8a4b00;
    background: #fff8e6;
    border: 1px solid #ffe0a6;
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 13px;
    font-weight: 850;
}

.loading {
    display: none;
    align-items: center;
    justify-content: center;
    margin: 16px 0;
    min-height: 76px;
    color: var(--brand-dark);
    font-weight: 950;
}

.results {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.result-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    grid-template-columns: 150px 1fr 170px;
    gap: 18px;
    padding: 16px;
    align-items: center;
}

.thumb {
    width: 150px;
    height: 108px;
    border-radius: 7px;
    background: linear-gradient(135deg, #fff2dd, #e9f2ff);
    display: grid;
    place-items: center;
    color: var(--brand);
    font-size: 28px;
    font-weight: 950;
    overflow: hidden;
}

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

.main-info h2 {
    margin: 0 0 8px;
    font-size: 22px;
    line-height: 1.25;
}

.sub {
    color: var(--muted);
    line-height: 1.55;
    font-weight: 750;
    margin-bottom: 10px;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill {
    background: var(--soft);
    border: 1px solid #edf0f5;
    color: #475467;
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 850;
    font-size: 13px;
}

.booking {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.price {
    color: #ff4d3d;
    font-size: 34px;
    font-weight: 950;
    white-space: nowrap;
}

.price small {
    font-size: 14px;
    color: #ff4d3d;
    margin-right: 2px;
}

.live-price {
    color: var(--brand-dark);
    font-size: 16px;
    font-weight: 950;
}

.book-btn {
    min-width: 118px;
    text-align: center;
    color: #111827;
    background: var(--yellow);
    border-radius: 999px;
    padding: 11px 18px;
    text-decoration: none;
    font-weight: 950;
}

.book-btn:hover { background: #ffcf00; }

.book-btn.disabled {
    color: #98a2b3;
    background: #edf0f5;
    pointer-events: none;
}

.route-row {
    display: grid;
    grid-template-columns: 1fr 70px 1fr;
    gap: 14px;
    align-items: center;
    max-width: 520px;
}

.time {
    font-size: 28px;
    font-weight: 950;
}

.station {
    color: var(--muted);
    font-weight: 850;
    margin-top: 4px;
}

.arrow {
    text-align: center;
    color: #b0b7c3;
    font-size: 24px;
    font-weight: 950;
}

.empty,
.error,
.faq {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
}

.empty,
.error {
    color: var(--muted);
    font-weight: 850;
}

.error {
    color: #b42318;
    border-color: #fecaca;
    background: #fff7f7;
}

.faq {
    margin-top: 20px;
}

.faq h2 {
    margin: 0 0 12px;
    font-size: 20px;
}

.faq details {
    border-top: 1px solid var(--line);
    padding: 12px 0;
}

.faq details:first-of-type { border-top: 0; }

.faq summary {
    cursor: pointer;
    font-weight: 950;
}

.faq p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

@media (max-width: 980px) {
    .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .result-card {
        grid-template-columns: 116px 1fr;
    }
    .thumb {
        width: 116px;
        height: 96px;
    }
    .booking {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
    }
}

@media (max-width: 620px) {
    .head-inner,
    .title-block {
        align-items: flex-start;
        flex-direction: column;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    label.wide { grid-column: span 1; }
    .result-card {
        grid-template-columns: 1fr;
    }
    .thumb {
        width: 100%;
        height: 150px;
    }
    .booking {
        justify-content: space-between;
    }
}
