/* Passenger website: narrow screens and touch controls. */
.passenger-link > svg { display: none; }

@media (min-width: 721px) and (max-width: 1100px) {
    .header-inner { position: relative; }
    .header-actions { gap: 10px; }
    .header-actions .language-menu { position: static; }
    .language-options { right: 0; top: calc(100% + 4px); width: min(670px, 100%); }
    .header-actions .staff-link:not(.passenger-link) { display: none; }
    .header-actions .passenger-link { min-height: 44px; justify-content: center; }
    .language-menu summary { min-height: 44px; }
}

@media (min-width: 721px) and (max-width: 1000px) {
    .search-fields, .search-fields.has-return-date {
        grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
        grid-template-areas: "origin swap destination" "date date passengers" "submit submit submit";
        gap: 14px 10px;
    }
    .search-fields.has-return-date { grid-template-areas: "origin swap destination" "date date return" "passengers passengers passengers" "submit submit submit"; }
}

@media (max-width: 720px) {
    .site-header { height: auto; }
    .header-inner {
        position: relative;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: 64px auto;
        gap: 0 12px;
        padding-bottom: 12px;
    }
    .header-inner > .site-brand {
        grid-column: 1;
        justify-self: start;
        font-size: 26px;
    }
    .header-inner > .site-brand .brand-symbol { width: 32px; height: 30px; }
    .header-actions { grid-column: 2; gap: 8px; }
    .header-actions .passenger-link {
        display: inline-flex;
        justify-content: center;
        width: 44px;
        min-height: 44px;
        border: 1px solid var(--border);
        border-radius: 11px;
        color: var(--teal-dark);
        background: var(--teal-light);
    }
    .passenger-link > svg { display: block; }
    .header-actions .language-menu { position: static; }
    .header-actions .language-menu summary { min-width: 54px; min-height: 44px; justify-content: center; padding: 8px; font-size: 12px; }
    .header-actions .language-menu summary > span:first-child { display: none; }
    .language-options {
        top: 60px;
        left: 0;
        right: 0;
        width: 100%;
        max-height: min(70dvh, 540px);
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 8px;
        overscroll-behavior: contain;
    }
    .language-options a { min-height: 44px; padding: 8px; white-space: normal; overflow-wrap: anywhere; }
    .transport-nav { gap: 8px; }
    .transport-nav a { max-width: none; min-height: 44px; font-size: 13px; }

    .home-hero { display: block; }
    .hero-copy { padding: 24px 0 20px; }
    .hero-copy .eyebrow { font-size: 10px; letter-spacing: .13em; margin-bottom: 12px; }
    .home-hero h1 { font-size: clamp(32px, 8.4vw, 44px); margin-bottom: 12px; line-height: 1.1; overflow-wrap: anywhere; }
    .hero-description { font-size: 15px; margin: 0; }
    .home-hero .hero-visual { display: none; }
    .home-hero-wrap { padding-bottom: 28px; }
    .mode-home-hero { padding: 24px 0 32px; }
    .mode-home-copy h1 { font-size: clamp(32px, 8.4vw, 44px); overflow-wrap: anywhere; }
    .mode-home-emblem { display: none; }

    .search-panel { padding: 16px; border-radius: 16px; }
    .search-panel .mode-tabs { display: none; }
    .search-fields, .search-fields.has-return-date {
        position: relative;
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "origin" "destination" "date" "passengers" "submit";
        gap: 12px;
    }
    .search-fields.has-return-date { grid-template-areas: "origin" "destination" "date" "return" "passengers" "submit"; }
    .search-field label { font-size: 13px; margin: 0 0 5px 2px; }
    .field-control { height: 54px; gap: 8px; padding-inline: 12px; }
    .field-control input, .field-control select, .calendar-open { font-size: 16px; }
    .calendar-open span { white-space: normal; line-height: 1.25; overflow-wrap: anywhere; }
    .city-field .field-control { padding-right: 8px; }
    .city-field .field-picker { flex: none; min-width: 44px; min-height: 44px; }
    .swap-cities {
        position: absolute;
        z-index: 2;
        top: 65px;
        right: 48px;
        width: 44px;
        height: 44px;
        margin: 0;
        border: 1px solid var(--border);
        border-radius: 50%;
        background: #fff;
        transform: rotate(90deg);
    }
    .swap-cities:hover { transform: rotate(90deg); background: var(--teal-light); }
    .search-submit { min-height: 54px; height: auto; margin-top: 2px; padding: 13px 16px; }
    .search-note { font-size: 12px; line-height: 1.5; margin-bottom: 0; }

    .calendar-dialog { max-height: calc(100dvh - 24px); overscroll-behavior: contain; }
    .calendar-close {
        opacity: 1;
        width: 44px;
        height: 44px;
        top: 8px;
        right: 8px;
        border-radius: 10px;
        background: #fff;
        color: var(--ink);
        z-index: 2;
    }
    .calendar-sidebar h2 { padding-right: 42px; }
    .calendar-main { padding-inline: 12px; }
    .calendar-day { width: min(43px, 100%); }
    .calendar-month-actions button { width: 44px; height: 44px; flex: none; }

    .passenger-card, .account-main, .account-panel, .account-trip-route > div { min-width: 0; }
    .account-panel, .passenger-card { overflow-wrap: anywhere; }
    .account-shell .account-contact-grid .passenger-input,
    .account-contact-grid select, .passenger-input, .journal-search input,
    .booking-panel input, .booking-panel select { font-size: 16px; }
    .booking-journey > div { min-width: 0; }
    .booking-journey strong, .booking-journey small,
    .trip-detail-stop strong, .trip-detail-stop p,
    .result-journey strong, .result-journey small { overflow-wrap: anywhere; }
    .trip-drawer-content { min-height: 0; overscroll-behavior: contain; }
    .trip-drawer-header, .trip-drawer-footer { flex-shrink: 0; }
    .trip-drawer-close { flex: none; width: 44px; height: 44px; }
    .bus-filter-price input, .bus-results-toolbar select { font-size: 16px; }
    .bus-results-toolbar, .bus-results-toolbar form { min-width: 0; max-width: 100%; }
    .bus-results-toolbar select { min-width: 0; }
    .bus-filter-check { min-height: 44px; align-items: center; font-size: 14px; }
    .bus-filter-check input { width: 20px; height: 20px; }
    .footer-links a { display: flex; align-items: center; min-height: 44px; }
}

@media (min-width: 390px) and (max-width: 720px) {
    .search-fields {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
        grid-template-areas: "origin origin" "destination destination" "date passengers" "submit submit";
    }
    .search-fields:not(.has-return-date) .date-field .field-control > svg,
    .search-fields:not(.has-return-date) .passengers-field .field-control > svg { display: none; }
}

@media (max-width: 590px) {
    .calendar-sidebar { padding: 18px; }
    .calendar-sidebar h2 { min-height: 30px; display: flex; align-items: center; }
    .calendar-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .calendar-shortcut strong { font-size: 13px; }
    .calendar-shortcut span { font-size: 12px; }
}

@media (max-width: 600px) {
    .api-result-card .api-card-main { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px; }
    .api-result-card .api-journey { grid-template-columns: minmax(0, 1fr) 50px minmax(0, 1fr); gap: 8px; }
    .api-result-card .api-stop .api-stop-date { font-size: 11px; }
    .api-result-card .api-stop time { font-size: 26px; }
    .api-result-card .api-stop strong { font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
    .api-result-card .api-stop small, .api-result-card .api-duration span { font-size: 11px; line-height: 1.4; }
    .api-result-card .api-stop .api-stop-station {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        font-size: 11px;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .api-result-card .api-price-box {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(100px, .8fr);
        gap: 2px 12px;
        align-items: center;
        text-align: left;
        border-top: 1px solid var(--border);
        padding-top: 12px;
    }
    .api-result-card .api-price-box > small { grid-column: 1; font-size: 12px; }
    .api-result-card .api-price-box > strong { grid-column: 1; font-size: 23px; }
    .api-result-card .api-book-button,
    .api-result-card .api-book-unavailable { grid-column: 2; grid-row: 1 / span 2; }
    .api-result-card .api-book-button { min-height: 46px; font-size: 14px; }
    .api-result-card .api-book-unavailable { font-size: 12px; overflow-wrap: anywhere; }
    .api-result-card .api-carrier strong { font-size: 13px; }
    .api-result-card .api-sticker, .api-result-card .api-card-foot,
    .api-result-card .mobile-payment-badge { font-size: 11px; }
    .api-result-card .mobile-next-day { font-size: 12px; }
    .api-result-card .mobile-card-details { font-size: 12px; gap: 12px; }
    .api-result-card .mobile-card-details .api-details-link { min-height: 44px; font-size: 13px; }
}
