/* Mobile foundation — single, late-loaded contract for the first responsive pass. */
:root {
  --mobile-gutter: clamp(1rem, 5vw, 1.25rem);
  --mobile-control-height: 2.75rem;
  --mobile-radius: 1.15rem;
}

.pwa-install-banner[hidden] { display: none !important; }
@media (min-width: 761px) {
  .pwa-install-banner { display: none !important; }
}
@media (max-width: 760px) {
  /* The public /explore shell intentionally floats above the first hero. Keep
     the install prompt in its own opaque, viewport-anchored layer so header
     copy can never bleed through or compete with the prompt surface. */
  .pwa-install-banner {
    position: fixed;
    z-index: 110;
    top: calc(env(safe-area-inset-top) + 1rem);
    right: var(--mobile-gutter);
    left: var(--mobile-gutter);
    display: grid;
    gap: .85rem;
    width: auto;
    max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 2rem);
    margin: 0;
    padding: 1rem;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid rgba(35, 97, 88, .18);
    border-radius: var(--mobile-radius);
    background: linear-gradient(135deg, #e8f4ef, #fff9ed);
    box-shadow: 0 1.2rem 3rem rgba(24, 67, 64, .2);
    isolation: isolate;
    contain: paint;
  }
  .pwa-install-copy { min-width: 0; }
  .pwa-install-copy .eyebrow { margin: 0 0 .25rem; }
  .pwa-install-copy h2 { margin: 0; font-size: 1.08rem; line-height: 1.05; }
  .pwa-install-copy p:last-child { margin: .35rem 0 0; color: var(--muted); font-size: .82rem; line-height: 1.35; }
  .pwa-install-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
  .pwa-install-actions .button { min-height: var(--mobile-control-height); flex: 1 1 9rem; }
}

@media (max-width: 760px) {
  html,
  body { overflow-x: clip; }

  body { font-size: 16px; }

  /* Keep the brand recognizable while making the header two calm rows instead
     of squeezing brand, four links and language controls into one line. */
  .hero-shell.public-hero-shell { width: 100%; }
  .public-hero-shell .topbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand language" "nav nav";
    align-items: center;
    gap: .65rem .75rem;
    width: 100%;
    max-width: none;
    padding: .75rem var(--mobile-gutter) .8rem;
  }
  .public-hero-shell .brand {
    grid-area: brand;
    min-width: 0;
    gap: .6rem;
  }
  .public-hero-shell .brand-mark {
    flex: 0 0 2.55rem;
    width: 2.55rem;
    height: 2.55rem;
    overflow: hidden;
  }
  .public-hero-shell .brand-mark img { width: 100%; height: 100%; object-fit: contain; }
  .public-hero-shell .brand-name { font-size: .84rem; letter-spacing: .06em; }
  .public-hero-shell .brand .eyebrow { margin: .18rem 0 0; font-size: .53rem; letter-spacing: .1em; }
  .public-hero-shell .brand-copy { display: none; }
  .public-hero-shell .nav-links {
    grid-area: nav;
    display: flex;
    flex-wrap: nowrap;
    min-width: 0;
    gap: .35rem;
    overflow-x: auto;
    padding: .05rem 0 .1rem;
    scrollbar-width: none;
  }
  .public-hero-shell .nav-links::-webkit-scrollbar { display: none; }
  .public-hero-shell .nav-link {
    flex: 0 0 auto;
    min-height: var(--mobile-control-height);
    padding: .62rem .72rem;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: .65rem;
    font-size: .64rem;
    letter-spacing: .055em;
    line-height: 1.1;
  }
  body:not([data-active-page="discover"]) .public-hero-shell .nav-link { border-color: var(--line); }
  .public-hero-shell .language-switch {
    grid-area: language;
    display: inline-flex;
    justify-self: end;
    gap: .25rem;
    margin: 0;
  }
  .public-hero-shell .language-switch button {
    min-width: 2.45rem;
    min-height: 2.45rem;
    padding: .4rem .45rem;
    font-size: .62rem;
  }

  /* Home keeps the editorial image and typography, but no longer makes the
     phone scroll through a desktop-sized hero before the first action. */
  body[data-active-page="discover"] .premium-home-hero {
    min-height: min(790px, calc(100svh + 300px)) !important;
  }
  .premium-home-hero-content {
    width: 100%;
    padding: 9.6rem var(--mobile-gutter) 1.75rem;
  }
  .premium-home-hero h1 {
    max-width: 9ch;
    margin: .7rem 0 1rem;
    font-size: clamp(3rem, 14vw, 4.75rem);
    line-height: .91;
  }
  .premium-home-hero-lead {
    max-width: 34rem;
    font-size: .98rem;
    line-height: 1.5;
  }
  .premium-home-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: .55rem;
    margin-top: 1.25rem;
  }
  .premium-home-hero-actions .button {
    width: 100%;
    min-height: 3.1rem;
  }
  .premium-home-hero-trust {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin-top: 1.8rem;
  }
  .premium-home-hero-trust span {
    min-height: 5.4rem;
    padding: .7rem .6rem .65rem 0;
    border-right: 1px solid rgba(255,255,255,.2);
    border-bottom: 1px solid rgba(255,255,255,.2);
  }
  .premium-home-hero-trust span:nth-child(2n) { padding-left: .6rem; border-right: 0; }
  .premium-home-hero-trust span:last-child { grid-column: 1 / -1; padding-left: 0; border-right: 0; border-bottom: 0; }
  .premium-home-hero-trust strong { font-size: .68rem; }
  .premium-home-hero-trust small { font-size: .7rem; line-height: 1.15; }
  .premium-home-hero-trust em { color: rgba(255,255,255,.64); font-size: .66rem; line-height: 1.3; }

  /* Explore keeps the hero-first composition. The rail remains a visual card,
     not a row of unreadably small chips below a long image. */
  body[data-active-page="explore"] .discover-spotlight-layout { display: block; }
  body[data-active-page="explore"] .discover-spotlight-media { min-height: 0; }
  body[data-active-page="explore"] .destination-showcase-media {
    height: min(64svh, 520px) !important;
    min-height: 400px !important;
  }
  body[data-active-page="explore"] .destination-showcase-media .detail-hero {
    height: 100% !important;
    min-height: 400px !important;
    object-fit: cover !important;
  }
  body[data-active-page="explore"] .destination-showcase-overlay {
    left: var(--mobile-gutter);
    right: var(--mobile-gutter);
    bottom: 1.1rem;
    padding: 0;
  }
  body[data-active-page="explore"] .destination-showcase-overlay h3 {
    max-width: 11ch;
    font-size: clamp(2.25rem, 12vw, 4rem);
    line-height: .94;
  }
  body[data-active-page="explore"] .destination-showcase-overlay p {
    display: -webkit-box;
    max-width: 34ch;
    margin-top: .65rem;
    overflow: hidden;
    color: rgba(255,255,255,.82);
    font-size: .88rem;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }
  body[data-active-page="explore"] .discover-spotlight-rail {
    width: calc(100% - 2 * var(--mobile-gutter));
    margin: .8rem auto 0;
  }
  body[data-active-page="explore"] .discover-rail-card { padding: .8rem; border-radius: var(--mobile-radius); }
  body[data-active-page="explore"] .discover-rail-card .section-toolbar > div h3 { display: block; font-size: 1rem; }
  body[data-active-page="explore"] .destination-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
  }
  body[data-active-page="explore"] .destination-chip {
    grid-template-columns: 2.55rem minmax(0, 1fr);
    min-height: 3.9rem;
    padding: .4rem;
    gap: .5rem;
    border-radius: .8rem;
  }
  body[data-active-page="explore"] .destination-chip img { width: 2.55rem; height: 2.55rem; }
  body[data-active-page="explore"] .destination-chip strong { font-size: .72rem; line-height: 1.08; }
  body[data-active-page="explore"] .destination-chip small { font-size: .61rem; line-height: 1.2; }
  body[data-active-page="explore"] main.page > .explore-grid { padding-top: 1.1rem; padding-bottom: 2.5rem; }
  body[data-active-page="explore"] .filters { grid-template-columns: 1fr !important; }
  body[data-active-page="explore"] .catalog-grid { grid-template-columns: 1fr !important; }

  /* Pilot gets a compact, readable welcome panel instead of a tall image-only
     block. The copy is safe for the public /pilot login route; /ops has its own
     route marker and does not inherit this contract. */
  body[data-active-page="pilot"] .route-intro.route-intro-book {
    min-height: 300px !important;
    margin-bottom: 1.25rem;
    border-radius: 0 0 var(--mobile-radius) var(--mobile-radius);
  }
  body[data-active-page="pilot"] .route-intro.route-intro-book .route-intro-image {
    min-height: 0 !important;
  }

  /* Keep the Pilot photograph inside the exact mobile hero box. The previous
     full-viewport bleed used 100vw from inside the padded page; with a mobile
     scrollbar that made the image start/end outside the visible content box,
     exposing rounded/background slivers at both sides. */
  body[data-active-page="pilot"] .route-intro.route-intro-book {
    /* The route section sits inside a 2vw-padded page. Use the real page
       gutter, then take the hero to the layout viewport rather than adding
       another 4vw gutter. The previous formula was wider than its parent at
       tablet/mobile breakpoints and still left a scrollbar-side sliver. */
    width: 100vw !important;
    margin-left: calc(-1 * clamp(1rem, 2vw, 2rem)) !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
    min-height: clamp(20rem, 42svh, 24rem) !important;
  }
  body[data-active-page="pilot"] .route-intro.route-intro-book .route-intro-image {
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background-color: transparent;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
  }
  body[data-active-page="pilot"] .route-intro.route-intro-book .route-intro-copy {
    visibility: visible !important;
    display: flex;
    min-height: clamp(20rem, 42svh, 24rem) !important;
    justify-content: flex-end;
    padding: 5.5rem var(--mobile-gutter) 1.75rem;
    background: linear-gradient(180deg, rgba(23,49,61,.14), rgba(23,49,61,.94)) !important;
    color: #fff;
  }
  body[data-active-page="pilot"] .route-intro.route-intro-book .route-intro-copy .eyebrow { color: #b8d8ca; }
  body[data-active-page="pilot"] .route-intro.route-intro-book .route-intro-copy h1 {
    max-width: 10ch;
    margin-bottom: .7rem;
    color: #fff;
    font-size: clamp(2.45rem, 12vw, 4rem);
  }
  body[data-active-page="pilot"] .route-intro.route-intro-book .route-intro-copy p:not(.eyebrow) {
    max-width: 32ch;
    margin: 0;
    color: rgba(255,255,255,.78);
    line-height: 1.45;
  }

  /* About uses the same image-led language, but its previous 88svh minimum
     made the copy card dominate the phone. Keep enough room for the real
     heading/lead/actions while bringing it back into the shared mobile hero
     range. */
  body[data-active-page="about"] .about-hero-card,
  body[data-active-page="about"] .about-hero-copy {
    min-height: clamp(34rem, 76svh, 44rem) !important;
  }
  body[data-active-page="about"] .about-hero-copy {
    padding: 7rem 1.25rem 2rem;
  }
  body[data-active-page="about"] .about-hero-copy h1 {
    max-width: 8ch;
    font-size: clamp(2.8rem, 14vw, 4.8rem);
  }
  body[data-active-page="pilot"] main.page > .pilot-portal-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
    padding-top: 1rem;
    padding-bottom: 2.5rem;
  }
  body[data-active-page="pilot"] .pilot-auth-card,
  body[data-active-page="pilot"] .pilot-portal-grid .card {
    min-width: 0;
    border-radius: var(--mobile-radius);
  }
  body[data-active-page="pilot"] .pilot-auth-card { padding: 1rem; }
  body[data-active-page="pilot"] .pilot-access-grid { grid-template-columns: 1fr !important; }

  /* Shared mobile ergonomics: no clipped card content, no tiny controls, and a
     consistent vertical rhythm across authenticated and public surfaces. */
  .page > section,
  .page > section > *,
  .portal-grid .card,
  .explore-grid > * { min-width: 0; }
  .section-toolbar { align-items: flex-start; gap: .65rem; flex-wrap: wrap; }
  .button,
  button:not(.tiny-button),
  .nav-link,
  input,
  select,
  textarea { min-height: 2.75rem; }
  .button-wide { width: 100%; }
  .field-grid,
  .booking-input-layout,
  .booking-secondary-grid,
  .phone-field-grid { grid-template-columns: 1fr !important; }
  body[data-active-page="customer"] #customerAccountRegistrationForm .customer-registration-password-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .portal-grid .card { overflow: hidden; }
}

/* This file is loaded last. Keep the phone board readable even when a later
   legacy desktop restore rule in styles.css declares three equal columns. */
@media (max-width: 900px) {
  body[data-active-page="pilot"] .pilot-board-columns {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow-x: visible !important;
  }

  body[data-active-page="pilot"] .pilot-board-column {
    min-width: 0;
  }

  body[data-active-page="pilot"] .pilot-board-card .booking-row-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .tiny-button {
    min-height: 2.75rem;
    min-width: 2.75rem;
    padding: .65rem .85rem;
    white-space: normal;
    line-height: 1.2;
  }
}

/* Final mobile-only contract for the Pilot status rail. This file is loaded
   after the shared stylesheet, so keep the route-scoped swipe behavior here
   to prevent legacy one-column rules from winning the cascade. */
@media (max-width: 760px) {
  body[data-active-page="pilot"] .pilot-board-columns {
    grid-template-columns: repeat(3, 82vw) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    grid-auto-flow: column !important;
    grid-auto-columns: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }
}

/* Mobile PWA layer: the desktop catalogue remains the source of truth, while
   phones get a compact, touch-first rail and a safe-area-aware app nav. */
.mobile-explore-catalog,
.mobile-app-nav {
  display: none;
}

@media (max-width: 760px) {
  body[data-active-page]:not([data-active-page="ops"]):not([data-active-page="privacy"]) {
    padding-bottom: calc(5.7rem + env(safe-area-inset-bottom));
  }

  .mobile-app-nav {
    position: fixed;
    z-index: 60;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .25rem;
    padding: .45rem .55rem calc(.45rem + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(31, 72, 78, .14);
    background: rgba(249, 247, 241, .94);
    box-shadow: 0 -1rem 2.4rem rgba(24, 56, 62, .12);
    backdrop-filter: blur(18px) saturate(1.15);
  }

  .mobile-app-nav-link {
    display: grid;
    min-width: 0;
    min-height: 3.85rem;
    place-items: center;
    align-content: center;
    gap: .18rem;
    padding: .35rem .2rem;
    border-radius: 1rem;
    color: var(--muted);
    font-size: .66rem;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
  }

  .mobile-app-nav-link.is-active {
    color: var(--accent-strong);
    background: rgba(45, 159, 135, .12);
  }

  .mobile-app-nav-icon {
    display: grid;
    width: 2rem;
    height: 1.9rem;
    place-items: center;
    border-radius: .75rem;
    color: currentColor;
    font-size: 1.25rem;
    line-height: 1;
  }

  body[data-active-page="privacy"] .mobile-app-nav,
  body[data-active-page="ops"] .mobile-app-nav {
    display: none;
  }

  body[data-active-page="explore"] .mobile-explore-catalog {
    display: grid;
    gap: .9rem;
    padding: 1rem var(--mobile-gutter) 1.15rem;
    border-top: 1px solid rgba(31, 72, 78, .1);
    border-bottom: 1px solid rgba(31, 72, 78, .1);
    background: linear-gradient(180deg, rgba(235, 246, 242, .92), rgba(249, 247, 241, .7));
  }

  body[data-active-page="explore"] .discover-rail-card {
    display: none;
  }

  body[data-active-page="explore"] .catalog-column .catalog-grid {
    display: none !important;
  }

  .mobile-explore-catalog-head,
  .mobile-explore-catalog-group-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: .75rem;
  }

  .mobile-explore-catalog-head h3,
  .mobile-explore-catalog-group-head h4 {
    margin: .12rem 0 0;
    color: var(--editorial-ink, var(--ink));
    font-family: var(--font-display);
    font-size: 1.55rem;
    line-height: .95;
  }

  .mobile-explore-catalog-group-head h4 {
    font-size: 1.15rem;
  }

  .mobile-explore-catalog-count,
  .mobile-explore-catalog-status {
    display: inline-grid;
    min-width: 2.4rem;
    min-height: 2rem;
    place-items: center;
    padding: .25rem .55rem;
    border-radius: 999px;
    background: rgba(45, 159, 135, .14);
    color: var(--accent-strong);
    font-size: .72rem;
    font-weight: 800;
    white-space: nowrap;
  }

  .mobile-explore-catalog-group {
    display: grid;
    gap: .55rem;
    min-width: 0;
  }

  .mobile-explore-catalog-group-candidate {
    overflow: hidden;
    border: 1px solid rgba(31, 72, 78, .12);
    border-radius: 1rem;
    background: rgba(255, 255, 255, .48);
  }

  .mobile-explore-catalog-group-summary {
    display: flex;
    min-height: 3.4rem;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .65rem .8rem;
    cursor: pointer;
    list-style: none;
  }

  .mobile-explore-catalog-group-summary::-webkit-details-marker { display: none; }
  .mobile-explore-catalog-group-summary::after { content: '+'; display: grid; width: 2rem; height: 2rem; flex: 0 0 2rem; place-items: center; border-radius: 999px; background: rgba(45, 159, 135, .12); color: var(--accent-strong); font-size: 1.25rem; font-weight: 800; }
  .mobile-explore-catalog-group-candidate[open] .mobile-explore-catalog-group-summary::after { content: '−'; }
  .mobile-explore-catalog-group-summary > span:first-child { display: grid; gap: .18rem; min-width: 0; }
  .mobile-explore-catalog-group-summary strong { color: var(--editorial-ink, var(--ink)); font-family: var(--font-display); font-size: 1.05rem; line-height: 1; }
  .mobile-explore-catalog-group-summary small { color: var(--muted); font-size: .7rem; line-height: 1.25; }
  .mobile-explore-catalog-group-body { display: grid; gap: .55rem; padding: .15rem .75rem .75rem; border-top: 1px solid rgba(31, 72, 78, .1); }
  .mobile-explore-catalog-group-candidate .mobile-explore-catalog-group-head { justify-content: flex-end; }
  .mobile-explore-catalog-group-candidate .mobile-explore-catalog-group-head > div:first-child { display: none; }

  .mobile-explore-catalog-controls {
    display: flex;
    align-items: center;
    gap: .35rem;
  }

  .mobile-explore-catalog-controls .carousel-arrow {
    display: grid;
    width: 2.75rem;
    min-width: 2.75rem;
    height: 2.75rem;
    min-height: 2.75rem;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(31, 72, 78, .16);
    border-radius: 999px;
    background: rgba(255, 255, 255, .78);
    color: var(--ink);
    font-size: 1.15rem;
    font-weight: 800;
  }

  .mobile-explore-catalog-controls .carousel-arrow:disabled {
    opacity: .34;
    cursor: default;
  }

  .mobile-explore-catalog-track {
    display: flex;
    gap: .85rem;
    min-width: 0;
    padding: .1rem .1rem .7rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-padding-inline: .1rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    touch-action: pan-x;
  }

  .mobile-explore-catalog-track::-webkit-scrollbar {
    display: none;
  }

  .mobile-explore-slide {
    display: grid;
    flex: 0 0 min(82vw, 21rem);
    min-width: 0;
    min-height: 23.5rem;
    grid-template-rows: auto 1fr;
    overflow: hidden;
    scroll-snap-align: start;
    border: 1px solid rgba(31, 72, 78, .14);
    border-radius: 1.15rem;
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 .8rem 1.8rem rgba(25, 64, 68, .09);
    cursor: pointer;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  }

  .mobile-explore-slide:focus-visible,
  .mobile-explore-slide.is-selected {
    outline: none;
    border-color: rgba(217, 111, 43, .64);
    box-shadow: 0 1rem 2.2rem rgba(169, 91, 38, .16);
  }

  .mobile-explore-slide-media {
    position: relative;
    min-height: 9.5rem;
    padding: .55rem .55rem 0;
  }

  .mobile-explore-slide-media img {
    display: block;
    width: 100%;
    height: 9.1rem;
    object-fit: cover;
    border-radius: .85rem;
  }

  .mobile-explore-slide-status {
    position: absolute;
    top: 1rem;
    left: 1rem;
    max-width: calc(100% - 2rem);
    padding: .38rem .55rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .38);
    border-radius: 999px;
    background: rgba(19, 49, 58, .72);
    color: #fff;
    font-size: .63rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
    backdrop-filter: blur(10px);
  }

  .mobile-explore-slide-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: .42rem;
    padding: .7rem .9rem .9rem;
  }

  .mobile-explore-slide-copy .eyebrow {
    margin: 0;
    font-size: .63rem;
  }

  .mobile-explore-slide-copy h4 {
    margin: 0;
    color: var(--editorial-ink, var(--ink));
    font-family: var(--font-display);
    font-size: 1.45rem;
    line-height: .94;
  }

  .mobile-explore-slide-summary {
    display: -webkit-box;
    min-height: 2.7em;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .mobile-explore-slide-description {
    width: 100%;
    color: var(--muted);
  }

  .mobile-explore-slide-description summary {
    display: grid;
    gap: .22rem;
    cursor: pointer;
    list-style: none;
  }

  .mobile-explore-slide-description summary::-webkit-details-marker {
    display: none;
  }

  .mobile-explore-slide-description summary::after {
    content: 'Otvori ceo opis';
    color: var(--accent-strong);
    font-size: .66rem;
    font-weight: 800;
  }

  .mobile-explore-slide-description[open] summary::after {
    content: 'Sakrij opis';
  }

  .mobile-explore-slide-description-hint {
    display: none;
  }

  .mobile-explore-slide-description > p {
    margin: .38rem 0 0;
    font-size: .78rem;
    line-height: 1.38;
  }

  .mobile-explore-slide-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: auto;
    color: var(--accent-strong);
    font-size: .66rem;
    font-weight: 800;
  }

  .mobile-explore-slide-meta span {
    padding: .3rem .45rem;
    border-radius: 999px;
    background: rgba(45, 159, 135, .1);
  }

  .mobile-explore-slide .button {
    width: 100%;
    margin-top: .18rem;
  }

  .mobile-explore-slide-note {
    min-height: 2.75rem;
    padding-top: .35rem;
    color: var(--muted);
    font-size: .7rem;
    font-weight: 700;
    line-height: 1.25;
  }
}

@media (min-width: 761px) {
  .mobile-explore-catalog,
  .mobile-app-nav {
    display: none !important;
  }
}


/* Pilot assigned-takeoff editor: on phones the selected editor is the focus
   surface. Keep pagination above it and remove competing side previews; the
   desktop carousel geometry remains untouched. */
@media (max-width: 760px) {
  body[data-active-page="pilot"] #pilotAssignedSection {
    scroll-margin-bottom: calc(5.7rem + env(safe-area-inset-bottom));
  }

  body[data-active-page="pilot"] #pilotAssignedTakeoffs .pilot-carousel-featured {
    grid-template-columns: 44px minmax(0, 1fr) 44px !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    gap: .6rem !important;
    padding: .2rem 0 calc(1rem + env(safe-area-inset-bottom)) !important;
    overflow: visible !important;
    background: linear-gradient(145deg, rgba(232, 241, 238, .72), rgba(255, 250, 244, .98) 62%, rgba(241, 226, 202, .52));
  }

  body[data-active-page="pilot"] #pilotAssignedTakeoffs .pilot-carousel-featured .pilot-carousel-nav {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    grid-template-columns: 44px minmax(0, 1fr) 44px !important;
    width: 100%;
    min-height: 2.75rem;
    gap: .55rem;
  }

  body[data-active-page="pilot"] #pilotAssignedTakeoffs .pilot-carousel-featured .pilot-carousel-nav .carousel-arrow {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }

  body[data-active-page="pilot"] #pilotAssignedTakeoffs .pilot-carousel-featured .pilot-carousel-nav span {
    justify-self: center;
    min-height: 2rem;
    padding: .4rem .8rem;
    font-size: .68rem;
  }

  body[data-active-page="pilot"] #pilotAssignedTakeoffs .pilot-carousel-featured .pilot-carousel-neighbor {
    display: flex !important;
    position: relative !important;
    inset: auto !important;
    grid-row: 1 !important;
    width: 100% !important;
    min-width: 0;
    min-height: 100%;
    padding: .45rem .3rem;
    opacity: .82;
    filter: saturate(.8);
    transform: none !important;
  }

  body[data-active-page="pilot"] #pilotAssignedTakeoffs .pilot-carousel-featured .pilot-carousel-neighbor-previous { grid-column: 1 !important; }
  body[data-active-page="pilot"] #pilotAssignedTakeoffs .pilot-carousel-featured .pilot-carousel-neighbor-next { grid-column: 3 !important; }

  body[data-active-page="pilot"] #pilotAssignedTakeoffs .pilot-carousel-featured .pilot-carousel-neighbor-spacer {
    display: none !important;
  }

  body[data-active-page="pilot"] #pilotAssignedTakeoffs .pilot-carousel-featured .pilot-carousel-card {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 100% !important;
    max-width: none !important;
    padding: 1rem !important;
    border: 2px solid rgba(45, 159, 135, .52);
    border-radius: 1rem;
    box-shadow: 0 .9rem 1.8rem rgba(23, 52, 60, .14), 0 0 0 .24rem rgba(45, 159, 135, .1);
  }

  body[data-active-page="pilot"] #pilotAssignedTakeoffs .assigned-takeoff-name {
    font-size: clamp(1.35rem, 5.5vw, 1.8rem);
  }

  body[data-active-page="pilot"] #pilotAssignedTakeoffs .assigned-takeoff-location {
    font-size: .78rem;
  }

  body[data-active-page="pilot"] #pilotAssignedTakeoffs .assigned-takeoff-card .pilot-form-section {
    gap: .65rem;
    padding: .8rem;
    border-radius: .75rem;
  }

  body[data-active-page="pilot"] #pilotAssignedTakeoffs .assigned-takeoff-card .pilot-form-section-heading strong {
    font-size: .74rem;
  }

  body[data-active-page="pilot"] #pilotAssignedTakeoffs .assigned-takeoff-card .pilot-form-section-heading small {
    font-size: .66rem;
  }

  body[data-active-page="pilot"] #pilotAssignedTakeoffs .assigned-takeoff-card textarea {
    min-height: 2.8rem;
    padding: .55rem .62rem;
    font-size: .82rem;
    line-height: 1.4;
  }

  body[data-active-page="pilot"] #pilotAssignedTakeoffs .assigned-takeoff-card .field-summary textarea {
    min-height: 3.7rem;
  }

  body[data-active-page="pilot"] #pilotAssignedTakeoffs .assigned-takeoff-card .field-description textarea {
    min-height: 6rem;
  }

  body[data-active-page="pilot"] #pilotAssignedTakeoffs .assigned-takeoff-card .pilot-tracklog-dropzone {
    padding: .75rem;
  }
}

/* Customer's shared header had enough width at desktop but its right-aligned
   mobile links pushed the first item outside the viewport at 390px. Compact
   only that route's mobile nav so all links remain visible and balanced. */
@media (max-width: 560px) {
  body[data-active-page="customer"] .nav-links {
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: .1rem;
    overflow-x: visible;
  }
  body[data-active-page="customer"] .nav-link {
    flex: 1 1 auto;
    min-width: 0;
    padding-inline: .25rem;
    font-size: .62rem;
    letter-spacing: .04em;
    white-space: nowrap;
  }
}

/* Pilot hero correction: the route section sits inside the padded page, so
   100vw made it wider than the layout viewport and exposed side strips. The
   rounded border/shadow also created a second frame around the artwork. Keep
   the page gutter for the portal below, but make only this hero span the
   content viewport exactly. */
body[data-active-page="pilot"] .route-intro.route-intro-book {
  --pilot-page-gutter: clamp(1rem, 2vw, 2rem);
  width: calc(100% + 2 * var(--pilot-page-gutter)) !important;
  max-width: none !important;
  margin-left: calc(-1 * var(--pilot-page-gutter)) !important;
  margin-right: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body[data-active-page="pilot"] .route-intro.route-intro-book .route-intro-image,
body[data-active-page="pilot"] .route-intro.route-intro-book .route-intro-copy {
  width: 100%;
  border-radius: 0;
}

/* The late Pilot/Ops hero parity block centered the shared header inside an
   80rem rounded surface. That surface is a second visible frame over the
   full-bleed artwork, especially obvious at mobile widths. Keep the header's
   readable gradient and controls, but let it span the same clean viewport as
   the hero. */
body[data-active-page="pilot"] .public-hero-shell .topbar {
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  transform: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
