/* Results conversation shell
   Switches the page from search-entry mode into results-conversation mode
   after the first result set is visible.
*/

:root {
    --motion-micro: 90ms;
    --motion-short: 160ms;
    --motion-medium: 240ms;
    --motion-long: 360ms;
    --ease-enter: cubic-bezier(0.22, 0.61, 0.36, 1);
    --ease-exit: cubic-bezier(0.4, 0, 1, 1);
    --ease-move: cubic-bezier(0.4, 0, 0.2, 1);
}

body:not(.results-conversation-mode) #resultContainer,
body:not(.results-conversation-mode) #resultsStatusBanner,
body:not(.results-conversation-mode) #resultsQuickFilters,
body:not(.results-conversation-mode) #resultsConversationSummary,
body:not(.results-conversation-mode) #resultsConversationComposer,
body:not(.results-conversation-mode) #resultsConversationAnswers,
body:not(.results-conversation-mode) #resultsConversationChatShell {
    display: none !important;
}

/* Final journey summary polish across mobile, desktop, and iPad */
.mobile-flight-direction-header-copy {
    min-width: 0;
}

.mobile-flight-direction-route-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    min-width: 0;
}

.mobile-flight-direction-route-main {
    font-weight: 700;
    color: #274652;
}

.mobile-flight-direction-route-arrow {
    font-family: Courier Prime, monospace;
    color: #97a0ac;
    line-height: 1;
}

.mobile-flight-direction-connector {
    display: inline-flex;
    align-items: center;
    max-width: 52%;
    padding: 1px 5px;
    border: 1px dashed rgba(242, 92, 5, 0.46);
    border-radius: 999px;
    background: #fff7e8;
    font-family: Courier Prime, monospace;
    color: #b86800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-flight-direction-meta {
    margin-top: 4px;
    font-family: Courier Prime, monospace;
    color: #677384;
    letter-spacing: 0.03em;
    line-height: 1.28;
}

@media (min-width: 769px) {
    .mobile-flight-direction-header {
        background: linear-gradient(180deg, #ffffff 0%, #fdfefc 100%);
    }

    .mobile-flight-direction-route-main {
        font-size: 0.99rem;
    }

    .mobile-flight-direction-route-arrow {
        font-size: 0.8rem;
    }

    .mobile-flight-direction-connector {
        font-size: 0.63rem;
    }

    .mobile-flight-direction-meta {
        font-size: 0.74rem;
    }
}

@media (max-width: 768px) {
    .mobile-flight-direction-route-main {
        font-size: 12px;
    }

    .mobile-flight-direction-route-arrow {
        font-size: 10px;
    }

    .mobile-flight-direction-connector {
        font-size: 8px;
    }

    .mobile-flight-direction-meta {
        font-size: 9px;
    }
}

body:not(.results-conversation-mode) #statusMessage:empty {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

body:has(.result-container.visible) main {
    align-items: stretch;
    max-width: min(80rem, calc(100vw - 3rem));
}

body:has(.result-container.visible) #searchEntryShell {
    display: none !important;
}

body:has(.result-container.visible) #resultContainer {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    width: 100%;
    max-width: 100%;
    margin-top: 0.5rem;
}

body:has(.result-container.visible) #resultsStatusBanner {
    display: flex;
}

body:has(.result-container.visible) #resultsStatusBanner[hidden] {
    display: none !important;
}

body:has(.result-container.visible) #resultContainer > .results-conversation-summary {
    order: 0;
}

body:has(.result-container.visible) #marketSummary {
    order: 1;
}

body:has(.result-container.visible) #flightsList {
    order: 2;
}

body:has(.result-container.visible) #flightsList.is-updating {
    opacity: 0.88;
    transition: opacity 180ms ease, box-shadow 180ms ease;
}

body:has(.result-container.visible) .results-conversation-composer {
    order: 4;
}

body:has(.result-container.visible) .results-conversation-answers {
    order: 3;
}

body:has(.result-container.visible) .results-conversation-chat-shell {
    order: 3;
}

body:has(.result-container.visible) #marketSummary,
body:has(.result-container.visible) #flightsList,
body:has(.result-container.visible) .results-conversation-summary,
body:has(.result-container.visible) .results-conversation-composer,
body:has(.result-container.visible) .results-conversation-answers {
    width: 100%;
    max-width: 100%;
}

.results-conversation-summary {
    display: block;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(31, 78, 91, 0.14);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 8px 24px rgba(26, 26, 26, 0.06);
    backdrop-filter: blur(4px);
}

.results-status-banner {
    display: none;
    width: 100%;
    align-items: center;
    gap: 0.9rem;
    margin: 0.75rem auto 0;
    padding: 0.95rem 1.1rem;
    border-radius: 18px;
    border: 1px solid rgba(31, 78, 91, 0.16);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 252, 0.96));
    box-shadow: 0 10px 28px rgba(26, 26, 26, 0.08);
    backdrop-filter: blur(6px);
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.results-status-banner.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.results-status-banner.is-hiding {
    opacity: 0;
    transform: translateY(-6px);
}

.results-status-banner.is-info {
    border-color: rgba(31, 78, 91, 0.22);
    background: linear-gradient(180deg, rgba(246, 252, 253, 0.98), rgba(236, 246, 248, 0.95));
}

.results-status-banner.is-warning {
    border-color: rgba(242, 92, 5, 0.28);
    background: linear-gradient(180deg, rgba(255, 250, 245, 0.98), rgba(255, 242, 232, 0.96));
}

.results-status-banner-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: rgba(31, 78, 91, 0.12);
    color: #1f4e5b;
    font-family: Courier Prime, monospace;
    font-size: 0.95rem;
    font-weight: 700;
    flex-shrink: 0;
}

.results-status-banner.is-warning .results-status-banner-icon {
    background: rgba(242, 92, 5, 0.14);
    color: #f25c05;
}

.results-status-banner-body {
    flex: 1;
    min-width: 0;
}

.results-status-banner-title {
    font-family: "DM Serif Display", serif;
    font-size: 1.15rem;
    line-height: 1.15;
    color: #1a1a1a;
    margin-bottom: 0.2rem;
}

.results-status-banner-copy {
    font-family: Space Grotesk, sans-serif;
    font-size: 0.94rem;
    line-height: 1.5;
    color: #4b5563;
}

.results-status-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.results-status-banner-cta {
    min-height: 2.5rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    border: 1px solid #1f4e5b;
    background: #1f4e5b;
    color: #fff;
    font-family: Space Grotesk, sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(31, 78, 91, 0.16);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.results-status-banner-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(31, 78, 91, 0.2);
}

.results-summary-eyebrow {
    font-family: Courier Prime, monospace;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #1f4e5b;
    margin-bottom: 0.35rem;
}

.results-summary-title {
    font-family: "DM Serif Display", serif;
    font-size: 1.45rem;
    line-height: 1.15;
    color: #1a1a1a;
    margin-bottom: 0.45rem;
}

.results-summary-copy {
    font-family: Space Grotesk, sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4b5563;
}

.results-conversation-composer {
    display: block;
    margin-top: 0;
}

.results-conversation-summary[hidden],
.results-conversation-composer[hidden],
.results-conversation-answers[hidden],
.results-conversation-chat-shell[hidden] {
    display: none !important;
}

.results-conversation-chat-shell {
    width: 100%;
    margin-top: 0.85rem;
    padding: 1rem;
    border: 1px solid rgba(31, 78, 91, 0.14);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 6px 20px rgba(26, 26, 26, 0.05);
}

.results-conversation-card {
    border: 1px solid rgba(31, 78, 91, 0.14);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 251, 247, 0.92));
    padding: 1rem;
    box-shadow: 0 6px 20px rgba(26, 26, 26, 0.05);
}

.results-conversation-chat-shell .results-conversation-card {
    border: none;
    border-top: 1px solid rgba(31, 78, 91, 0.12);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 1rem 0 0;
}

.results-conversation-input-wrap {
    position: relative;
}

.results-conversation-placeholder-overlay {
    position: absolute;
    inset: 0;
    padding: 0.95rem 1rem;
    font-family: Courier Prime, monospace;
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(107, 114, 128, 0.8);
    pointer-events: none;
    white-space: pre-wrap;
    overflow: hidden;
}

.results-conversation-placeholder-overlay.is-hidden {
    opacity: 0;
}

.results-conversation-input {
    width: 100%;
    min-height: 92px;
    resize: vertical;
    border: 1px solid rgba(31, 78, 91, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.95rem 1rem;
    font-family: Courier Prime, monospace;
    font-size: 1rem;
    line-height: 1.6;
    color: #1a1a1a;
    outline: none;
}

.results-conversation-input:focus {
    border-color: rgba(242, 92, 5, 0.55);
    box-shadow: 0 0 0 3px rgba(242, 92, 5, 0.12);
}

.results-conversation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.85rem;
}

.results-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
    margin: 0.65rem 0 0;
    padding: 0;
    box-sizing: border-box;
}

.results-quick-filter-button {
    min-height: 2.25rem;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-family: Space Grotesk, sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    background: #fffdf8;
    color: #1f4e5b;
    border: 1px dotted rgba(31, 78, 91, 0.75);
    box-shadow: 2px 2px 0 rgba(31, 78, 91, 0.12);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.results-quick-filter-button:hover {
    transform: translateY(-1px);
    background: #1f4e5b;
    color: #fff;
    border-color: #1f4e5b;
    box-shadow: 3px 3px 0 rgba(31, 78, 91, 0.2);
}

.results-quick-filter-button:disabled {
    opacity: 0.7;
    transform: none;
    cursor: progress;
}

.results-quick-filter-button.is-active {
    background: #1f4e5b;
    color: #fff;
    border-color: #1f4e5b;
    box-shadow: 2px 2px 0 rgba(31, 78, 91, 0.2);
}

.results-quick-filter-button-cancel {
    background: rgba(255, 248, 242, 0.98);
    color: #8c4a1e;
    border-color: rgba(242, 92, 5, 0.55);
    box-shadow: 2px 2px 0 rgba(242, 92, 5, 0.1);
}

.results-conversation-primary,
.results-conversation-secondary {
    min-height: 2.5rem;
    border-radius: 999px;
    padding: 0.55rem 0.95rem;
    font-family: Space Grotesk, sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.results-conversation-primary {
    background: #1f4e5b;
    color: #fff;
    border: 1px solid #1f4e5b;
    box-shadow: 0 3px 10px rgba(31, 78, 91, 0.16);
}

.results-conversation-secondary {
    background: rgba(242, 239, 229, 0.95);
    color: #1a1a1a;
    border: 1px solid rgba(26, 26, 26, 0.12);
}

.results-conversation-primary:hover,
.results-conversation-secondary:hover {
    transform: translateY(-1px);
}

.results-conversation-primary:disabled,
.results-conversation-secondary:disabled {
    opacity: 0.7;
    transform: none;
    cursor: progress;
}

.results-conversation-answers {
    width: 100%;
}

.results-thread-shell {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 0 0 1rem;
}

.results-thread-row {
    display: flex;
    width: 100%;
}

.results-thread-row-user {
    justify-content: flex-end;
}

.results-thread-row-assistant {
    justify-content: flex-start;
}

.results-thread-bubble {
    max-width: min(82%, 44rem);
    border-radius: 20px;
    padding: 0.85rem 1rem;
    box-shadow: 0 3px 12px rgba(26, 26, 26, 0.04);
    border: 1px solid rgba(26, 26, 26, 0.04);
    transform-origin: bottom;
}

.results-thread-bubble-user {
    background: rgba(244, 244, 248, 0.98);
    color: #1a1a1a;
    border-bottom-right-radius: 8px;
}

.results-thread-bubble-assistant {
    background: linear-gradient(180deg, rgba(242, 92, 5, 0.96), rgba(228, 99, 33, 0.98));
    color: #fff;
    border-bottom-left-radius: 8px;
}

.results-thread-bubble-typing {
    min-width: 4.2rem;
}

.results-thread-bubble.is-new {
    animation: resultsThreadPop 200ms var(--ease-enter);
}

.results-thread-text {
    font-family: Space Grotesk, sans-serif;
    font-size: 0.95rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

.results-thread-typing {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.results-thread-typing span {
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    animation: resultsTypingDot 1s infinite ease-in-out;
}

.results-thread-typing span:nth-child(2) {
    animation-delay: 120ms;
}

.results-thread-typing span:nth-child(3) {
    animation-delay: 240ms;
}

@keyframes resultsThreadPop {
    0% {
        opacity: 0;
        transform: translateY(6px) scale(0.99);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes resultsTypingDot {
    0%, 80%, 100% {
        opacity: 0.35;
        transform: translateY(0);
    }
    40% {
        opacity: 1;
        transform: translateY(-2px);
    }
}

.results-option-badge {
    display: none;
}

.results-option-card {
    scroll-margin-top: 1.5rem;
    transition: opacity var(--motion-short) var(--ease-move), transform var(--motion-short) var(--ease-move), box-shadow var(--motion-short) var(--ease-move);
}

.results-option-card-new {
    animation: resultsOptionGlow 1.2s var(--ease-enter);
}

@keyframes resultsOptionGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(242, 92, 5, 0.22);
        transform: translateY(0);
    }
    35% {
        box-shadow: 0 0 0 8px rgba(242, 92, 5, 0);
        transform: translateY(0);
    }
    100% {
        box-shadow: none;
        transform: translateY(0);
    }
}

.results-motion-reveal-init {
    opacity: 0;
    transform: translateY(var(--reveal-y, 8px));
}

.results-motion-reveal-run {
    animation: resultsRevealEnter var(--motion-medium) var(--ease-enter) forwards;
    animation-delay: var(--reveal-delay, 0ms);
}

@keyframes resultsRevealEnter {
    from {
        opacity: 0;
        transform: translateY(var(--reveal-y, 8px));
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body:has(.result-container.visible) .results-conversation-summary {
    margin-bottom: 0.25rem;
}

body:has(.result-container.visible) .flight-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

body:has(.result-container.visible) .flight-header > div:first-child {
    min-width: 0;
}

body:has(.result-container.visible) .mobile-flight-card-airline {
    min-width: 0;
}

body:has(.result-container.visible) .airline-header-stack {
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.24rem;
}

body:has(.result-container.visible) .airline-header-line {
    min-width: 0;
}

body:has(.result-container.visible) .airline-header-line.with-logos {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.32rem 0.56rem;
}

body:has(.result-container.visible) .airline-header-line.names-only {
    font-family: Courier Prime, monospace;
    font-size: 0.7rem;
    line-height: 1.1;
    color: #4f5c69;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body:has(.result-container.visible) .airline-chip {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    gap: 0.32rem;
    max-width: 100%;
}

body:has(.result-container.visible) .airline-chip-logo {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    flex-shrink: 0;
}

body:has(.result-container.visible) .airline-chip-name {
    min-width: 0;
    max-width: 100%;
    font-family: Courier Prime, monospace;
    font-size: 0.72rem;
    line-height: 1.08;
    letter-spacing: 0.01em;
    color: #1f4e5b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body:has(.result-container.visible) .flight-price-tag {
    margin-left: auto;
    flex-shrink: 0;
}

body:has(.result-container.visible) .flight-header,
body:has(.result-container.visible) .mobile-flight-card-airline,
body:has(.result-container.visible) .airline-header-stack,
body:has(.result-container.visible) .airline-header-line,
body:has(.result-container.visible) .airline-chip,
body:has(.result-container.visible) .airline-chip-name {
    transition-property: opacity, color, background-color, border-color, box-shadow;
    transition-duration: var(--motion-short);
    transition-timing-function: var(--ease-move);
}

body:has(.result-container.visible) .results-quick-filter-button.results-motion-pulse {
    animation: resultsFilterPulse 300ms var(--ease-enter);
}

@keyframes resultsFilterPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(31, 78, 91, 0);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(31, 78, 91, 0.13);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(31, 78, 91, 0);
    }
}

body:has(.result-container.visible) .modal-overlay.active {
    opacity: 0;
    transition: opacity var(--motion-short) var(--ease-enter);
}

body:has(.result-container.visible) .modal-overlay.active.is-open {
    opacity: 1;
}

body:has(.result-container.visible) .modal-overlay.active .modal-content {
    opacity: 0;
    transform: translateY(12px);
    transition: transform var(--motion-medium) var(--ease-enter), opacity var(--motion-medium) var(--ease-enter);
}

body:has(.result-container.visible) .modal-overlay.active.is-open .modal-content {
    opacity: 1;
    transform: translateY(0);
}

body:has(.result-container.visible) .modal-overlay.active.is-closing {
    opacity: 0;
}

body:has(.result-container.visible) .modal-overlay.active.is-closing .modal-content {
    opacity: 0;
    transform: translateY(8px);
}

body:has(.result-container.visible) .market-summary-col {
    max-width: 100%;
}

body:has(.result-container.visible) #marketSummaryText .market-summary-brief {
    display: block;
    white-space: normal;
    color: #354150;
    font-size: 0.98rem;
    line-height: 1.55;
}

body:has(.result-container.visible) .flights-col {
    max-width: 100%;
    min-width: 0;
}

@media (min-width: 1180px) {
    body:has(.result-container.visible) #resultContainer {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    body:has(.result-container.visible) #resultContainer > .results-conversation-summary {
        max-width: none;
    }

    body:has(.result-container.visible) #marketSummary {
        width: 100%;
        max-width: none;
        position: static;
        align-self: stretch;
    }

    body:has(.result-container.visible) #flightsList {
        width: 100%;
        min-width: 0;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.95rem;
        align-items: stretch;
    }

    body:has(.result-container.visible) #flightsList .flight-card {
        margin-bottom: 0;
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    body:has(.result-container.visible) #flightsList .flight-header {
        min-height: 70px;
        align-items: flex-start;
        padding-top: 0.62rem;
        padding-bottom: 0.5rem;
    }

    body:has(.result-container.visible) #flightsList .mobile-flight-card-airline {
        display: flex;
        align-items: flex-start;
        width: 100%;
    }

    body:has(.result-container.visible) #flightsList .airline-chip-logo {
        width: 16px;
        height: 16px;
    }

    body:has(.result-container.visible) #flightsList .airline-chip-name {
        max-width: 12.2rem;
    }

    body:has(.result-container.visible) #flightsList .airline-header-stack.carriers-1 .airline-chip-logo {
        width: 20px;
        height: 20px;
    }

    body:has(.result-container.visible) #flightsList .airline-header-stack.carriers-1 .airline-chip-name {
        max-width: none;
        font-size: 0.98rem;
        line-height: 1.05;
    }

    body:has(.result-container.visible) #flightsList .airline-header-stack.carriers-2 .airline-chip,
    body:has(.result-container.visible) #flightsList .airline-header-stack.carriers-many .airline-chip {
        max-width: calc(50% - 0.28rem);
    }

    body:has(.result-container.visible) #flightsList .airline-header-stack.carriers-2 .airline-chip-logo,
    body:has(.result-container.visible) #flightsList .airline-header-stack.carriers-many .airline-chip-logo {
        width: 16px;
        height: 16px;
    }

    body:has(.result-container.visible) #flightsList .airline-header-stack.carriers-2 .airline-chip-name,
    body:has(.result-container.visible) #flightsList .airline-header-stack.carriers-many .airline-chip-name {
        font-size: 0.82rem;
        line-height: 1.1;
    }

    body:has(.result-container.visible) #flightsList .airline-header-line.names-only {
        max-width: 100%;
    }

    body:has(.result-container.visible) #flightsList .flight-body {
        flex: 1 1 auto;
    }

    body:has(.result-container.visible) .results-conversation-composer,
    body:has(.result-container.visible) .results-conversation-answers {
        max-width: none;
    }

    .results-quick-filters {
        width: 100%;
        max-width: none;
        margin-top: 0.75rem;
        padding: 0;
    }
}

@media (max-width: 1179px) {
    body:has(.result-container.visible) #resultContainer {
        flex-direction: column;
    }

    body:has(.result-container.visible) #marketSummary,
    body:has(.result-container.visible) #flightsList {
        width: 100%;
        max-width: 100%;
    }
}

@media (min-width: 769px) {
    body:has(.result-container.visible) .mobile-flight-card-airline {
        width: 100%;
    }

    body:has(.result-container.visible) .airline-header-stack {
        gap: 0.26rem;
    }

    body:has(.result-container.visible) .airline-header-line.with-logos {
        flex-wrap: nowrap;
        gap: 0.5rem;
    }

    body:has(.result-container.visible) .airline-header-stack.carriers-1 .airline-chip-logo {
        width: 18px;
        height: 18px;
    }

    body:has(.result-container.visible) .airline-header-stack.carriers-1 .airline-chip-name {
        font-size: 0.9rem;
        line-height: 1.05;
    }

    body:has(.result-container.visible) .airline-header-stack.carriers-2 .airline-chip {
        min-width: 0;
        max-width: calc(50% - 0.25rem);
    }

    body:has(.result-container.visible) .airline-header-stack.carriers-many .airline-chip {
        min-width: 0;
        max-width: calc(50% - 0.25rem);
    }

    body:has(.result-container.visible) .airline-header-stack.carriers-2 .airline-chip-logo,
    body:has(.result-container.visible) .airline-header-stack.carriers-many .airline-chip-logo {
        width: 16px;
        height: 16px;
    }

    body:has(.result-container.visible) .airline-header-stack.carriers-2 .airline-chip-name,
    body:has(.result-container.visible) .airline-header-stack.carriers-many .airline-chip-name {
        font-size: 0.8rem;
        line-height: 1.08;
    }

    body:has(.result-container.visible) .airline-header-stack.carriers-many .airline-header-line.names-only {
        font-size: 0.7rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        color: #f25c05;
        text-transform: uppercase;
    }

    body:has(.result-container.visible) .flight-route-row > .text-left,
    body:has(.result-container.visible) .flight-route-row > .text-right {
        max-width: 41%;
    }

    body:has(.result-container.visible) .city-name {
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
    }

    body:has(.result-container.visible) .city-name-primary {
        font-family: "DM Serif Display", serif;
        font-size: clamp(1.62rem, 1.78vw, 1.95rem);
        line-height: 1.02;
        letter-spacing: -0.01em;
        color: #1f2732;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

    body:has(.result-container.visible) .city-name-secondary {
        font-family: Space Grotesk, sans-serif;
        font-size: 0.82rem;
        line-height: 1.14;
        color: #6b7280;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 1;
        overflow: hidden;
    }

    body:has(.result-container.visible) .flight-time-date {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    body:has(.result-container.visible) .flight-time-value {
        color: #f25c05;
        font-weight: 700;
    }

    body:has(.result-container.visible) .flight-date-value {
        color: #365766;
    }

    body:has(.result-container.visible) .flight-route-row > .text-right .city-name,
    body:has(.result-container.visible) .flight-route-row > .text-right .flight-time-date {
        align-items: flex-end;
    }

    body:has(.result-container.visible) .results-option-card {
        transition: transform 140ms var(--ease-move), box-shadow 140ms var(--ease-move), opacity var(--motion-short) var(--ease-move);
    }

    body:has(.result-container.visible) .results-option-card:hover {
        transform: translateY(-2px);
        box-shadow: 8px 8px 0 rgba(31, 78, 91, 0.28);
    }
}

@media (max-width: 768px) {
    body:has(.result-container.visible) main {
        max-width: 100%;
    }

    body:has(.result-container.visible) #resultContainer {
        gap: 0.85rem;
        margin-top: 0.25rem;
    }

    body:has(.result-container.visible) .results-option-card {
        transition: transform var(--motion-micro) var(--ease-move), box-shadow var(--motion-short) var(--ease-move), opacity var(--motion-short) var(--ease-move);
    }

    body:has(.result-container.visible) .results-option-card:active {
        transform: scale(0.985);
    }

    .results-conversation-summary,
    .results-conversation-card {
        border-radius: 16px;
        padding: 0.95rem;
    }

    .results-summary-title {
        font-size: 1.25rem;
    }

    .results-summary-copy {
        font-size: 0.9rem;
    }

    .results-conversation-actions {
        gap: 0.5rem;
    }

    .results-conversation-primary,
    .results-conversation-secondary {
        width: 100%;
        justify-content: center;
    }

    .results-status-banner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 0.9rem 1rem;
        border-radius: 16px;
    }

    .results-status-banner-icon {
        width: 1.8rem;
        height: 1.8rem;
    }

    .results-status-banner-actions {
        width: 100%;
    }

    .results-status-banner-cta {
        width: 100%;
        justify-content: center;
    }

    body:has(.result-container.visible) .modal-overlay.active .modal-content {
        transform: translateY(24px);
    }

    body:has(.result-container.visible) .modal-overlay.active.is-closing .modal-content {
        transform: translateY(18px);
    }
}

@media (max-width: 768px) {
    body:has(.result-container.visible) .results-conversation-summary,
    body:has(.result-container.visible) .results-conversation-card,
    body:has(.result-container.visible) .results-status-banner {
        border-radius: 16px;
    }

    body:has(.result-container.visible) #resultsQuickFilters {
        order: 5;
        width: 100%;
        max-width: 100%;
        margin: 0.45rem 0 0;
        padding: 0;
        border: none;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    body:has(.result-container.visible) #resultsConversationComposer {
        order: 4;
    }

    body:has(.result-container.visible) #resultsConversationAnswers {
        order: 6;
    }

    .results-quick-filters {
        justify-content: flex-start;
        gap: 0.4rem;
    }

    .results-quick-filter-button {
        min-height: 2rem;
        padding: 0.22rem 0.65rem;
        font-size: 0.72rem;
        line-height: 1;
        background: #fff;
        color: #1f4e5b;
        border: 1px dotted rgba(31, 78, 91, 0.3);
        box-shadow: 2px 2px 0 rgba(31, 78, 91, 0.08);
    }

    .results-quick-filter-button.is-active {
        background: #1f4e5b;
        color: #fff;
        border-color: #1f4e5b;
        box-shadow: 2px 2px 0 rgba(31, 78, 91, 0.16);
    }

    .results-conversation-composer .results-conversation-card {
        padding: 0.9rem;
        border-radius: 16px;
    }

    .results-conversation-input-wrap {
        margin-bottom: 0.55rem;
    }

    .results-conversation-placeholder-overlay,
    .results-conversation-input {
        min-height: 84px;
        padding: 0.85rem 0.9rem;
        font-size: 0.95rem;
        line-height: 1.45;
        border-radius: 14px;
    }

    .results-conversation-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.45rem;
        margin-top: 0.5rem;
    }

    .results-conversation-primary,
    .results-conversation-secondary {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 48px;
        border-radius: 14px;
        padding: 0.65rem 0.95rem;
        font-size: 0.92rem;
    }

    .results-conversation-secondary {
        min-height: 44px;
        padding: 0.35rem 0.5rem;
        background: transparent;
        border: none;
        color: #1f4e5b;
        box-shadow: none;
        font-weight: 700;
        opacity: 0.85;
    }

    .results-conversation-secondary:hover {
        transform: none;
        opacity: 1;
    }

    .results-thread-shell {
        gap: 0.65rem;
    }

    .results-thread-bubble {
        max-width: 92%;
        padding: 0.8rem 0.9rem;
    }

    .results-thread-text {
        font-size: 0.9rem;
        line-height: 1.45;
    }

    .flight-card {
        margin-bottom: 0.9rem;
    }

    .results-option-card {
        scroll-margin-top: 1rem;
    }

    .flight-header {
        padding: 0.65rem 0.8rem 0.35rem;
    }

    .airline-logo {
        height: 20px;
    }

    .airline-name {
        font-size: 0.72rem;
        line-height: 1.1;
    }

    .flight-body {
        padding: 0.72rem;
        gap: 0.65rem;
    }

    .mobile-flight-trip-tiles {
        display: grid;
        gap: 0.45rem;
    }

    .mobile-flight-trip-tile {
        padding: 0.7rem 0.75rem 0.65rem;
        border: 1px solid rgba(31, 78, 91, 0.12);
        border-radius: 11px;
        background: #fff;
        box-shadow: 0 1px 4px rgba(26, 26, 26, 0.04);
    }

    .mobile-flight-segment-tile {
        padding: 0;
        background: transparent;
        border: none;
        box-shadow: none;
        display: grid;
        gap: 0.45rem;
    }

    .mobile-flight-segment-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.65rem;
        font-family: Courier Prime, monospace;
        font-size: 0.7rem;
        line-height: 1.1;
        color: #2f3745;
    }

    .mobile-flight-segment-time-pair {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        min-width: 0;
        font-weight: 700;
    }

    .mobile-flight-segment-duration {
        flex-shrink: 0;
        color: #5d6470;
        font-size: 0.66rem;
        letter-spacing: 0.06em;
    }

    .mobile-flight-segment-route {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: nowrap;
        gap: 0.35rem;
        min-width: 0;
        padding-top: 0.2rem;
    }

    .mobile-flight-route-main {
        min-width: 0;
        flex: 1 1 auto;
        font-family: Space Grotesk, sans-serif;
        font-size: 0.72rem;
        line-height: 1.25;
        font-weight: 700;
        color: #3b4250;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center;
    }

    .mobile-flight-route-connector {
        flex: 0 1 auto;
        min-width: 0;
        max-width: 42%;
        padding: 0.15rem 0.45rem;
        border: 1px dotted rgba(31, 78, 91, 0.25);
        border-radius: 999px;
        background: rgba(243, 250, 251, 0.96);
        font-family: Courier Prime, monospace;
        font-size: 0.62rem;
        line-height: 1;
        color: #1f4e5b;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        text-align: center;
    }

    .mobile-flight-route-arrow {
        flex: 0 0 auto;
        color: #9ca3af;
        font-size: 0.75rem;
        line-height: 1;
    }

    .mobile-flight-segment-meta {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.3rem;
        font-family: Courier Prime, monospace;
        font-size: 0.6rem;
        line-height: 1.1;
        color: #6b7280;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        white-space: nowrap;
        padding-top: 0.1rem;
    }

    .mobile-flight-trip-route,
    .flight-route-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: start;
        gap: 0.45rem;
    }

    .mobile-flight-trip-route > div:first-child,
    .mobile-flight-trip-route > div:last-child,
    .flight-route-row > div:first-child,
    .flight-route-row > div:last-child {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 0.06rem;
    }

    .mobile-flight-trip-route > div:first-child,
    .flight-route-row > div:first-child {
        text-align: left;
    }

    .mobile-flight-trip-route > div:last-child,
    .flight-route-row > div:last-child {
        text-align: right;
        align-items: flex-end;
    }

    .mobile-flight-trip-route .city-name,
    .flight-route-row .city-name {
        font-size: 1rem;
        line-height: 1.05;
        font-weight: 700;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-flight-trip-route .airport-code,
    .flight-route-row .airport-code {
        font-size: 0.66rem;
        line-height: 1.05;
        letter-spacing: 0.1em;
        opacity: 0.8;
    }

    .mobile-flight-trip-route .flight-time-date,
    .flight-route-row .flight-time-date {
        order: -1;
        font-size: 0.74rem;
        line-height: 1.08;
        font-weight: 700;
        color: #f25c05;
        white-space: nowrap;
        margin-bottom: 0.06rem;
    }

    .mobile-flight-trip-route > .flex-1,
    .flight-route-row > .flex-1 {
        min-width: 0;
        padding: 0 0.15rem;
    }

    .mobile-flight-trip-route > .flex-1 > .w-full,
    .flight-route-row > .flex-1 > .w-full {
        min-height: 1.25rem;
        margin-bottom: 0.32rem;
    }

    .mobile-flight-trip-route > .flex-1 > .w-full > .absolute,
    .flight-route-row > .flex-1 > .w-full > .absolute {
        white-space: nowrap;
        font-size: 0.62rem;
        padding: 0.18rem 0.45rem;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 1px 6px rgba(26, 26, 26, 0.06);
        line-height: 1.08;
    }

    .mobile-flight-trip-route .text-\[10px\].text-gray-500.mt-1.font-semibold,
    .flight-route-row .text-\[10px\].text-gray-500.mt-1.font-semibold {
        font-size: 0.62rem;
        line-height: 1.14;
        white-space: nowrap;
        margin-top: 0.28rem !important;
    }

    .mobile-flight-trip-route .manual-layover-badge,
    .mobile-flight-trip-route .text-orange-600,
    .flight-route-row .manual-layover-badge,
    .flight-route-row .text-orange-600 {
        font-size: 0.58rem !important;
        padding: 0.1rem 0.3rem !important;
        line-height: 1.1;
    }

    .flight-meta-row {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.4rem 0.5rem;
        padding-top: 0.6rem;
    }

    .flight-details-col {
        flex: 1 1 auto;
        flex-wrap: wrap;
        gap: 0.25rem 0.45rem;
    }

    .flight-meta-row > .text-right {
        margin-left: auto;
        align-self: flex-start;
    }

    .detail-item {
        font-size: 0.7rem;
        line-height: 1.15;
        gap: 0.28rem;
    }

    .flight-price-tag {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        padding: 0.28rem 0.62rem;
        border-radius: 999px;
        transform: none;
        box-shadow: 2px 2px 0 rgba(31, 78, 91, 0.18);
        background: #1f4e5b;
        border: 1px dotted rgba(31, 78, 91, 0.28);
        font-size: 0.8rem;
        line-height: 1;
        color: #fff;
        white-space: nowrap;
    }

    .mobile-flight-modal-title-section {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        min-width: 0;
    }

    .mobile-flight-modal-route-title {
        font-size: 1.5rem;
        line-height: 1.05;
        letter-spacing: -0.02em;
    }

    .mobile-flight-modal-price {
        display: inline-flex;
        width: fit-content;
        align-items: center;
        justify-content: center;
        padding: 0.25rem 0.65rem;
        border-radius: 999px;
        background: #1f4e5b;
        color: #fff;
        font-family: Courier Prime, monospace;
        font-size: 0.82rem;
        font-weight: 700;
        box-shadow: 2px 2px 0 rgba(31, 78, 91, 0.18);
        border: 1px dotted rgba(31, 78, 91, 0.22);
    }

    .mobile-flight-modal-actions {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-left: auto;
    }

    .mobile-flight-details-stack {
        gap: 0.7rem;
    }

    .mobile-flight-panel {
        border: 1px solid rgba(31, 78, 91, 0.12);
        border-radius: 13px;
        background: #fffdf8;
        box-shadow: 0 3px 10px rgba(31, 78, 91, 0.05);
        padding: 0.85rem;
    }

    .mobile-flight-direction-card {
        margin-bottom: 0.65rem;
        border: 1px solid rgba(31, 78, 91, 0.12);
        border-radius: 11px;
        overflow: hidden;
        background: #fff;
        box-shadow: 0 2px 8px rgba(26, 26, 26, 0.04);
    }

    .mobile-flight-direction-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 9px 10px;
        min-height: 46px;
        background: #fff;
        border-bottom: 1px solid rgba(31, 78, 91, 0.12);
        list-style: none;
    }

    .mobile-flight-direction-header::-webkit-details-marker {
        display: none;
    }

    .mobile-flight-direction-body {
        padding: 0.8rem 0.85rem 0.85rem;
        background: #fbfcfb;
        display: grid;
        gap: 0.6rem;
    }

    .mobile-flight-direction-chevron {
        flex-shrink: 0;
        color: #1f4e5b;
        font-size: 0.9rem;
    }

    .mobile-flight-direction-route-main {
        font-size: 12px;
        font-weight: 700;
        color: #1a1a1a;
    }

    .mobile-flight-direction-route-arrow {
        font-family: Courier Prime, monospace;
        font-size: 10px;
        color: #7c8490;
    }

    .mobile-flight-direction-connector {
        padding: 1px 4px;
        border: 1px dashed rgba(242, 92, 5, 0.32);
        border-radius: 999px;
        background: #fff8f1;
        font-family: Courier Prime, monospace;
        font-size: 9px;
        color: #8b4a1f;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .timeline-block.mobile-flight-direction-card {
        padding: 0;
        border: 1px solid rgba(31, 78, 91, 0.12);
        border-radius: 11px;
        box-shadow: 0 2px 8px rgba(26, 26, 26, 0.04);
        overflow: hidden;
        background: #fff;
    }

    .timeline-leg.mobile-flight-segment-row {
        margin-bottom: 0.6rem;
    }

    .timeline-leg.mobile-flight-segment-row:last-child {
        margin-bottom: 0;
    }

    .timeline-content.tri {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        gap: 0.45rem;
    }

    .timeline-meta.t-meta {
        min-width: 0;
        padding: 0.42rem 0.5rem !important;
        border: 1px dotted rgba(31, 78, 91, 0.12) !important;
        border-radius: 8px;
        background: rgba(31, 78, 91, 0.03);
        font-size: 0.64rem !important;
        line-height: 1.3;
    }

    .timeline-layover {
        padding: 0.45rem 0.55rem;
        font-size: 0.62rem;
        justify-content: center;
        align-items: center;
        gap: 0.35rem;
        background: rgba(242, 92, 5, 0.08);
        border: 1px dotted rgba(242, 92, 5, 0.28);
        border-radius: 10px;
        color: #8c4a1e;
        width: 100%;
        margin: 0 auto;
        text-align: center;
    }

    .mobile-flight-tariff-section {
        display: grid;
        gap: 0.6rem;
    }

    .mobile-flight-tariff-card,
    .tariff-card {
        border: 1px solid rgba(31, 78, 91, 0.12);
        border-radius: 10px;
        background: #fff;
        margin-bottom: 0.65rem;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(31, 78, 91, 0.06);
    }

    .tariff-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.85rem 0.9rem;
        gap: 0.6rem;
        cursor: pointer;
        background: #fff;
    }

    .tariff-header.no-toggle {
        cursor: default;
        padding-bottom: 0.6rem;
    }

    .tariff-title {
        font-size: 0.78rem;
        line-height: 1.25;
        font-weight: 700;
        color: #1a1a1a;
    }

    .tariff-prefix {
        font-size: 0.6rem;
        letter-spacing: 0.08em;
        color: #5d6470;
        text-transform: uppercase;
        margin-bottom: 0.12rem;
    }

    .tariff-title.with-prefix {
        margin-top: 0;
    }

    .tariff-main {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.65rem;
        margin-bottom: 0.55rem;
    }

    .tariff-price {
        min-width: 0;
        padding: 0;
        font-size: 0.78rem;
        font-weight: 700;
        color: #f25c05;
        white-space: nowrap;
    }

    .tariff-toggle {
        width: 24px;
        height: 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        border: 1px dotted rgba(31, 78, 91, 0.18);
        background: rgba(31, 78, 91, 0.04);
        color: #1f4e5b;
        font-size: 0.7rem;
        opacity: 1;
        transform: none;
        flex-shrink: 0;
    }

    .tariff-body {
        padding: 0 0.9rem 0.85rem;
    }

    .seller-item.compact,
    .mobile-flight-seller-row {
        padding: 0.55rem 0;
        gap: 0.5rem;
        font-size: 0.7rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px dashed rgba(26, 26, 26, 0.12);
    }

    .seller-item.compact:last-child,
    .mobile-flight-seller-row:last-child {
        border-bottom: none;
    }

    .seller-name {
        color: #1b8a5a;
        font-size: 0.72rem;
        text-decoration: underline dotted;
    }

    .seller-price {
        color: #2f3745;
        font-size: 0.72rem;
    }

    .show-more {
        width: 100%;
        min-height: 44px;
        border-radius: 999px;
        border: 1px dotted rgba(31, 78, 91, 0.22);
        background: #fff;
        color: #1f4e5b;
        font-size: 0.75rem;
        font-weight: 700;
        box-shadow: 2px 2px 0 rgba(31, 78, 91, 0.08);
    }

    .scoring-footer {
        margin-top: 0.65rem;
        padding-top: 0.55rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .results-motion-reveal-run,
    .results-option-card-new,
    .results-thread-bubble.is-new,
    .results-motion-pulse,
    .results-thread-typing span {
        animation: none !important;
    }

    body:has(.result-container.visible) .results-option-card,
    body:has(.result-container.visible) .results-quick-filter-button,
    body:has(.result-container.visible) .results-conversation-primary,
    body:has(.result-container.visible) .results-conversation-secondary,
    body:has(.result-container.visible) .modal-overlay,
    body:has(.result-container.visible) .modal-content {
        transition-duration: 120ms !important;
    }

    body:has(.result-container.visible) .results-option-card:hover,
    body:has(.result-container.visible) .results-option-card:active {
        transform: none !important;
    }

    body:has(.result-container.visible) .modal-overlay.active .modal-content,
    body:has(.result-container.visible) .modal-overlay.active.is-closing .modal-content {
        transform: none !important;
    }
}

@media (max-width: 640px) {
    .analog-loader {
        padding: 1rem 0.9rem;
        gap: 1rem;
        border-radius: 16px;
    }

    .analog-loader.visible {
        align-items: center;
    }

    .data-stream {
        width: 118%;
        height: 118%;
        opacity: 0.55;
    }

    .data-item {
        font-size: 0.62rem;
        opacity: 0.75;
    }

    .data-item.highlight {
        font-size: 0.7rem;
    }

    .radar-scope {
        width: 92px;
        height: 92px;
    }

    .gyro-core {
        width: 14px;
        height: 14px;
    }

    .loader-content {
        align-items: center;
        width: 100%;
        text-align: center;
    }

    .loader-headline {
        font-size: 1.2rem;
        margin-bottom: 0.35rem;
    }

    .loader-log {
        font-size: 0.84rem;
        line-height: 1.35;
        min-height: 1.2em;
    }

    .loader-progress {
        margin-top: 0.85rem;
        height: 5px;
    }
}

@media (max-width: 768px) {
    body:has(.result-container.visible) {
        background: #f2efe5;
    }

    body:has(.result-container.visible) .flight-card {
        border: 2px solid #1a1a1a;
        border-radius: 14px;
        background: #fffdf8;
        box-shadow: 4px 5px 0 rgba(31, 78, 91, 0.12);
        overflow: hidden;
    }

    body:has(.result-container.visible) .flight-header {
        background: #efe8d9;
        border-bottom: 2px solid #1a1a1a;
        padding: 10px 12px;
        min-height: 24px;
    }

    body:has(.result-container.visible) .results-option-badge {
        min-height: 24px;
        padding: 0.22rem 0.55rem;
        font-family: Courier Prime, monospace;
        font-size: 10px;
        line-height: 1;
        letter-spacing: 0.08em;
    }

    body:has(.result-container.visible) .flight-header .airline-name {
        font-family: Courier Prime, monospace;
        font-size: 11px;
        line-height: 1.1;
        letter-spacing: 0.01em;
        color: #1f4e5b;
    }

    body:has(.result-container.visible) .airline-logo {
        height: 20px;
    }

    body:has(.result-container.visible) .flight-body {
        background: #f6f5f1;
        padding: 10px;
        gap: 8px;
    }

    body:has(.result-container.visible) .flight-body > .flex.flex-col.gap-4 {
        gap: 6px;
    }

    body:has(.result-container.visible) .mobile-flight-segment-tile {
        padding: 0;
        border: none;
        border-radius: 11px;
        background: transparent;
        box-shadow: none;
        display: block;
    }

    body:has(.result-container.visible) .flight-meta-row {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.4rem 0.5rem;
        padding-top: 0.6rem;
        border-top-color: rgba(26, 26, 26, 0.13);
    }

    body:has(.result-container.visible) .flight-details-col {
        flex: 1 1 auto;
        gap: 0.25rem 0.45rem;
        font-size: 0.7rem;
        color: #5d6470;
    }

    body:has(.result-container.visible) .flight-meta-row > .text-right {
        margin-left: auto;
        align-self: flex-start;
    }

    body:has(.result-container.visible) .detail-item {
        gap: 0.28rem;
        line-height: 1.15;
    }

    body:has(.result-container.visible) .flight-price-tag {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        align-self: center;
        min-width: 74px;
        padding: 0.45rem 0.68rem;
        border-radius: 8px;
        transform: none;
        box-shadow: 2px 3px 0 rgba(26, 26, 26, 0.78);
        background: #1f4e5b;
        border: 1px solid rgba(31, 78, 91, 0.2);
        font-family: Courier Prime, monospace;
        font-size: 0.94rem;
        font-weight: 700;
        line-height: 1;
        color: #fff;
        white-space: nowrap;
    }

    body:has(.result-container.visible) .mobile-card-time-range {
        display: inline-flex;
        align-items: center;
        gap: 0.42rem;
        font-family: Courier Prime, monospace;
        font-size: 12px;
        font-weight: 700;
        color: #374151;
    }

    body:has(.result-container.visible) .mobile-card-duration {
        font-family: Courier Prime, monospace;
        font-size: 10px;
        font-weight: 600;
        color: #6a7080;
    }

    body:has(.result-container.visible) .mobile-card-route-line {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        margin-top: 5px;
        font-size: 11px;
        color: #4a5160;
        line-height: 1.25;
        flex-wrap: wrap;
        text-align: center;
    }

    body:has(.result-container.visible) .mobile-card-route-main {
        font-size: 10px;
        font-weight: 700;
        color: #4b5563;
    }

    body:has(.result-container.visible) .mobile-card-connector-pill {
        padding: 1px 4px;
        border: 1px dashed rgba(242, 92, 5, 0.32);
        border-radius: 999px;
        background: #fff8f1;
        font-family: Courier Prime, monospace;
        font-size: 8px;
        color: #8b4a1f;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    body:has(.result-container.visible) .mobile-card-route-arrow {
        color: #9196a0;
        font-family: Courier Prime, monospace;
        font-size: 10px;
    }

    body:has(.result-container.visible) .mobile-card-segment-meta {
        margin-top: 7px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        font-family: Courier Prime, monospace;
        font-size: 9px;
        color: #6f7784;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    body:has(.result-container.visible) .mobile-card-meta-dot {
        width: 4px;
        height: 4px;
        border-radius: 999px;
        background: rgba(31, 78, 91, 0.35);
    }

    body:has(.result-container.visible) .scoring-footer {
        margin-top: 0.6rem;
        padding: 0.65rem 0.85rem;
        border-top: 1px solid rgba(26, 26, 26, 0.13);
        background: rgba(31, 78, 91, 0.025);
        font-size: 0.78rem;
        line-height: 1.45;
    }

    .modal-overlay {
        align-items: flex-end;
        justify-content: center;
        padding: 0.5rem 0.5rem 0;
        background: rgba(26, 26, 26, 0.56);
        backdrop-filter: blur(4px);
    }

    .modal-content {
        width: min(420px, 100vw);
        max-width: none !important;
        height: 62vh;
        max-height: 92vh;
        border: 2px solid #1a1a1a;
        border-bottom-width: 0;
        border-radius: 22px 22px 0 0;
        background: #fffdf8;
        box-shadow: 0 -10px 26px rgba(13, 20, 31, 0.14);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .modal-header {
        min-height: 58px;
        padding: 10px 12px 10px;
        background: #fffdf8;
        border-bottom: 1px solid rgba(26, 26, 26, 0.13);
        flex-shrink: 0;
    }

    .modal-title-section {
        min-width: 0;
    }

    .modal-route-title {
        font-size: 1.5rem;
        line-height: 1.05;
        letter-spacing: -0.02em;
    }

    .modal-close {
        width: 36px;
        height: 36px;
        font-size: 1.45rem;
        margin-left: 0.75rem;
        box-shadow: 2px 3px 0 rgba(26, 26, 26, 0.78);
    }

    .modal-body {
        flex: 1;
        padding: 11px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background: #f2efe5;
    }

    .modal-grid {
        flex-direction: column;
        gap: 10px;
    }

    .modal-main,
    .modal-side {
        width: 100%;
        position: static;
    }

    .modal-main {
        order: 1;
    }

    .modal-side {
        order: 2;
    }

    .modal-section {
        background: #fffdf8;
        border: 1px solid rgba(26, 26, 26, 0.13);
        border-radius: 13px;
        padding: 11px;
        margin-bottom: 10px;
        box-shadow: 0 4px 10px rgba(31, 78, 91, 0.05);
    }

    .modal-section:last-child {
        margin-bottom: 0;
    }

    .modal-section-title {
        margin-bottom: 10px;
        font-size: 12px;
        letter-spacing: 0.03em;
        color: #1f4e5b;
    }

    .modal-section-title::before {
        width: 3px;
        height: 14px;
    }

    .badge-icon {
        width: 22px;
        height: 22px;
        line-height: 22px;
        border-radius: 6px;
        font-size: 0.95rem;
    }

    .timeline-block {
        background: #fffdf8;
        border: 1px solid rgba(26, 26, 26, 0.13);
        border-radius: 11px;
        padding: 11px;
        margin-bottom: 10px;
        box-shadow: 0 4px 10px rgba(31, 78, 91, 0.05);
    }

    .timeline-header {
        margin-bottom: 8px;
        padding-bottom: 8px;
        border-bottom: 1px solid rgba(26, 26, 26, 0.13);
    }

    .timeline-leg {
        margin-bottom: 12px;
    }

    .timeline-row {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        margin-bottom: 0;
        padding-bottom: 10px;
        border-bottom: 1px dashed rgba(31, 78, 91, 0.12);
    }

    .timeline-row:last-child {
        padding-bottom: 0;
        border-bottom: none;
    }

    .timeline-rail {
        display: none !important;
    }

    .timeline-content.tri {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        gap: 8px;
        width: 100%;
        padding: 0;
        align-items: start;
    }

    .t-dep,
    .t-arr {
        min-width: 0;
    }

    .t-meta {
        min-width: 0;
        text-align: center !important;
        margin-left: 0 !important;
        padding: 0.45rem 0.5rem !important;
        border: 1px dashed rgba(31, 78, 91, 0.12) !important;
        border-radius: 8px;
        background: rgba(31, 78, 91, 0.03);
        font-size: 0.65rem !important;
        line-height: 1.35;
    }

    .timeline-city {
        font-family: "DM Serif Display", serif;
        font-size: 12px !important;
        line-height: 1.1;
        font-weight: 700;
        color: #1a1a1a;
        display: inline-block;
    }

    .timeline-time {
        font-family: Courier Prime, monospace;
        font-size: 12px !important;
        line-height: 1.1;
        font-weight: 700;
        color: #1a1a1a;
        display: block;
    }

    .timeline-date {
        font-family: Courier Prime, monospace;
        font-size: 9px;
        line-height: 1.1;
        color: #f25c05;
        background: rgba(242, 92, 5, 0.08);
        border: 1px solid rgba(242, 92, 5, 0.15);
        border-radius: 999px;
        padding: 1px 6px;
        display: inline-block;
        margin-top: 2px;
    }

    .timeline-airport {
        font-family: Courier Prime, monospace;
        font-size: 9px;
        color: #5d6470;
        display: inline-block;
        margin-left: 4px;
        letter-spacing: 0.08em;
    }

    .timeline-flight,
    .timeline-duration {
        color: #1a1a1a;
        font-size: 10px;
        font-weight: 700;
    }

    .timeline-layover {
        padding: 8px 10px;
        font-size: 10px;
        justify-content: center;
        align-items: center;
        gap: 6px;
        background: rgba(242, 92, 5, 0.08);
        border: 1px dashed rgba(242, 92, 5, 0.35);
        border-radius: 10px;
        color: #1a1a1a;
        width: 100%;
        margin: 0 auto;
        text-align: center;
    }

    .timeline-layover .icon {
        font-size: 12px;
    }

    .info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .info-item {
        gap: 0.2rem;
        padding: 8px;
        border-radius: 8px;
        border: 1px solid rgba(31, 78, 91, 0.12);
        background: rgba(31, 78, 91, 0.03);
    }

    .info-label {
        font-size: 10px;
        letter-spacing: 0.08em;
        color: #5d6470;
    }

    .info-value {
        font-size: 12px;
        line-height: 1.35;
    }

    .tariff-card {
        margin-bottom: 8px;
        border: 1px solid rgba(31, 78, 91, 0.12);
        border-radius: 10px;
        background: #fff;
        overflow: hidden;
        box-shadow: 4px 4px 0 rgba(31, 78, 91, 0.08);
    }

    .tariff-header {
        min-height: 44px;
        padding: 0.85rem 0.9rem;
        gap: 0.65rem;
    }

    .tariff-header.no-toggle {
        padding-bottom: 0.6rem;
    }

    .tariff-title {
        font-size: 0.75rem;
        line-height: 1.25;
        font-weight: 700;
        color: #1a1a1a;
    }

    .tariff-prefix {
        font-size: 0.6rem;
        letter-spacing: 0.08em;
        color: #5d6470;
        text-transform: uppercase;
        margin-bottom: 0.12rem;
    }

    .tariff-price {
        min-width: 64px;
        padding: 0;
        font-size: 0.75rem;
        font-weight: 700;
        color: #f25c05;
    }

    .tariff-toggle {
        width: 24px;
        height: 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        border: 1px dotted rgba(31, 78, 91, 0.18);
        background: rgba(31, 78, 91, 0.04);
        color: #1f4e5b;
        font-size: 0.7rem;
        opacity: 1;
        transform: none;
    }

    .tariff-body {
        padding: 0 0.9rem 0.85rem;
    }

    .seller-item.compact {
        padding: 0.55rem 0;
        gap: 0.5rem;
        font-size: 0.7rem;
        border-bottom-color: rgba(26, 26, 26, 0.12);
    }

    .seller-name {
        color: #1b8a5a;
        font-size: 0.72rem;
        text-decoration: underline dotted;
    }

    .seller-price {
        color: #2f3745;
        font-size: 0.72rem;
    }
}

/* Desktop + iPad details layout for shared modal markup */
@media (min-width: 769px) {
    .mobile-flight-direction-card.desktop-journey-static > .mobile-flight-direction-header {
        display: none;
    }

    .mobile-flight-direction-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.85rem;
        padding: 0.8rem 0.95rem;
        margin-bottom: 0;
        border-bottom: 1px solid rgba(26, 26, 26, 0.12);
        background: #fff;
    }

    .mobile-flight-direction-body {
        padding: 0.8rem 0.9rem 0.9rem;
        background: #fbfcfc;
        display: grid;
        gap: 0.55rem;
    }

    .mobile-flight-leg-row {
        display: grid;
        grid-template-columns: minmax(64px, auto) minmax(0, 1fr) minmax(120px, auto);
        align-items: start;
        gap: 0.65rem;
        padding: 0.62rem 0.72rem;
        border: 1px solid rgba(26, 26, 26, 0.12);
        border-radius: 10px;
        background: #fff;
        width: 100%;
        box-sizing: border-box;
    }

    .mobile-flight-leg-code {
        font-family: Courier Prime, monospace;
        font-size: 0.8rem;
        line-height: 1.2;
        color: #1f4e5b;
        font-weight: 700;
        white-space: nowrap;
    }

    .mobile-flight-leg-route {
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
    }

    .mobile-flight-leg-route-line {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        gap: 8px;
        min-width: 0;
    }

    .mobile-flight-leg-route-part {
        min-width: 0;
        font-size: 0.94rem;
        line-height: 1.2;
        color: #2f3745;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-flight-leg-route-part.is-arrival {
        text-align: right;
    }

    .mobile-flight-leg-route-arrow {
        color: #7f8793;
        font-size: 0.88rem;
        line-height: 1;
    }

    .mobile-flight-leg-date-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: center;
        gap: 8px;
        min-width: 0;
    }

    .mobile-flight-leg-date {
        margin-top: 1px;
        font-family: Courier Prime, monospace;
        font-size: 0.66rem;
        line-height: 1.2;
        color: #7a808c;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .mobile-flight-leg-date.is-arrival {
        text-align: right;
    }

    .mobile-flight-leg-right {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        text-align: right;
        min-width: 0;
        max-width: 120px;
    }

    .mobile-flight-leg-duration {
        font-family: Courier Prime, monospace;
        font-size: 0.82rem;
        line-height: 1.2;
        color: #596170;
    }

    .mobile-flight-leg-aircraft {
        margin-top: 2px;
        font-family: Courier Prime, monospace;
        font-size: 0.68rem;
        line-height: 1.2;
        color: #7a808c;
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-flight-layover-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.75rem;
        padding: 0.58rem 0.72rem;
        border-radius: 10px;
        border: 1px dashed rgba(242, 92, 5, 0.35);
        background: rgba(242, 92, 5, 0.08);
        width: 100%;
        box-sizing: border-box;
        font-size: 0.75rem;
        line-height: 1.3;
        color: #8c4a1e;
    }

    .mobile-flight-layover-place {
        min-width: 0;
        font-weight: 700;
    }

    .mobile-flight-layover-duration {
        text-align: right;
        white-space: nowrap;
        font-family: Courier Prime, monospace;
    }

    .mobile-flight-direction-chevron {
        transition: transform 160ms ease;
    }

    .mobile-flight-direction-card[open] .mobile-flight-direction-chevron {
        transform: rotate(180deg);
    }
}

/* Final mobile polish overrides (keep at file end for precedence) */
@media (max-width: 768px) {
    body:has(.result-container.visible) .mobile-flight-card-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        column-gap: 10px;
    }

    body:has(.result-container.visible) .mobile-flight-card-airline {
        display: flex;
        align-items: flex-start;
        min-width: 0;
        padding-top: 1px;
    }

    body:has(.result-container.visible) .mobile-flight-card-airline .airline-header-stack {
        gap: 2px;
    }

    body:has(.result-container.visible) .mobile-flight-card-airline .airline-header-line.with-logos {
        gap: 3px 7px;
    }

    body:has(.result-container.visible) .mobile-flight-card-airline .airline-chip-logo {
        width: 15px;
        height: 15px;
    }

    body:has(.result-container.visible) .mobile-flight-card-airline .airline-chip-name {
        max-width: 145px;
        font-size: 10.5px;
        line-height: 1.12;
    }

    body:has(.result-container.visible) .mobile-flight-card-airline .airline-header-line.names-only {
        font-size: 9.5px;
        line-height: 1.08;
        color: #55606b;
    }

    body:has(.result-container.visible) .mobile-flight-trip-tiles {
        gap: 7px;
    }

    body:has(.result-container.visible) .mobile-flight-trip-tile {
        padding: 9px 10px 8px;
        border-radius: 11px;
        border-color: rgba(31, 78, 91, 0.12);
        box-shadow: none;
    }

    body:has(.result-container.visible) .mobile-flight-segment-top {
        font-size: 12px;
    }

    body:has(.result-container.visible) .mobile-flight-segment-duration {
        font-size: 10px;
        letter-spacing: 0.04em;
    }

    body:has(.result-container.visible) .mobile-flight-route-main {
        font-size: 10px;
        color: #4b5563;
    }

    body:has(.result-container.visible) .mobile-flight-route-connector {
        font-size: 8px;
        padding: 1px 4px;
    }

    body:has(.result-container.visible) .mobile-flight-segment-meta {
        font-size: 9px;
        letter-spacing: 0.06em;
        gap: 5px;
    }

    body:has(.result-container.visible) .flight-price-tag {
        min-width: 52px;
        padding: 0.29rem 0.44rem;
        border-radius: 6px;
        font-size: 0.74rem;
        font-weight: 700;
        line-height: 1;
        align-self: start;
        justify-self: end;
        margin-top: 0;
    }

    .modal-content.is-expanded {
        height: 92vh;
    }

    .mobile-flight-modal-grabber {
        width: 42px;
        height: 4px;
        margin: 9px auto 7px;
        border-radius: 4px;
        background: rgba(26, 26, 26, 0.24);
    }

    .mobile-flight-modal-route-title {
        font-size: 24px;
        line-height: 0.98;
        letter-spacing: -0.02em;
    }

    .mobile-flight-modal-price {
        display: inline-block;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        color: #f25c05;
        font-family: Courier Prime, monospace;
        font-size: 17px;
        font-weight: 700;
        white-space: nowrap;
    }

    .mobile-flight-direction-header {
        min-height: 46px;
        padding: 9px 10px;
        margin-bottom: 0;
    }

    .mobile-flight-direction-meta {
        margin-top: 4px;
        font-family: Courier Prime, monospace;
        font-size: 9px;
        color: #5b6473;
        letter-spacing: 0.03em;
        line-height: 1.3;
    }

    .mobile-flight-direction-card > summary {
        list-style: none;
    }

    .mobile-flight-direction-card > summary::-webkit-details-marker {
        display: none;
    }

    .mobile-flight-direction-chevron {
        transition: transform 160ms ease;
    }

    .mobile-flight-direction-card[open] .mobile-flight-direction-chevron {
        transform: rotate(180deg);
    }

    .mobile-flight-direction-body {
        padding: 8px 9px 9px;
        background: #fbfcfc;
        display: flex;
        flex-direction: column;
        gap: 0.55rem;
    }

    .mobile-flight-leg-row {
        display: grid;
        grid-template-columns: minmax(54px, auto) minmax(0, 1fr) minmax(66px, auto);
        gap: 9px;
        align-items: center;
        padding: 10px;
        border-top: 1px dashed rgba(26, 26, 26, 0.12);
        background: #fff;
        width: 100%;
        box-sizing: border-box;
        border-radius: 9px;
    }

    .mobile-flight-leg-row:first-child {
        border-top: none;
    }

    .mobile-flight-leg-code {
        font-family: Courier Prime, monospace;
        font-size: 10px;
        color: #1f4e5b;
        font-weight: 700;
        white-space: nowrap;
    }

    .mobile-flight-leg-route {
        min-width: 0;
        font-size: 11px;
        line-height: 1.3;
        color: #3b4250;
        overflow-wrap: anywhere;
    }

    .mobile-flight-leg-date {
        margin-top: 2px;
        font-family: Courier Prime, monospace;
        font-size: 9px;
        color: #7a808c;
        letter-spacing: 0.02em;
    }

    .mobile-flight-leg-right {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        text-align: right;
        white-space: nowrap;
    }

    .mobile-flight-leg-duration {
        font-family: Courier Prime, monospace;
        font-size: 10px;
        color: #596170;
    }

    .mobile-flight-leg-aircraft {
        margin-top: 1px;
        font-family: Courier Prime, monospace;
        font-size: 9px;
        color: #7a808c;
    }

    .mobile-flight-layover-row {
        padding: 8px 10px;
        border-radius: 10px;
        border: 1px dashed rgba(242, 92, 5, 0.35);
        background: rgba(242, 92, 5, 0.08);
        font-size: 10px;
        line-height: 1.3;
        color: #8c4a1e;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        text-align: left;
        width: 100%;
        box-sizing: border-box;
    }

    .mobile-flight-layover-place {
        font-weight: 700;
    }

    .mobile-flight-layover-duration {
        white-space: nowrap;
    }

    .mobile-flight-tariff-card,
    .tariff-card {
        margin-bottom: 9px;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(31, 78, 91, 0.06);
    }

    .tariff-title {
        font-size: 12px;
    }

    .tariff-price {
        font-family: Courier Prime, monospace;
        font-size: 12px;
    }

    .seller-item.compact,
    .mobile-flight-seller-row {
        font-size: 11px;
    }

    .seller-name,
    .seller-price {
        font-size: 11px;
    }
}

/* Mobile consistency pass: keep cards/details stable across direct and multi-stop itineraries */
@media (max-width: 768px) {
    body:has(.result-container.visible) .mobile-flight-segment-tile {
        display: grid;
        gap: 0.28rem;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    body:has(.result-container.visible) .mobile-flight-segment-times {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 0.35rem;
        align-items: start;
    }

    body:has(.result-container.visible) .mobile-flight-segment-endpoint {
        min-width: 0;
        display: inline-flex;
        flex-direction: row;
        align-items: baseline;
        gap: 4px;
    }

    body:has(.result-container.visible) .mobile-flight-segment-endpoint.is-arrival {
        justify-content: flex-end;
        text-align: right;
    }

    body:has(.result-container.visible) .mobile-flight-segment-endpoint.is-departure {
        align-items: flex-start;
        text-align: left;
    }

    body:has(.result-container.visible) .mobile-flight-segment-time {
        font-family: Courier Prime, monospace;
        font-size: 12px;
        line-height: 1.1;
        font-weight: 700;
        color: #2f3745;
        white-space: nowrap;
    }

    body:has(.result-container.visible) .mobile-flight-segment-date {
        font-family: Courier Prime, monospace;
        font-size: 9px;
        line-height: 1.15;
        color: #6b7280;
        letter-spacing: 0.02em;
        white-space: nowrap;
    }

    body:has(.result-container.visible) .mobile-flight-segment-route {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.3rem;
        min-width: 0;
    }

    body:has(.result-container.visible) .mobile-flight-route-main {
        flex: 1 1 auto;
        min-width: 0;
        font-family: Space Grotesk, sans-serif;
        font-size: 10px;
        line-height: 1.24;
        font-weight: 700;
        color: #4b5563;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center;
    }

    body:has(.result-container.visible) .mobile-flight-route-arrow {
        flex: 0 0 auto;
        color: #9ca3af;
        font-size: 10px;
        line-height: 1;
    }

    body:has(.result-container.visible) .mobile-flight-route-connector {
        flex: 0 1 auto;
        min-width: 0;
        max-width: 48%;
        padding: 1px 4px;
        border: 1px dashed rgba(242, 92, 5, 0.32);
        border-radius: 999px;
        background: #fff8f1;
        font-family: Courier Prime, monospace;
        font-size: 8px;
        line-height: 1.12;
        color: #8b4a1f;
        letter-spacing: 0.03em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-transform: uppercase;
        text-align: center;
    }

    body:has(.result-container.visible) .mobile-flight-segment-meta {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.28rem;
        font-family: Courier Prime, monospace;
        font-size: 9px;
        line-height: 1.15;
        color: #5d6470;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        white-space: nowrap;
    }

    body:has(.result-container.visible) .mobile-flight-segment-stops {
        color: #4f5665;
    }

    body:has(.result-container.visible) .mobile-flight-segment-duration-inline {
        color: #8b4a1f;
        font-weight: 700;
    }

    .mobile-flight-direction-body {
        padding: 8px 9px 9px;
        background: #fbfcfc;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .mobile-flight-leg-row {
        display: grid;
        grid-template-columns: minmax(44px, auto) minmax(0, 1fr) minmax(88px, auto);
        align-items: start;
        gap: 7px;
        padding: 8px 10px;
        border: 1px solid rgba(26, 26, 26, 0.12);
        border-radius: 10px;
        background: #fff;
        width: 100%;
        box-sizing: border-box;
    }

    .mobile-flight-leg-code {
        font-family: Courier Prime, monospace;
        font-size: 9px;
        line-height: 1.2;
        color: #1f4e5b;
        font-weight: 700;
        white-space: nowrap;
    }

    .mobile-flight-leg-route {
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
    }

    .mobile-flight-leg-route-line {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        gap: 6px;
        min-width: 0;
    }

    .mobile-flight-leg-route-part {
        min-width: 0;
        font-size: 9px;
        line-height: 1.2;
        color: #364152;
        font-weight: 600;
        white-space: nowrap;
        overflow: visible;
        text-overflow: clip;
    }

    .mobile-flight-leg-route-part.is-arrival {
        text-align: right;
    }

    .mobile-flight-leg-date-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: center;
        gap: 6px;
        min-width: 0;
    }

    .mobile-flight-leg-date {
        margin-top: 1px;
        display: block;
        font-family: Courier Prime, monospace;
        font-size: 8px;
        line-height: 1.15;
        color: #7a808c;
        letter-spacing: 0.02em;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .mobile-flight-leg-date.is-arrival {
        text-align: right;
    }

    .mobile-flight-leg-route-arrow {
        color: #7f8793;
        font-size: 11px;
        line-height: 1;
    }

    .mobile-flight-leg-right {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: flex-start;
        text-align: right;
        max-width: 88px;
        min-width: 0;
    }

    .mobile-flight-leg-duration {
        font-family: Courier Prime, monospace;
        font-size: 9px;
        line-height: 1.2;
        color: #596170;
    }

    .mobile-flight-leg-aircraft {
        margin-top: 2px;
        font-family: Courier Prime, monospace;
        font-size: 8px;
        line-height: 1.15;
        color: #7a808c;
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-flight-layover-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
        padding: 8px 10px;
        border-radius: 10px;
        border: 1px dashed rgba(242, 92, 5, 0.35);
        background: rgba(242, 92, 5, 0.08);
        width: 100%;
        box-sizing: border-box;
        font-size: 10px;
        line-height: 1.3;
        color: #8c4a1e;
    }

    .mobile-flight-layover-place {
        min-width: 0;
        font-weight: 700;
    }

    .mobile-flight-layover-duration {
        text-align: right;
        white-space: nowrap;
        font-family: Courier Prime, monospace;
    }
}
