/* ============================================================
   ClimbSync — mobile optimization (phone breakpoint)
   Loads LAST, after planning-v6.css. Every rule lives inside a
   max-width media query: desktop and tablet layouts above 600px
   are untouched (a few fine-tunes at 480/420 below).
   ============================================================ */

/* tablet + phone: a 1fr strip column must be allowed to shrink —
   min-width:auto otherwise lets card content push past the frame */
@media (max-width: 920px) {
  .strip-panel {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
  }
  .strip-panel > * {
    min-width: 0;
  }
  /* native scroll snap keeps each page attached to the finger while
     preserving vertical page scroll */
  .strip-track {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    touch-action: pan-x pan-y;
  }
  .strip-track::-webkit-scrollbar {
    display: none;
  }
  .strip-inner {
    transform: none !important;
    transition: none;
  }
  .strip-panel {
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }
  .vig-session .vig-title {
    min-width: 0;
    flex: 1;
  }
  .qa-when b {
    white-space: nowrap;
  }
  .seg-tag {
    white-space: nowrap;
  }
  .vp-you {
    white-space: nowrap;
  }
  .gear-head strong {
    white-space: nowrap;
  }
}

@media (max-width: 600px) {
  /* ---------- global rhythm: the wall loses some air ---------- */
  .container {
    padding: 0 20px;
  }
  .section {
    padding: calc(var(--module) * 1.35) 0;
  }
  .section-head {
    margin-bottom: calc(var(--module) * 0.75);
  }
  .section-head .lead {
    margin-top: 14px;
  }
  h1.display {
    font-size: clamp(38px, 11.5vw, 46px);
  }
  h2.display {
    font-size: clamp(27px, 8.2vw, 32px);
  }

  /* ---------- nav: brand + waitlist + menu, sized to fit 360–600 ---------- */
  .nav-inner {
    gap: 12px;
    height: 62px;
  }
  .brand {
    gap: 9px;
  }
  .brand img {
    width: 28px;
    height: 28px;
  }
  .wordmark {
    font-size: 17px;
  }
  .nav .btn {
    padding: 9px 15px;
    font-size: 13px;
    box-shadow: 2px 3px 0 var(--hard-ink);
  }
  .lang-btn {
    padding: 6px 10px;
    gap: 5px;
  }
  .theme-toggle {
    right: 6px;
  }

  /* ---------- hero ---------- */
  .hero-inner {
    padding: calc(var(--module) * 0.75) 0 calc(var(--module) * 1.05);
    gap: 0;
  }
  .hero-board {
    padding: 36px 24px 32px;
  }
  .hero-tagline {
    margin-top: 16px;
  }
  .hero-actions {
    margin-top: 28px;
    gap: 12px;
  }
  .hero-proof {
    margin-top: 30px;
    flex-wrap: wrap;
    gap: 10px 14px;
  }
  .proof-counts {
    white-space: nowrap;
  }
  .hero-meta {
    left: 20px;
    bottom: 14px;
  }
  .hero-hint {
    display: none;
  }
  .strip-link.panel-strip {
    left: 20px;
  }

  /* ---------- problem strip ---------- */
  .strip-tabs {
    gap: 22px;
    margin-bottom: 18px;
  }
  .strip-tab {
    gap: 0;
  }
  .strip-tab .p-num {
    font-size: 34px;
  }
  .strip-panel {
    padding: 22px 16px 24px;
    gap: 20px;
  }
  .strip-panel .pain-copy h3 {
    font-size: 21px;
  }
  .strip-panel .pain-copy p {
    font-size: 15.5px;
  }
  .strip-arrow {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  /* page-turn arrows ride the frame's bottom edge — at the side they
     sit on top of the cards on a narrow column */
  .strip-arrow {
    top: auto;
    translate: 0 0;
    bottom: -20px;
  }
  .strip-arrow.next {
    right: 18px;
  }
  .strip-arrow.prev {
    left: 18px;
  }

  /* the living chat reads as a phone-within-the-phone */
  .evidence {
    padding: 18px 16px 16px;
    font-size: 13px;
  }
  .chat-head {
    margin: 0 -16px;
    padding: 0 16px 12px;
  }
  .chat-feed-wrap {
    margin: 0 -16px;
    padding: 0 16px;
  }
  .chat-composer {
    margin: 0 -16px;
    padding: 12px 16px 0;
  }
  /* 16px stops iOS from zooming the page when the input is focused */
  .chat-composer input {
    font-size: 16px;
  }
  #pain-strip .chat-feed {
    height: 300px;
  }
  .chat-board .msg {
    font-size: 14px;
    max-width: 88%;
  }
  /* "· 0 decisions" wraps to a second line on narrow heads — drop it,
     and tighten the remaining meta so "40 members · 243 unread" stays
     on one line in the narrow chat-head */
  .ch-decisions {
    display: none;
  }
  .ch-meta span {
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* near-miss map: keep both gym cards clear of each other.
     trimmed so the toast-below-scene layout doesn't make this the
     tallest panel and bound the whole strip's height */
  .nm-scene {
    height: 300px;
  }
  .nm-toast {
    font-size: 14px;
    padding: 10px 14px 11px;
  }

  /* the pinboard of faces: 3 across, and only 3 rows (drop the last
     row of cards) so the panel is shorter on phones */
  .faceboard {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 12px;
  }
  .faceboard .face-card:nth-child(n + 10) {
    display: none;
  }

  /* ---------- presence ---------- */
  .presence-grid {
    gap: calc(var(--module) * 0.9);
  }
  /* the fan scales down whole */
  .presence-phones {
    width: min(100%, 360px);
    margin-inline: auto;
  }
  .presence-cluster {
    margin-inline: auto;
  }
  .app-card,
  .app-board {
    padding: 18px 16px 16px;
  }
  .pv-contacts {
    gap: 22px;
  }

  /* ---------- planning strip ---------- */
  .strip-head .strip-tabs {
    gap: 18px;
    margin-bottom: 12px;
  }
  /* the two folder tabs share the full frame width */
  .mode-tabs {
    margin-left: 0;
    width: 100%;
  }
  .mode-tab {
    flex: 1;
    justify-content: center;
    padding: 11px 10px 10px;
  }
  .crag-copy h3 {
    font-size: 22px;
  }
  .crag-copy > p {
    font-size: 15.5px;
  }
  .crag-steps {
    margin-top: 18px;
    gap: 8px;
  }
  .crag-steps li {
    font-size: 10px;
  }
  .crag-kicker {
    margin-top: 18px;
  }
  .crag-demo {
    max-width: none;
  }
  .gb-ticker {
    margin-top: 26px;
  }
  /* the day card's map: drop the decorative annotation, it collides
     with the pin label at this width */
  .day-map .cp-maptag {
    display: none;
  }
  .day-label {
    width: 52px;
    white-space: nowrap;
  }

  /* field + gym cards: tighter shells on a narrow column */
  .mode-card {
    padding: 20px 16px 18px;
  }
  .qa-when b {
    font-size: 13.5px;
  }
  .field-card {
    padding: 16px 14px 14px;
  }
  .gym-card .vig {
    gap: 15px;
  }
  .gb-req img {
    width: 46px;
    height: 46px;
  }
  .gb-card {
    padding: 16px 14px 14px;
  }

  /* ---------- visibility ---------- */
  .trust-row {
    gap: 8px;
  }

  /* ---------- gyms / map board ---------- */
  .gyms-grid {
    row-gap: 28px;
  }
  .gym-stats {
    gap: 18px;
    margin: 28px 0 0;
  }
  .gym-stats .plate {
    flex: 1;
    padding: 16px 20px 13px;
    text-align: center;
  }
  .gym-stat .n {
    font-size: 38px;
  }
  /* the fan scales down whole; keep the traffic card on screen */
  .gym-phones {
    width: min(100%, 360px);
    margin-inline: auto;
  }
  /* the hours + traffic card rides the map phone's lower right corner */
  .gym-map-float {
    left: auto;
    right: -4%;
    width: 47%;
  }
  /* ---------- keytags ---------- */
  .keytag-grid {
    gap: calc(var(--module) * 0.8);
  }
  /* the phone nearly fills the column: pin the popped tag to the
     column edge so it stays on screen */
  .kt-float {
    width: 46%;
    left: auto;
    right: -3%;
  }
  .kt-wallet {
    gap: 12px;
  }

  /* ---------- cta ---------- */
  .cta {
    padding: calc(var(--module) * 1.6) 0 0;
  }
  .cta-brand img {
    width: 96px;
    height: 96px;
  }
  .cta-actions {
    margin: 26px 0 14px;
  }
  .badges img {
    height: 46px;
  }
  .cta-store .badges img {
    height: 40px;
  }

  /* ---------- footer ---------- */
  .footer-grid {
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 18px var(--half-module);
  }
  .footer-brand {
    display: none;
  }
  .footer-made-in {
    order: 2;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 8px;
    font-size: 11px;
  }
  .footer-socials {
    order: 1;
  }
  .footer-socials-inner {
    gap: 24px;
  }
}

/* ---------- small phones ---------- */
@media (max-width: 420px) {
  .hero-board {
    padding: 30px 20px 28px;
  }
  .hero-actions .btn {
    padding: 11px 18px;
    font-size: 14px;
  }
  .strip-tabs {
    gap: 18px;
  }
  .strip-tab .p-num {
    font-size: 30px;
  }
  .gb-reqs {
    gap: 8px;
  }
  .gb-req {
    padding: 10px 8px 8px;
  }
  .cp-seats {
    gap: 7px;
  }
  .badges img {
    height: 42px;
  }
  .pv-months26 {
    padding-left: 30px;
  }
  .pv-maprow em {
    width: 24px;
  }
}
