/* Native phone rails keep related cards together and show the next item. */
.structured-rail-tools {display:none;}
.gallery-page .copy-mobile {display:none;}
.gallery-page .copy-desktop {display:contents;}

@media(max-width:639px) {
  #website-fit .owner-fit-grid,
  #working-together .project-flow-list,
  .customer-ad-path #advertising-journey.ad-path,
  .community-disclosure .community-collage,
  .video-gallery {
    display:flex;position:relative;flex-wrap:nowrap;justify-content:flex-start;
    align-items:stretch;gap:14px;width:100%;max-width:none;min-width:0;
    margin:0;padding:3px 1px 12px;overflow-x:auto;overflow-y:hidden;
    overscroll-behavior-x:contain;scroll-snap-type:x mandatory;
    scroll-padding-inline:1px;scrollbar-width:thin;
    scrollbar-color:#a4c4ba transparent;-webkit-overflow-scrolling:touch;
    touch-action:pan-x pan-y;
  }
  #website-fit .owner-fit-grid::after,
  #working-together .project-flow-list::after,
  .customer-ad-path #advertising-journey.ad-path::after,
  .community-disclosure .community-collage::after,
  .video-gallery::after {content:'';flex:0 0 max(0px,calc(12% - 14px));}

  #website-fit .owner-fit-grid>.owner-fit-card,
  #working-together .project-flow-list>li,
  .customer-ad-path #advertising-journey>.ad-path-step,
  .community-disclosure .community-collage>.community-photo,
  .video-gallery>.video-card {
    flex:0 0 88%;width:88%;max-width:none;min-width:0;
    grid-column:auto;grid-row:auto;margin:0;scroll-snap-align:start;
    scroll-margin-inline:1px;transform:none;
  }
  #website-fit .owner-fit-grid {align-items:flex-start;}
  #website-fit .owner-fit-card summary {min-height:112px;padding:18px;}
  #website-fit .owner-fit-card summary h3 {font-size:20px;line-height:1.3;}
  #website-fit .owner-fit-card>p {padding-inline:18px;}
  #website-fit .owner-fit-card>a {padding-inline:18px;}

  #working-together .process-steps {min-width:0;width:100%;}
  #working-together .project-flow-list>li {padding:0;}
  #working-together .project-flow-list>li::before,
  #working-together .project-flow-list>li::after {display:none;}
  #working-together .flow-number {left:18px;top:18px;width:32px;height:32px;font-size:17px;}
  #working-together .flow-card {padding:18px;gap:12px;}
  #working-together .flow-duration {margin-left:44px;min-height:32px;}
  #working-together .flow-card h3 {font-size:21px;line-height:1.25;}
  #working-together .flow-card p {font-size:16px;line-height:1.5;}

  .customer-ad-path #advertising-journey>.ad-path-step {display:flex;flex-direction:column;}
  .customer-ad-path #advertising-journey>.ad-path-step::before {display:none;}
  #advertising-journey .ad-path-heading {padding:17px 14px;}
  #advertising-journey .ad-path-heading h3 {font-size:20px;}
  #advertising-journey .ad-path-visual {grid-column:auto;grid-row:auto;padding:18px 12px;border-left:0;}
  #advertising-journey .ad-path-caption {grid-column:auto;min-height:0;margin:0;padding:14px;font-size:13px;}
  #advertising-journey .ad-path-phone {width:154px;}
  #advertising-journey .ad-path-detail-screen {height:270px;}
  #advertising-journey .google-ad-headline {overflow-wrap:anywhere;}

  .community-disclosure .community-collage {padding-bottom:12px;}
  .community-disclosure .community-collage>.community-photo:nth-child(n) {
    grid-column:auto;grid-row:auto;aspect-ratio:4/3;border-radius:12px;
  }
  .community-disclosure .community-photo img {object-fit:cover;}

  /* Existing carousels retain their controls and gain a visible next-card edge. */
  #solutions .carousel-side-shell>.carousel-side-rail,
  #work .carousel-side-shell>.carousel-side-rail,
  #pricing .carousel-side-shell>.carousel-side-rail {
    overflow-x:auto;overscroll-behavior-x:contain;touch-action:pan-x pan-y;
    scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;
  }
  #solutions .carousel-side-rail>.solution-card,
  #solutions .carousel-side-rail>.journey-stage,
  #work .carousel-side-rail>.portfolio-card,
  #work .carousel-side-rail>.people-card,
  #pricing .carousel-side-rail>.price-card {flex-basis:94%;width:94%;}
  #work .carousel-side-rail.people-rail {--slide:94%;}

  .structured-rail-tools {
    display:flex;align-items:center;justify-content:flex-start;gap:12px;
    min-height:44px;margin-top:8px;padding:0;
  }
  .structured-rail-tools[hidden] {display:none;}
  .structured-rail-tools button {
    display:inline-grid;place-items:center;flex:0 0 44px;width:44px;height:44px;
    min-height:44px;padding:10px;border:1px solid #b1ccc3;border-radius:50%;
    background:#fff;color:var(--teal-deep,#126a78);cursor:pointer;
  }
  .structured-rail-tools button:disabled {opacity:.35;cursor:default;}
  .structured-rail-tools button:not(:disabled):active {background:#e5f0eb;}
  .structured-rail-tools svg {width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
  .structured-rail-position {min-width:44px;text-align:center;color:#49666c;font-size:14px;font-variant-numeric:tabular-nums;}
  .structured-rail-tools button:focus-visible,
  .structured-rail:focus-visible {outline:3px solid var(--teal-deep,#126a78);outline-offset:3px;}
  .community-disclosure>.structured-rail-tools {margin-bottom:18px;}

  /* Keep a clear, touchable title area above each player for native swiping. */
  .video-gallery {gap:18px;align-items:flex-start;}
  .video-gallery .video-card {column-gap:8px;align-items:end;}
  .video-gallery .video-card__heading {min-height:84px;margin-bottom:12px;font-size:18px;display:flex;align-items:center;}
  .video-gallery .video-card__media {border-radius:14px;}
  .gallery-library .structured-rail-tools {justify-content:center;margin-top:14px;}
  .gallery-filters {justify-content:flex-start;flex-wrap:nowrap;width:100%;overflow-x:auto;gap:8px;padding:3px 1px 9px;scrollbar-width:thin;touch-action:pan-x pan-y;}
  .gallery-filters button {flex:0 0 auto;}
  .gallery-tools {gap:16px;margin-bottom:24px;}
  .gallery-page .copy-desktop {display:none;}
  .gallery-page .copy-mobile {display:contents;}
}
