:root {
    --bg: #f4f7fb;
    --surface: rgba(255, 255, 255, 0.86);
    --surface-solid: #ffffff;
    --surface-strong: #eef4ff;
    --primary: #6a87c9;
    --primary-deep: #33549f;
    --primary-soft: #dce7ff;
    --text: #16213e;
    --text-soft: #5c6787;
    /* Aliases referenced across chat markdown, dashboard, auth and guide UI. */
    --heading: #16213e;
    --muted: #5c6787;
    --font-heading: "Plus Jakarta Sans", "Manrope", sans-serif;
    --danger: #dc2626;
    --line: rgba(51, 84, 159, 0.22);
    /* Layered: a tight near-shadow defines the edge, a soft ambient one gives
       depth — so blocks read clearly against the light background. */
    --shadow: 0 1px 2px rgba(42, 71, 131, 0.10), 0 6px 16px rgba(42, 71, 131, 0.12), 0 20px 44px rgba(42, 71, 131, 0.12);
    --shadow-sm: 0 1px 2px rgba(42, 71, 131, 0.08), 0 4px 12px rgba(42, 71, 131, 0.10);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --max-width: 1280px;
}

* {
    box-sizing: border-box;
}

/* `[hidden]` must always win. Class rules like `.mode-switch { display: grid }`
   otherwise override the UA `[hidden] { display: none }`, leaving controls
   visible after we set the attribute (e.g. the saved-trip read-only view). */
[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(106, 135, 201, 0.18), transparent 32%),
        radial-gradient(circle at bottom right, rgba(90, 162, 223, 0.16), transparent 28%),
        var(--bg);
    color: var(--text);
    font-family: "Manrope", sans-serif;
}

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

/* Visible keyboard focus for every interactive control (mouse clicks stay clean
   via :focus-visible). Previously only text inputs had a focus indicator. */
a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--primary-deep);
    outline-offset: 2px;
    border-radius: 6px;
}

/* Respect users who prefer reduced motion. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

.page-shell {
    min-height: 100vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 18px 20px 0;
}

.nav-bar {
    width: min(var(--max-width), 100%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
    border-radius: 999px;
}

.brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: fit-content;
}

.brand-mark {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand-mark span {
    color: var(--primary);
}

.brand-tag {
    color: var(--text-soft);
    font-size: 0.78rem;
}

.nav-links,
.nav-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-links a {
    color: var(--text-soft);
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--primary-deep);
}

.nav-cta,
.primary-button,
.ghost-button {
    border-radius: 999px;
    border: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-cta,
.primary-button {
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    color: white;
    box-shadow: 0 12px 24px rgba(51, 84, 159, 0.25);
}

.nav-cta {
    padding: 12px 18px;
    font-weight: 700;
}

.language-select {
    border: 1px solid var(--line);
    background: white;
    color: var(--text);
    border-radius: 999px;
    padding: 12px 16px;
}

.nav-toggle {
    display: none;
    border: 0;
    background: white;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    color: var(--primary-deep);
    box-shadow: 0 8px 18px rgba(45, 68, 118, 0.14);
}

.hero,
.destinations-section,
.insights-section,
.results-page,
.chat-page,
.guides-page {
    width: min(var(--max-width), calc(100% - 40px));
    margin: 0 auto;
}

.hero {
    position: relative;
    padding: 48px 0 72px;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    border-radius: var(--radius-xl);
}

.hero-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(18px);
}

.hero-orb-primary {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(106, 135, 201, 0.52), rgba(106, 135, 201, 0));
    top: 10%;
    left: -8%;
}

.hero-orb-secondary {
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(55, 103, 193, 0.28), rgba(55, 103, 193, 0));
    right: -8%;
    bottom: 10%;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(106, 135, 201, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(106, 135, 201, 0.08) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1), transparent 85%);
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 480px);
    gap: 32px;
    align-items: center;
}

.hero-copy {
    padding: 48px 16px 48px 0;
}

.eyebrow,
.panel-kicker {
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--primary-deep);
}

.hero-copy h1,
.results-hero h1 {
    margin: 0;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: clamp(2.7rem, 5vw, 5.8rem);
    line-height: 0.96;
    letter-spacing: -0.05em;
}

.hero-text,
.results-hero p,
.search-hint,
.insight-card p,
.destination-card__body h3,
.results-subtle,
.bundle-card p,
.trip-card p,
.itinerary-card p {
    color: var(--text-soft);
    line-height: 1.65;
}

.hero-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.highlight-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: 0 12px 24px rgba(51, 84, 159, 0.08);
    font-weight: 700;
}

.search-panel,
.destination-card,
.insight-card,
.summary-strip,
.bundle-card,
.trip-card,
.itinerary-card {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.search-panel {
    padding: 26px;
    border-radius: var(--radius-xl);
}

.search-panel-header,
.search-status__header,
.results-hero,
.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.search-panel-header h2,
.section-heading h2,
.section-heading--compact h2 {
    margin: 0;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: clamp(1.45rem, 2vw, 2rem);
    letter-spacing: -0.04em;
}

.panel-chip,
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-deep);
    font-size: 0.82rem;
    font-weight: 700;
}

/* Travel reel: the search-panel chip. At rest it shows one plane + a label; when
   a search starts (`.is-searching`, toggled by home.js) it plays a travel
   sequence — icons wave through in order under a shimmer sweep — and the label
   cycles through phase "sets". Nothing animates until the search begins. */
.travel-reel { position: relative; overflow: hidden; }
.travel-reel__track { display: inline-flex; align-items: center; gap: 6px; }
.travel-reel__track i {
    font-size: 0.98rem;
    opacity: 0.4;
    width: auto;
    transition: opacity 0.3s ease, max-width 0.3s ease, margin 0.3s ease;
}
.travel-reel__label { position: relative; z-index: 1; transition: opacity 0.2s ease; }
.travel-reel__label.is-swapping { opacity: 0; }

/* At rest: keep the compact look — only the plane shows. */
.travel-reel:not(.is-searching) .travel-reel__track i {
    opacity: 0;
    max-width: 0;
    margin: 0;
    overflow: hidden;
}
.travel-reel:not(.is-searching) .travel-reel__track i:first-child {
    opacity: 0.9;
    max-width: 1.4em;
}

/* Searching: each icon lifts + brightens in sequence (a travelling wave). */
.travel-reel.is-searching .travel-reel__track i {
    animation: bb-reel-wave 1.5s ease-in-out infinite;
}
.travel-reel.is-searching .travel-reel__track i:nth-child(1) { animation-delay: 0s; }
.travel-reel.is-searching .travel-reel__track i:nth-child(2) { animation-delay: 0.18s; }
.travel-reel.is-searching .travel-reel__track i:nth-child(3) { animation-delay: 0.36s; }
.travel-reel.is-searching .travel-reel__track i:nth-child(4) { animation-delay: 0.54s; }
@keyframes bb-reel-wave {
    0%, 100% { opacity: 0.35; transform: translateY(0); }
    30%      { opacity: 1;    transform: translateY(-3px); }
}

/* A light sweep across the chip so it reads as "playing" (reuses bb-shimmer). */
.travel-reel.is-searching::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
    transform: translateX(-100%);
    animation: bb-shimmer 1.5s linear infinite;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .travel-reel.is-searching .travel-reel__track i,
    .travel-reel.is-searching::after { animation: none; }
}

.mode-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 24px 0 20px;
    padding: 6px;
    background: var(--surface-strong);
    border-radius: 999px;
}

.mode-switch__button {
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-soft);
    padding: 12px 14px;
    font-weight: 700;
    transition: background 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                color 0.2s ease,
                box-shadow 0.28s ease,
                transform 0.18s ease;
}
.mode-switch__button:not(.is-active):hover { color: var(--primary-deep); }

.mode-switch__button.is-active {
    background: white;
    color: var(--primary-deep);
    box-shadow: 0 8px 18px rgba(51, 84, 159, 0.12);
}
.mode-switch__button.is-active { animation: bb-pop-in 0.28s cubic-bezier(0.22, 1, 0.36, 1); }

.trip-form {
    display: grid;
    gap: 18px;
}

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

.field {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field span {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
}

.field input,
.field select {
    width: 100%;
    border: 1px solid var(--line);
    background: white;
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus {
    border-color: rgba(51, 84, 159, 0.38);
    box-shadow: 0 0 0 5px rgba(106, 135, 201, 0.14);
}

.typeahead {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    z-index: 20;
    padding: 8px;
    border-radius: 18px;
    background: white;
    border: 1px solid var(--line);
    box-shadow: 0 18px 32px rgba(36, 54, 100, 0.18);
}

.typeahead.is-visible {
    display: block;
}

.typeahead button {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    border-radius: 12px;
    padding: 12px 14px;
    color: var(--text);
}

.typeahead button:hover {
    background: var(--surface-strong);
}

.search-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.search-hint {
    margin: 0;
    max-width: 32ch;
    font-size: 0.95rem;
}

.primary-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    font-weight: 800;
}

.primary-button:hover,
.ghost-button:hover,
.nav-cta:hover {
    transform: translateY(-1px);
}

.ghost-button {
    padding: 11px 15px;
    background: rgba(106, 135, 201, 0.08);
    color: var(--primary-deep);
    font-weight: 700;
}

.search-status {
    margin-top: 16px;
    padding: 18px;
    border-radius: var(--radius-lg);
    background: var(--surface-strong);
}

.progress-bar {
    position: relative;
    height: 10px;
    margin: 20px 0 14px;
    border-radius: 999px;
    background: rgba(51, 84, 159, 0.12);
}

.progress-bar span {
    position: relative;
    display: block;
    height: 100%;
    width: 15%;
    border-radius: inherit;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary), #88a5e5);
    transition: width 0.3s ease;
}
.progress-bar span::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    transform: translateX(-100%);
}
.search-status.is-loading .progress-bar span::after {
    animation: bb-shimmer 1.4s linear infinite;
}
.progress-bar__flyer {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate(-12px, -50%);
    color: var(--primary-deep);
    font-size: 1rem;
    opacity: 0;
}
.search-status.is-loading .progress-bar__flyer {
    animation: bb-fly 2.6s ease-in-out infinite;
}
@keyframes bb-shimmer { to { transform: translateX(100%); } }
@keyframes bb-fly {
    0% { left: 0; opacity: 0; }
    12% { opacity: 1; }
    88% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

/* Travel-themed loader strip + rotating fact line. */
.trip-loader {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 12px;
}
.trip-loader__icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.72);
    color: var(--primary-deep);
    font-size: 1rem;
    box-shadow: 0 6px 14px rgba(48, 72, 124, 0.1);
}
.search-status.is-loading .trip-loader__icon { animation: bb-bob 1.4s ease-in-out infinite; }
.trip-loader__icon:nth-child(1) { animation-delay: 0s; }
.trip-loader__icon:nth-child(2) { animation-delay: 0.18s; }
.trip-loader__icon:nth-child(3) { animation-delay: 0.36s; }
.trip-loader__icon:nth-child(4) { animation-delay: 0.54s; }
@keyframes bb-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
.status-fact-in { animation: bb-fade-up 0.4s ease; }

/* Error state of the search panel — inline, no popups. */
.search-status.is-error .trip-loader,
.search-status.is-error .progress-bar__flyer { display: none; }
.search-status.is-error #status-message { color: #b91c1c; font-weight: 600; }
.search-status.is-error .status-chip { background: rgba(220, 38, 38, 0.12); color: #b91c1c; }
.search-status.is-error .progress-bar span { background: var(--danger); }

/* Inline form note (used by auth + others instead of alert popups). */
.form-note {
    margin: 4px 0 0;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
}
.form-note--error { background: rgba(220, 38, 38, 0.1); color: #b91c1c; }

.destinations-section,
.insights-section,
.itinerary-section {
    padding: 24px 0 72px;
}

.chat-page,
.guides-page {
    padding: 40px 0 80px;
}

.chat-hero,
.guides-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 24px;
    align-items: start;
    margin-bottom: 28px;
}

.chat-context-card,
.guide-search-panel,
.chat-shell {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    border-radius: var(--radius-xl);
}

.chat-context-card,
.guide-search-panel {
    padding: 24px;
}

.chat-context-card textarea {
    width: 100%;
    min-height: 170px;
    border: 1px solid var(--line);
    background: white;
    color: var(--text);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    resize: vertical;
    outline: none;
}

.chat-context-card__chips,
.guide-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.chat-shell {
    padding: 24px;
    display: grid;
    gap: 18px;
}

.chat-thread {
    display: grid;
    gap: 16px;
    max-height: 62vh;
    overflow-y: auto;
    padding-right: 6px;
}

.chat-message {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.chat-message--user {
    flex-direction: row-reverse;
}

.chat-avatar {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    color: white;
    font-size: 1.1rem;
    flex: 0 0 auto;
}

.chat-bubble {
    max-width: min(720px, 100%);
    min-width: 0;
    padding: 16px 18px;
    border-radius: 22px;
    background: rgba(106, 135, 201, 0.08);
    /* Long words, URLs and CJK/Devanagari/Arabic strings must wrap, never spill. */
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* The message row is flex; without min-width:0 a long bubble forces overflow. */
.chat-message { min-width: 0; }
.chat-message > .chat-bubble { flex: 1 1 auto; }

.chat-message--user .chat-bubble {
    background: rgba(51, 84, 159, 0.12);
}

.chat-author {
    margin: 0 0 8px;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--primary-deep);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.chat-bubble p:last-child {
    margin: 0;
}

/* ── Standalone chat markdown rendering ── */
.chat-markdown {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.chat-markdown > :first-child {
    margin-top: 0;
}

.chat-markdown > :last-child {
    margin-bottom: 0;
}

.chat-markdown p,
.chat-markdown ul,
.chat-markdown ol,
.chat-markdown h1,
.chat-markdown h2,
.chat-markdown h3,
.chat-markdown h4 {
    margin: 0.5em 0;
}

.chat-markdown h1,
.chat-markdown h2,
.chat-markdown h3 {
    font-family: var(--font-heading);
    color: var(--primary-deep);
    line-height: 1.3;
}

.chat-markdown h1 { font-size: 1.2rem; }
.chat-markdown h2 { font-size: 1.1rem; }
.chat-markdown h3 { font-size: 1rem; font-weight: 700; }
.chat-markdown h4 { font-size: 0.95rem; font-weight: 700; }

.chat-markdown ul,
.chat-markdown ol {
    padding-left: 1.4em;
}

.chat-markdown li {
    margin-bottom: 0.25em;
    line-height: 1.55;
}

.chat-markdown li::marker {
    color: var(--primary);
}

.chat-markdown strong {
    font-weight: 700;
    color: var(--heading);
}

.chat-markdown em {
    font-style: italic;
}

.chat-markdown a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.chat-markdown code {
    background: rgba(106, 135, 201, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.88em;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.chat-markdown pre {
    background: rgba(15, 23, 42, 0.06);
    border-radius: 10px;
    padding: 12px 16px;
    overflow-x: auto;
    margin: 0.6em 0;
}

.chat-markdown pre code {
    background: none;
    padding: 0;
    font-size: 0.85em;
}

.chat-markdown blockquote {
    border-left: 3px solid var(--primary);
    padding: 6px 14px;
    margin: 0.6em 0;
    background: rgba(106, 135, 201, 0.06);
    border-radius: 0 8px 8px 0;
    color: var(--muted);
    font-style: italic;
}

.chat-markdown hr {
    border: none;
    border-top: 1px solid var(--line);
    margin: 0.8em 0;
}

/* Wide tables scroll inside their own box; the page never scrolls sideways. */
.chat-markdown table {
    display: block;
    width: max-content;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    margin: 0.6em 0;
    font-size: 0.9em;
}

.chat-markdown th,
.chat-markdown td {
    padding: 6px 10px;
    border: 1px solid var(--line);
    text-align: left;
}

.chat-markdown th {
    background: rgba(106, 135, 201, 0.1);
    font-weight: 700;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.chat-composer {
    display: grid;
    gap: 16px;
}

.field--full textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: white;
    color: var(--text);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    resize: vertical;
    outline: none;
}

.chat-composer__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.guides-results-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.guides-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.guide-card__top {
    display: flex;
    gap: 14px;
    align-items: center;
}

.guide-avatar {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(106, 135, 201, 0.12);
    color: var(--primary-deep);
    font-size: 1.35rem;
}

.guide-card__chips span {
    padding: 8px 11px;
    border-radius: 999px;
    background: rgba(106, 135, 201, 0.08);
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 700;
}

.guide-empty-card {
    text-align: center;
}

.guide-card__actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
}

.guide-book-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    font-size: 0.92rem;
}

.guide-card__status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 0.85rem;
}

.guide-card__status--verified {
    color: #1e7a46;
}

.guide-card__status--verified i {
    color: #22a55d;
}

/* --- Guide register section --- */

.guide-register-section {
    margin-top: 56px;
    padding-top: 40px;
    border-top: 1px solid var(--line);
}

.guide-status-banner {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.92rem;
    animation: fadeSlideIn 0.3s ease;
}

.guide-status-banner--success {
    background: rgba(34, 165, 93, 0.1);
    color: #1e7a46;
    border: 1px solid rgba(34, 165, 93, 0.2);
}

.guide-status-banner--error {
    background: rgba(220, 53, 69, 0.08);
    color: #b52a37;
    border: 1px solid rgba(220, 53, 69, 0.18);
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Booking dialog --- */

.booking-dialog {
    border: none;
    border-radius: var(--radius-xl);
    padding: 0;
    max-width: 480px;
    width: 90vw;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(24px);
    box-shadow: 0 32px 80px rgba(35, 57, 103, 0.28);
    animation: dialogIn 0.25s ease;
}

.booking-dialog::backdrop {
    background: rgba(20, 30, 55, 0.45);
    backdrop-filter: blur(4px);
}

.booking-dialog__content {
    padding: 28px;
    display: grid;
    gap: 20px;
}

@keyframes dialogIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.form-grid--guide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.destination-grid,
.insight-grid,
.results-layout,
.itinerary-grid,
.card-stack {
    display: grid;
    gap: 20px;
}

.destination-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.destination-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.destination-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}

.destination-card__body {
    padding: 20px;
}

.destination-card__body p {
    margin: 0 0 6px;
    color: var(--primary-deep);
    font-weight: 800;
}

.destination-card__body h3 {
    margin: 0 0 18px;
    font-size: 1.15rem;
    color: var(--text);
}

.insight-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.insight-card {
    padding: 24px;
    border-radius: var(--radius-lg);
}

.insight-card span {
    display: inline-block;
    color: var(--primary);
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 2rem;
    font-weight: 800;
}

.insight-card h3 {
    margin: 18px 0 10px;
    font-size: 1.25rem;
}

.results-page {
    padding: 40px 0 80px;
}

.trip-chat-launcher {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 70;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    color: white;
    font-weight: 800;
    box-shadow: 0 18px 36px rgba(51, 84, 159, 0.28);
}

.trip-chat-widget {
    position: fixed;
    right: 22px;
    bottom: 92px;
    z-index: 71;
    width: min(420px, calc(100vw - 24px));
    max-height: min(78vh, 760px);
    display: grid;
    gap: 16px;
    padding: 20px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.76);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    box-shadow: 0 24px 60px rgba(35, 57, 103, 0.22);
}

.trip-chat-widget[hidden] {
    display: none !important;
}

.trip-chat-widget__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.trip-chat-widget__header h2 {
    margin: 0;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 1.35rem;
    letter-spacing: -0.04em;
}

.trip-chat-widget__close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(106, 135, 201, 0.1);
    color: var(--primary-deep);
}

.trip-chat-widget__summary {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(106, 135, 201, 0.08);
    color: var(--text-soft);
    line-height: 1.6;
}

.trip-chat-widget__thread {
    min-height: 220px;
    max-height: 340px;
    overflow-y: auto;
    display: grid;
    gap: 14px;
    padding-right: 4px;
}

.trip-chat-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.trip-chat-message--user {
    flex-direction: row-reverse;
}

.trip-chat-message__avatar {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    color: white;
    flex: 0 0 auto;
}

.trip-chat-message__bubble {
    max-width: min(320px, 100%);
    min-width: 0;
    padding: 14px 16px;
    border-radius: 20px;
    background: rgba(106, 135, 201, 0.08);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.trip-chat-message__markdown {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.trip-chat-message__markdown table {
    display: block;
    width: max-content;
    max-width: 100%;
    overflow-x: auto;
}

.trip-chat-message__markdown pre {
    overflow-x: auto;
}

.trip-chat-message--user .trip-chat-message__bubble {
    background: rgba(51, 84, 159, 0.12);
}

.trip-chat-message__author {
    margin: 0 0 8px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary-deep);
}

.trip-chat-message__markdown > :first-child {
    margin-top: 0;
}

.trip-chat-message__markdown > :last-child {
    margin-bottom: 0;
}

.trip-chat-message__markdown p,
.trip-chat-message__markdown ul,
.trip-chat-message__markdown ol,
.trip-chat-message__markdown h1,
.trip-chat-message__markdown h2,
.trip-chat-message__markdown h3,
.trip-chat-message__markdown h4 {
    color: var(--text);
}

.trip-chat-message__markdown ul,
.trip-chat-message__markdown ol {
    padding-left: 18px;
}

.trip-chat-widget__form {
    display: grid;
    gap: 12px;
}

.trip-chat-widget__form textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: white;
    color: var(--text);
    border-radius: 18px;
    padding: 14px 16px;
    resize: vertical;
    outline: none;
}

.trip-chat-widget__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.results-hero {
    margin-bottom: 24px;
}

.results-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.summary-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
    padding: 16px;
    border-radius: var(--radius-lg);
}

.summary-tile {
    padding: 16px;
    border-radius: var(--radius-md);
    background: rgba(106, 135, 201, 0.08);
}

.summary-tile p,
.summary-tile h3 {
    margin: 0;
}

.summary-tile p {
    color: var(--text-soft);
    font-size: 0.88rem;
}

.summary-tile h3 {
    margin-top: 8px;
    font-size: 1.05rem;
}

.bundle-preview {
    margin-bottom: 24px;
}

.travel-panel,
.trip-card,
.itinerary-card {
    padding: 22px;
    border-radius: var(--radius-lg);
}

.travel-panel {
    display: grid;
    gap: 18px;
}

.travel-panel__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.travel-panel__top h2 {
    margin: 0;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: clamp(1.4rem, 2vw, 1.9rem);
    letter-spacing: -0.04em;
}

.travel-panel__intro {
    margin: 0;
    max-width: 34ch;
    color: var(--text-soft);
    line-height: 1.65;
}

.travel-panel__rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 1fr);
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(51, 84, 159, 0.25) transparent;
}

.travel-panel__rail--single {
    grid-auto-columns: minmax(0, 1fr);
}

.travel-panel__card {
    min-width: 0;
    padding: 20px;
    border-radius: 26px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.travel-panel__card--flight {
    background: linear-gradient(180deg, rgba(234, 241, 255, 0.96), rgba(221, 233, 255, 0.9));
}

.travel-panel__card--train {
    background: linear-gradient(180deg, rgba(238, 248, 255, 0.96), rgba(221, 243, 255, 0.9));
}

.travel-panel__card--stay {
    background: linear-gradient(180deg, rgba(245, 241, 255, 0.96), rgba(235, 229, 255, 0.9));
}

.travel-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.travel-panel__header h3,
.trip-card h3,
.itinerary-card h3 {
    margin: 0 0 8px;
}

.travel-panel__price {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--primary-deep);
    font-weight: 800;
    white-space: nowrap;
}

.travel-panel__route {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: center;
    margin: 16px 0 14px;
}

.travel-panel__route p,
.travel-panel__route small,
.travel-panel__route-mid small,
.travel-panel__note {
    margin: 0;
}

.travel-panel__route strong {
    display: block;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 1.08rem;
    color: var(--text);
}

.travel-panel__route small,
.travel-panel__route-mid small {
    color: var(--text-soft);
}

.travel-panel__route-mid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.travel-panel__route-mid span {
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--primary-deep);
    font-size: 0.82rem;
    font-weight: 700;
}

.travel-panel__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.travel-panel__chips span {
    padding: 8px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 700;
}

.travel-panel__stay {
    display: grid;
    grid-template-columns: 98px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    margin-top: 14px;
}

.travel-panel__stay img {
    width: 98px;
    height: 98px;
    object-fit: cover;
    border-radius: 22px;
}

.travel-panel__stay-copy {
    min-width: 0;
}

.travel-panel__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.results-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.85fr);
    align-items: start;
    margin-bottom: 32px;
}

.results-layout[hidden] {
    display: none;
}

.results-column {
    display: grid;
    gap: 20px;
}

.results-column--secondary {
    position: sticky;
    top: 112px;
}

.section-heading--compact {
    margin-bottom: 0;
}

.card-stack {
    grid-template-columns: 1fr;
}

.trip-card__meta,
.trip-card__route,
.trip-card__footer,
.hotel-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.trip-card__route {
    margin: 14px 0;
    justify-content: space-between;
}

.trip-card__route strong {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 1.1rem;
}

.trip-card__meta span,
.trip-card__footer span,
.hotel-card__meta span {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(106, 135, 201, 0.08);
    color: var(--text-soft);
    font-size: 0.86rem;
    font-weight: 700;
}

.trip-card__price {
    color: var(--primary-deep);
    font-size: 1.2rem;
    font-weight: 800;
}

.hotel-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
}

.hotel-card img {
    width: 96px;
    height: 96px;
    border-radius: 20px;
    object-fit: cover;
}

.itinerary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.itinerary-card {
    display: grid;
    gap: 14px;
}

.itinerary-card img {
    width: 100%;
    height: 220px;
    border-radius: 20px;
    object-fit: cover;
}

/* ---- Map badge ---------------------------------------------------------- */
.map-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 3px 9px 3px 7px;
    border-radius: 999px;
    background: rgba(106, 135, 201, 0.12);
    color: var(--primary-deep);
    font-size: 0.74rem;
    font-weight: 700;
    text-decoration: none;
    vertical-align: middle;
    transition: background 0.15s ease, transform 0.15s ease;
}
.map-badge i {
    font-size: 0.92rem;
}
.map-badge:hover {
    background: var(--primary-soft);
    transform: translateY(-1px);
}

/* ---- Quick Pick journey timeline ---------------------------------------- */
.journey-wrap {
    margin-bottom: 32px;
}
.journey {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.74);
    box-shadow: var(--shadow);
    border-radius: var(--radius-xl);
    padding: 26px;
    display: grid;
    gap: 22px;
}
.journey--compact {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin-top: 18px;
}
.journey__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}
.journey__head h2 {
    margin: 4px 0 0;
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 2vw, 1.9rem);
    letter-spacing: -0.04em;
}
.journey__intro {
    margin: 0;
    max-width: 42ch;
    color: var(--text-soft);
    line-height: 1.6;
}

.journey-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 16px;
}
.journey-leg {
    position: relative;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}
/* connecting line behind the nodes */
.journey-leg:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 22px;
    top: 46px;
    bottom: -16px;
    width: 2px;
    background: linear-gradient(var(--primary-soft), rgba(106, 135, 201, 0.25));
}
.journey-leg--cab:not(:last-child)::before,
.journey-leg--cab::before {
    background-image: linear-gradient(rgba(224, 133, 43, 0.55) 55%, transparent 0);
    background-size: 2px 12px;
    background-repeat: repeat-y;
}
.journey-leg__node {
    position: relative;
    z-index: 1;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
    box-shadow: 0 10px 22px rgba(48, 72, 124, 0.22);
}
.journey-leg--flight .journey-leg__node { background: linear-gradient(135deg, #6a87c9, #33549f); }
.journey-leg--train .journey-leg__node { background: linear-gradient(135deg, #4fb3c7, #2f7f96); }
.journey-leg--cab .journey-leg__node {
    background: linear-gradient(135deg, #f0a85a, #e0852b);
    box-shadow: 0 10px 22px rgba(224, 133, 43, 0.28);
}
.journey-leg--stay .journey-leg__node { background: linear-gradient(135deg, #9a7ad6, #7a5ad6); }

.journey-leg__card {
    min-width: 0;
    padding: 18px 20px;
    border-radius: var(--radius-lg);
    background: var(--surface-solid);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}
.journey-leg--flight .journey-leg__card { background: linear-gradient(180deg, rgba(234, 241, 255, 0.9), #fff); }
.journey-leg--train .journey-leg__card { background: linear-gradient(180deg, rgba(231, 248, 252, 0.9), #fff); }
.journey-leg--stay .journey-leg__card { background: linear-gradient(180deg, rgba(245, 241, 255, 0.9), #fff); }
.journey-leg__card--cab { background: linear-gradient(180deg, rgba(253, 243, 230, 0.95), #fff); }

.journey-leg__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}
.journey-leg__top h3 {
    margin: 2px 0 0;
    font-size: 1.08rem;
}
.journey-leg__price {
    display: inline-flex;
    align-items: center;
    padding: 8px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    color: var(--primary-deep);
    font-weight: 800;
    white-space: nowrap;
}
.journey-leg__points {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center;
    margin: 16px 0 4px;
}
.journey-point p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-soft);
}
.journey-point strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--text);
    margin: 2px 0;
}
.journey-point__date {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-soft);
    margin-bottom: 4px;
}
.journey-point__place {
    font-size: 0.86rem;
    color: var(--text-soft);
}
.journey__dest {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 12px 0 0;
    font-weight: 700;
    color: var(--primary-deep);
}
.journey__dest i {
    font-size: 1.05rem;
}
.journey-leg__link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(106, 135, 201, 0.12);
    color: var(--primary-deep);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}
.journey-leg__via {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: rgba(106, 135, 201, 0.07);
}
.journey-leg__via-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-deep);
    font-size: 0.8rem;
    font-weight: 800;
}
.journey-leg__layover {
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(224, 133, 43, 0.14);
    color: #b45309;
    font-size: 0.8rem;
    font-weight: 700;
}
.wizard-option__via {
    flex-basis: 100%;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #b45309;
}
.journey-leg__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.journey-leg__chips span {
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(106, 135, 201, 0.08);
    color: var(--text-soft);
    font-size: 0.8rem;
    font-weight: 700;
}
.journey-leg__stay {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    margin-top: 14px;
}
.journey-leg__stay img {
    width: 104px;
    height: 104px;
    border-radius: 18px;
    object-fit: cover;
}
.journey-leg__stay-copy { min-width: 0; }
.journey-leg__stay-copy .results-subtle { margin: 6px 0 12px; }
.journey-leg__cta {
    display: inline-flex;
    align-items: center;
}
.journey__foot {
    display: flex;
    justify-content: flex-end;
    padding-top: 4px;
}

.journey--empty {
    display: flex;
    align-items: center;
    gap: 20px;
}
.journey__empty-icon {
    flex: none;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    color: var(--primary-deep);
    background: var(--primary-soft);
}

/* ---- Manual wizard ------------------------------------------------------ */
.wizard {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.74);
    box-shadow: var(--shadow);
    border-radius: var(--radius-xl);
    padding: 26px;
    margin-bottom: 32px;
    display: grid;
    gap: 22px;
}
.wizard__steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.wizard__step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 8px 8px;
    border-radius: 999px;
    background: var(--surface-strong);
    color: var(--text-soft);
    font-weight: 700;
    font-size: 0.9rem;
}
.wizard__step.is-active {
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    color: #fff;
}
.wizard__step.is-done { color: var(--primary-deep); }
.wizard__step-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
    color: var(--primary-deep);
    font-size: 0.82rem;
    font-weight: 800;
}
.wizard__step.is-active .wizard__step-dot { background: rgba(255, 255, 255, 0.92); }

.wizard__options {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}
.wizard__sub {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 18px 0 0;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--primary-deep);
}
.wizard__sub:first-of-type { margin-top: 8px; }
.wizard-option {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    text-align: left;
    padding: 16px 18px;
    border-radius: var(--radius-lg);
    background: var(--surface-solid);
    border: 1.5px solid rgba(106, 135, 201, 0.16);
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.wizard-option.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(106, 135, 201, 0.05);
    border-style: dashed;
}
.wizard-option.is-disabled:hover {
    transform: none;
    box-shadow: none;
}
.wizard-option__warn {
    flex-basis: 100%;
    margin: 2px 0 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #b45309;
}
.wizard__note,
.wizard__hint {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 4px;
    padding: 11px 15px;
    border-radius: var(--radius-sm);
    background: rgba(106, 135, 201, 0.1);
    color: var(--primary-deep);
    font-size: 0.9rem;
    font-weight: 600;
}
.wizard__hint {
    background: rgba(31, 157, 99, 0.1);
    color: #157a4c;
    margin-bottom: 14px;
}

/* Loading skeletons shown while trains/hotels stream in (progressive manual). */
.wizard-option--skeleton {
    display: block;
    height: 86px;
    position: relative;
    overflow: hidden;
    pointer-events: none;
    cursor: default;
    border-style: dashed;
    background: rgba(106, 135, 201, 0.06);
}
.wizard-option--skeleton span {
    display: block;
    height: 14px;
    margin: 14px 0;
    border-radius: 6px;
    background: rgba(106, 135, 201, 0.16);
}
.wizard-option--skeleton span:first-child { width: 42%; }
.wizard-option--skeleton span:last-child { width: 68%; }
.wizard-option--skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: translateX(-100%);
    animation: bb-shimmer 1.3s linear infinite;
}
.wizard-option:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(48, 72, 124, 0.1);
}
.wizard-option.is-selected {
    border-color: var(--primary-deep);
    box-shadow: 0 0 0 3px var(--primary-soft);
}
.wizard-option__main { min-width: 0; flex: 1; }
.wizard-option__head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}
.wizard-option__head strong { font-size: 1.02rem; }
.wizard-option__tag {
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(106, 135, 201, 0.1);
    color: var(--text-soft);
    font-size: 0.76rem;
    font-weight: 700;
}
.wizard-option__route {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 10px;
}
.wizard-option__route b {
    font-family: var(--font-heading);
    font-size: 1.05rem;
}
.wizard-option__route small {
    display: block;
    color: var(--text-soft);
    font-size: 0.8rem;
}
.wizard-option__dur {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--primary-deep);
    font-size: 0.82rem;
    font-weight: 700;
}
.wizard-option__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.wizard-option__chips span {
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(106, 135, 201, 0.08);
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 700;
}
.wizard-option__stay {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}
.wizard-option__stay img {
    width: 84px;
    height: 84px;
    border-radius: 16px;
    object-fit: cover;
}
.wizard-option__stay strong { font-size: 1rem; }
.wizard-option__stay .results-subtle { margin: 2px 0 8px; }
.wizard-option__side {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}
.wizard-option__price {
    color: var(--primary-deep);
    font-size: 1.15rem;
    font-weight: 800;
    white-space: nowrap;
}
.wizard-option__check {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-soft);
}
.wizard-option.is-selected .wizard-option__check { color: var(--primary-deep); }
.wizard-option__check i { opacity: 0.35; }
.wizard-option.is-selected .wizard-option__check i { opacity: 1; }

.wizard__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-top: 4px;
}

@media (max-width: 640px) {
    .journey-leg__points { grid-template-columns: 1fr; gap: 8px; text-align: left; }
    .journey-leg__link { flex-direction: row; align-self: start; }
    .wizard-option { flex-direction: column; align-items: stretch; }
    .wizard-option__side { flex-direction: row; align-items: center; justify-content: space-between; }
}

.nav-links--static {
    margin-left: auto;
}

@media (max-width: 1100px) {
    .hero-content,
    .results-layout,
    .destination-grid,
    .insight-grid,
    .itinerary-grid,
    .guides-grid,
    .summary-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .results-column--secondary {
        position: static;
    }
}

@media (max-width: 860px) {
    .site-header {
        padding-inline: 14px;
    }

    .nav-bar {
        border-radius: 28px;
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        padding-top: 6px;
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-actions {
        width: 100%;
        justify-content: space-between;
    }

    .hero,
    .destinations-section,
    .insights-section,
    .results-page,
    .chat-page,
    .guides-page {
        width: min(var(--max-width), calc(100% - 28px));
    }

    .hero-content,
    .results-layout,
    .chat-hero,
    .guides-hero,
    .destination-grid,
    .insight-grid,
    .itinerary-grid,
    .guides-grid,
    .summary-strip,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        padding-right: 0;
    }

    .search-actions,
    .results-hero,
    .guides-results-header,
    .chat-composer__actions,
    .section-heading,
    .search-panel-header,
    .search-status__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .primary-button {
        width: 100%;
        justify-content: center;
    }

    .results-actions {
        width: 100%;
    }

    .results-actions .mode-switch__button {
        flex: 1 1 auto;
    }

    .trip-chat-widget {
        right: 14px;
        bottom: 86px;
        width: calc(100vw - 28px);
    }

    .trip-chat-widget__actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .travel-panel__top {
        flex-direction: column;
    }

    .travel-panel__route {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .travel-panel__route-mid {
        align-items: flex-start;
    }
}

@media (max-width: 560px) {
    .nav-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero {
        padding-top: 28px;
    }

    .hero-copy h1,
    .results-hero h1 {
        font-size: 2.45rem;
    }

    .search-panel,
    .bundle-card,
    .trip-card,
    .itinerary-card,
    .insight-card,
    .destination-card__body {
        padding: 18px;
    }

    .destination-card img,
    .itinerary-card img {
        height: 190px;
    }

    .hotel-card {
        grid-template-columns: 1fr;
    }

    .travel-panel__header {
        flex-direction: column;
    }

    .travel-panel__stay {
        grid-template-columns: 1fr;
    }

    .trip-chat-launcher {
        right: 14px;
        left: 14px;
        justify-content: center;
    }

    .trip-chat-widget {
        right: 14px;
        left: 14px;
        width: auto;
        max-height: 72vh;
    }
}

/* --- Guide reviews + booking quote --- */
.guide-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.guide-rating--empty {
    opacity: 0.7;
}
.guide-reviews {
    margin: 10px 0;
    display: grid;
    gap: 8px;
}
.guide-review {
    font-size: 0.85rem;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(36, 54, 100, 0.05);
}
.guide-review strong {
    margin-right: 6px;
}
.guide-review p {
    margin: 4px 0 0;
    color: var(--text-soft, #5c6787);
}
.guide-review-form {
    margin-top: 12px;
    display: grid;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--line, rgba(36, 54, 100, 0.12));
}
.guide-review-status {
    margin: 0;
}
.booking-quote {
    margin: 12px 0;
    display: grid;
    gap: 6px;
    font-size: 0.92rem;
}
.booking-quote__row {
    display: flex;
    justify-content: space-between;
    color: var(--text-soft, #5c6787);
}
.booking-quote__total {
    font-weight: 700;
    color: inherit;
    padding-top: 6px;
    border-top: 1px solid var(--line, rgba(36, 54, 100, 0.12));
}
.primary-button.is-saved {
    background: #10b981;
    border-color: #10b981;
}
.travel-panel__warning {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 16px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: rgba(220, 38, 38, 0.08);
    color: #b91c1c;
    font-size: 0.92rem;
    line-height: 1.4;
}
.travel-panel__warning i {
    margin-top: 2px;
}

/* ======================================================================== */
/* Motion: subtle, purposeful. One orchestrated entrance per view + slide   */
/* transitions on mode/step changes. All disabled under reduced-motion.     */
/* ======================================================================== */
@keyframes bb-fade-up {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}
@keyframes bb-slide-in {
    from { opacity: 0; transform: translateX(22px); }
    to   { opacity: 1; transform: none; }
}
@keyframes bb-pop-in {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: none; }
}

/* Mode switch (Quick Pick <-> Customize) and wizard steps slide in. */
.view-anim { animation: bb-slide-in 0.34s cubic-bezier(0.22, 1, 0.36, 1); }
.wizard__body { animation: bb-slide-in 0.3s cubic-bezier(0.22, 1, 0.36, 1); }

/* Journey legs reveal in a short stagger so the route reads top-to-bottom.
   `backwards` (not `both`) so the finished animation doesn't lock transform and
   block the :hover lift. */
.journey-timeline .journey-leg { animation: bb-fade-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
.journey-timeline .journey-leg:nth-child(1) { animation-delay: 0.04s; }
.journey-timeline .journey-leg:nth-child(2) { animation-delay: 0.12s; }
.journey-timeline .journey-leg:nth-child(3) { animation-delay: 0.20s; }
.journey-timeline .journey-leg:nth-child(4) { animation-delay: 0.28s; }
.journey-timeline .journey-leg:nth-child(5) { animation-delay: 0.36s; }

/* Entrance for these cards is handled by the scroll-reveal system (data-reveal
   in motion.js). An always-on `animation: … both` here would (a) fire on load
   instead of on scroll and (b) lock `transform` via its fill state, which beats
   the cascade and kills the :hover lift. So only .summary-tile (not reveal-
   tagged) keeps a plain entrance, with `backwards` so hover still works. */
.summary-tile { animation: bb-fade-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards; }

/* Wizard option press feedback. */
.wizard-option:active { transform: scale(0.99); }
.mode-switch__button { transition: color 0.2s ease, background 0.2s ease; }

/* Cards lift consistently on hover (cheap, GPU-friendly). */
.trip-card,
.itinerary-card,
.destination-card,
.insight-card,
.guide-card {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.trip-card:hover,
.itinerary-card:hover,
.destination-card:hover,
.insight-card:hover,
.guide-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 48px rgba(42, 71, 131, 0.16);
}
/* (reduced-motion is already globally disabled near the top of this file) */

/* Dashboard saved-trip card footer (Open trip). */
.trip-card-footer {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: flex-end;
}

/* ======================================================================== */
/* Global UI polish — applies to every page (home, guides, dashboard, auth, */
/* chat, results). Motion is orchestrated + reveal-on-scroll; overflow-safe  */
/* for long multi-language strings. All disabled under reduced-motion.       */
/* ======================================================================== */

/* --- Multi-language overflow safety -------------------------------------- */
/* Text-bearing flex children need min-width:0 or a long translated string   */
/* forces the whole row to overflow sideways. Applied broadly + defensively. */
.brand,
.nav-bar,
.section-heading,
.hero-copy,
.trip-route,
.journey-leg,
.summary-tile,
.insight-card,
.destination-card,
.guide-card,
.itinerary-card,
.booking-card { min-width: 0; }

.section-heading h1,
.section-heading h2,
.section-heading h3,
.hero-copy h1,
.trip-route { overflow-wrap: anywhere; }

/* --- Reveal on scroll ---------------------------------------------------- */
/* JS (app.js) adds .is-revealed via one IntersectionObserver. If JS is off   */
/* or the element never observed, content stays visible (progressive).        */
[data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition:
        opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}
[data-reveal].is-revealed {
    opacity: 1;
    transform: none;
}
/* A reveal group only fades; its children carry the vertical stagger. */
[data-reveal][data-reveal-group] { transform: none; }
/* Staggered children within a revealed group read top-to-bottom. `backwards`
   so the held end-state doesn't beat the cascade and disable :hover transforms. */
[data-reveal-group].is-revealed > * {
    animation: bb-fade-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
[data-reveal-group].is-revealed > *:nth-child(1) { animation-delay: 0.04s; }
[data-reveal-group].is-revealed > *:nth-child(2) { animation-delay: 0.10s; }
[data-reveal-group].is-revealed > *:nth-child(3) { animation-delay: 0.16s; }
[data-reveal-group].is-revealed > *:nth-child(4) { animation-delay: 0.22s; }
[data-reveal-group].is-revealed > *:nth-child(5) { animation-delay: 0.28s; }
[data-reveal-group].is-revealed > *:nth-child(6) { animation-delay: 0.34s; }

/* --- Page-load entrance -------------------------------------------------- */
/* One orchestrated entrance per page: header drops in, main fades up.        */
.page-enter .site-header { animation: bb-fade-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; }
.page-enter main { animation: bb-fade-up 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both; }

/* --- Sticky header: lifts on scroll ------------------------------------- */
.site-header { transition: padding 0.25s ease; }
.site-header .nav-bar { transition: box-shadow 0.25s ease, background 0.25s ease; }
.site-header.is-scrolled { padding-top: 10px; }
.site-header.is-scrolled .nav-bar {
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 34px rgba(42, 71, 131, 0.18);
}

/* --- Custom scrollbar (glass-blue theme) -------------------------------- */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(106, 135, 201, 0.5) transparent;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(106, 135, 201, 0.45);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(51, 84, 159, 0.6); background-clip: content-box; }

@media (prefers-reduced-motion: reduce) {
    [data-reveal] { opacity: 1; transform: none; transition: none; }
    .page-enter .site-header,
    .page-enter main { animation: none; }
}

/* ======================================================================== */
/* Dashboard — account overview (moved out of the template's inline <style>) */
/* ======================================================================== */
.dashboard-container {
    width: min(var(--max-width), 100%);
    margin: 0 auto;
    padding: 48px 20px 72px;
}

/* Compact stat strip under the welcome heading. */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin: 26px 0 8px;
}
.dashboard-stat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: var(--surface-solid);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    min-width: 0;
}
.dashboard-stat__icon {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 1.35rem;
    color: var(--primary-deep);
    background: var(--primary-soft);
}
.dashboard-stat__value {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--heading);
}
.dashboard-stat__label {
    font-size: 0.85rem;
    color: var(--text-soft);
    margin-top: 4px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    margin-top: 30px;
    align-items: start;
}
@media (max-width: 900px) {
    .dashboard-grid { grid-template-columns: 1fr; }
}

.dashboard-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    padding: 26px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    min-width: 0;
}
.dashboard-panel__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.dashboard-panel__head h3 {
    margin: 0;
    font-family: var(--font-heading);
    color: var(--heading);
    font-size: 1.15rem;
}
.dashboard-panel__head i { color: var(--primary); font-size: 1.25rem; }
.count-badge {
    margin-left: auto;
    min-width: 26px;
    height: 26px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-deep);
    font-size: 0.82rem;
    font-weight: 800;
}

/* Trip cards inside the dashboard. */
.dashboard-panel .trip-card {
    background: var(--surface-solid);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}
.dashboard-panel .trip-card:last-child { margin-bottom: 0; }
.trip-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}
.trip-route {
    font-family: var(--font-heading);
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--heading);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    overflow-wrap: anywhere;
}
.trip-card-body p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
    color: var(--text-soft);
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.trip-card-body p i { color: var(--primary); flex: 0 0 auto; }

.booking-card {
    background: var(--surface-solid);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    border: 1px solid var(--line);
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}
.booking-card:last-child { margin-bottom: 0; }
.booking-card p { margin: 0; overflow-wrap: anywhere; }

.empty-state {
    padding: 44px 28px;
    text-align: center;
    background: var(--surface-strong);
    border-radius: var(--radius-lg);
    color: var(--text-soft);
}
.empty-state i {
    font-size: 2.6rem;
    color: var(--primary);
    margin-bottom: 14px;
    display: block;
}

/* ======================================================================== */
/* Auth — branded two-panel card (moved out of the template's inline <style>) */
/* ======================================================================== */
.auth-main {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
}
.auth-card {
    width: min(940px, 100%);
    display: grid;
    grid-template-columns: 1.02fr 0.98fr;
    background: var(--surface);
    backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* Left visual panel — carries the brand and the value story. */
.auth-aside {
    position: relative;
    padding: 46px 40px;
    color: #fff;
    background: linear-gradient(155deg, var(--primary), var(--primary-deep));
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 22px;
    overflow: hidden;
    min-width: 0;
}
.auth-aside__orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(10px);
    pointer-events: none;
}
.auth-aside__orb--a {
    width: 260px; height: 260px; top: -70px; right: -60px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 70%);
}
.auth-aside__orb--b {
    width: 220px; height: 220px; bottom: -80px; left: -50px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 70%);
}
.auth-aside__brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}
.auth-aside__brand span { opacity: 0.85; }
.auth-aside__lead {
    position: relative;
    z-index: 1;
    font-family: var(--font-heading);
    font-size: 1.55rem;
    line-height: 1.28;
    font-weight: 700;
    margin: 0;
    overflow-wrap: anywhere;
}
.auth-aside__points {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 14px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
}
.auth-aside__points li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.98rem;
    font-weight: 600;
    min-width: 0;
}
.auth-aside__points i {
    flex: 0 0 auto;
    width: 34px; height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 1.1rem;
}

.auth-panel { padding: 46px 40px; min-width: 0; }
.auth-panel .section-heading { text-align: center; margin-bottom: 24px; }
.auth-panel .mode-switch { margin-bottom: 20px; }

@media (max-width: 820px) {
    .auth-card { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
    .auth-panel { padding: 38px 28px; }
}

/* ======================================================================== */
/* Results + trip-chat polish: smoother view switch, chat typing indicator,   */
/* streamed reply fade-in, clear-chat control, and interactive hover on the    */
/* journey / itinerary blocks.                                                 */
/* ======================================================================== */

/* Softer, vertical crossfade when switching Quick Pick <-> Customize. */
.view-anim { animation: bb-view-swap 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes bb-view-swap {
    from { opacity: 0; transform: translateY(12px) scale(0.995); }
    to   { opacity: 1; transform: none; }
}

/* Chat messages arrive with a gentle rise. */
.trip-chat-message { animation: bb-fade-up 0.34s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* Assistant "typing…" indicator (three bouncing dots). */
.trip-chat-typing {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 2px;
}
.trip-chat-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.55;
    animation: bb-typing 1.1s ease-in-out infinite;
}
.trip-chat-typing span:nth-child(2) { animation-delay: 0.16s; }
.trip-chat-typing span:nth-child(3) { animation-delay: 0.32s; }
@keyframes bb-typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30%           { transform: translateY(-5px); opacity: 0.95; }
}

/* Streamed reply words fade in as they land. */
.stream-word { opacity: 0; animation: bb-fade-in 0.28s ease forwards; }
@keyframes bb-fade-in { to { opacity: 1; } }

/* Chat header gets a Clear control beside Close. */
.trip-chat-widget__tools { display: flex; align-items: center; gap: 6px; }
.trip-chat-widget__clear {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text-soft);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.trip-chat-widget__clear:hover { color: var(--danger); border-color: rgba(220, 38, 38, 0.35); background: rgba(220, 38, 38, 0.06); }

/* Interactive hover on the journey legs + itinerary/hotel blocks (matches the
   home-page card feel — lift + accent edge). */
.journey-leg {
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease;
}
.journey-leg:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 44px rgba(42, 71, 131, 0.16);
}
.itinerary-card {
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease;
}
.itinerary-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 24px 50px rgba(42, 71, 131, 0.18);
}

/* Delete control on dashboard trip cards. */
.trip-card-footer { gap: 10px; }
.trip-delete-btn {
    color: var(--danger);
    border: 1px solid rgba(220, 38, 38, 0.25);
    background: transparent;
    border-radius: 999px;
    padding: 8px 16px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.trip-delete-btn:hover { background: rgba(220, 38, 38, 0.08); border-color: rgba(220, 38, 38, 0.5); }
