/* ═══════════════════════════════════════════════════════════════════
   Phone layer. 2026-10-02. PHONES ONLY: every rule is inside the
   max-width 600px query below, and this file is loaded last, so laptop
   and desktop are untouched (checked by diffing every desktop section
   before and after, at 1024, 1440 and 2560 wide).

   Mark, testing on his iPhone: "here's some more spots where it's not
   all in frame and doesn't feel fit to a mobile experience... most
   people are probably visiting on a phone... obviously not changing
   the mac or laptop or pc version!"

   The rule for every section: one phone screen, one idea, nothing cut
   off at the bottom of the frame.
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 600px) {

  /* ── Chat card: both phones whole, side by side, under their asks ── */
  #planner .w-card {
    height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 128px 14px 22px;
  }
  #planner .w-phone {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    top: auto;
    width: 100%;
  }
  #planner .w-phone-a { transform: rotate(-3deg); margin-top: 0; }
  #planner .w-phone-b { transform: rotate(3deg); margin-top: 22px; }
  #planner .w-ask-a { top: 24px; left: 14px; }
  #planner .w-ask-b { top: 76px; right: 14px; left: auto; }

  /* ── Pick for Me: title, the film, then the three beats. One screen. ── */
  #pick .pk-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    min-height: 0;
    padding: 30px 18px 6px;
  }
  #pick .pk-copy { display: contents; }
  #pick .pk-eyebrow { order: 1; }
  #pick .pk-inner h2 { order: 2; margin-top: 10px; font-size: clamp(30px, 8.6vw, 36px); }
  #pick .pk-film { order: 3; height: 340px; margin-top: 16px; }
  #pick .pk-beats { order: 4; margin-top: 12px; gap: 8px; padding-left: 0; }
  #pick .pk-beats::before, #pick .pk-beats::after { display: none; }
  #pick .pk-read { display: none; }   /* the film right above already shows the mood, the count and the pick */
  #pick .pk-beats li { font-size: 15px; }
  #pick .pk-foot { order: 5; margin-top: 12px; }
  #pick .pk-replay { padding: 9px 14px; font-size: 14px; }
  #pick .pk-caption { margin: 2px 18px 0; padding-bottom: 22px; }
  /* the film, framed for a phone: the phone window shows the RESULTS part of
     the real screen (the search itself is the floating bar above it) */
  #pick .pk-search { width: 100%; }
  #pick .pk-count { top: 62px; }
  #pick .pk-reel { top: 104px; height: 120px; }
  #pick .pk-reel img { width: 140px; height: 104px; }
  #pick .pk-phone {
    right: 50%;
    margin-right: -98px;
    top: 98px;
    width: 196px;
    aspect-ratio: auto;
    height: 236px;
    border-radius: 26px;
  }
  #pick .pk-phone img { object-position: 50% 74%; }
  #pick .pk-film { -webkit-mask-image: none; mask-image: none; }
  #pick .pk-chip { font-size: 13px; padding: 8px 12px; }
  #pick .pk-chip-match { left: 0; top: 150px; }
  #pick .pk-chip-saved { left: auto; right: 0; top: 214px; }
  #pick .pk-chip-treat { left: 2%; top: 286px; }

  /* ── Your Places: the whole stack in the frame ────────────────── */
  #your-places .saved-copy h2 { font-size: clamp(30px, 8.6vw, 36px); }
  #your-places .saved-copy p { font-size: 17px; margin-top: 10px; }
  #your-places .saved-signoff { margin-top: 10px; }
  #your-places .ps { height: 360px; }
  #your-places .ps-map { width: 236px; height: 166px; right: -4px; top: -4px; }
  #your-places .ps-shot { width: 132px; height: 190px; top: 54px; left: -4px; }
  #your-places .ps-folders-shot { left: 78px; top: 78px; width: 178px; height: 278px; border-radius: 28px; }
  #your-places .ps-note { margin-top: 8px; }

  /* ── Scout: him beside what he says, the comparison side by side ── */
  #scout .w-head p { font-size: 16px; }
  #scout .w-card.is-scout {
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-height: 0;
    padding: 22px 16px 22px 12px;
  }
  #scout .w-scout-stage { width: 92px; max-width: none; min-height: 0; margin: 0; padding: 0; }
  #scout .w-scout-stage .w-scout-svg { max-width: 92px; }
  #scout .scout-orbit, #scout .scout-ground { display: none; }
  #scout .scout-aura { inset: -10% -20%; }
  #scout .w-scout-said { gap: 10px; }
  #scout .scout-eyebrow { font-size: 12px; letter-spacing: .1em; }
  #scout .w-scout-bubble { font-size: 18px; padding: 14px 15px; border-radius: 18px; min-height: 0; }
  #scout .w-scout-bubble::after { display: none; }
  #scout .w-scout-sources { gap: 6px; }
  #scout .w-scout-sources span { font-size: 13px; padding: 7px 10px 7px 9px; }
  #scout .w-scout-note { font-size: 15px !important; }
  #scout .scout-motion-row { margin: 6px 2px 10px; }
  #scout .w-scout-compare { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 4px; }
  #scout .w-scout-line { padding: 16px 12px; border-radius: 20px; }
  #scout .w-scout-line .w-scout-tag { font-size: 12px; margin-bottom: 8px; }
  /* "about 40 minutes" never breaks (non-breaking spaces), so the size
     follows the column: it fits from a 360-wide phone up */
  #scout .w-scout-line p { font-size: clamp(15px, 4.4vw, 18px); }

  /* ── Rally: screen one is the live map itself, words on top of it;
        screen two is the three real screens. ─────────────────────── */
  #features-grid .rv-copy {
    position: absolute;
    z-index: 6;
    left: 0;
    right: 0;
    top: 0;
    padding: 26px 18px 0;
    pointer-events: none;
  }
  #features-grid .rv-copy h2 { margin-top: 14px; font-size: clamp(34px, 9.4vw, 40px); }
  #features-grid .rv-copy p { margin-top: 12px; font-size: 16px; }
  #features-grid .rv-mapbox { height: min(calc(100svh - 64px), 760px); min-height: 560px; }
  /* the top shade is measured in px, not %, so the words keep the same
     dark behind them on a short phone as on a tall one */
  #features-grid .rv-shade {
    background:
      linear-gradient(180deg, rgba(13, 18, 28, .95) 0, rgba(13, 18, 28, .8) 190px, rgba(13, 18, 28, 0) 300px),
      linear-gradient(0deg, rgba(13, 18, 28, .92) 0%, rgba(13, 18, 28, 0) 34%);
  }
  /* the banner lands between the words and Razza: Razza sits ~60% down
     the map at every phone height, the words end ~190px down */
  #features-grid .rv-banner {
    top: clamp(204px, 31%, 290px);
    grid-template-columns: 34px 1fr;
    width: min(340px, calc(100% - 32px));
    padding: 10px 14px 10px 10px;
    border-radius: 20px;
  }
  #features-grid .rv-banner img { width: 34px; height: 34px; }
  #features-grid .rv-banner p { font-size: 14px; }
  #features-grid .rv-osm { top: auto; bottom: 4px; right: 8px; }
  #features-grid .rv-people { bottom: 22px; }
  #features-grid .rv-product { padding: 24px 16px 30px; }
  #features-grid .rv-phone { width: 196px; }
  /* Replay belongs to the map it replays: top right, across from the eyebrow */
  #features-grid .rv-foot { position: absolute; z-index: 7; top: 16px; right: 14px; left: auto; bottom: auto; padding: 0; }
  #features-grid .rv-chapters { display: none; }
  #features-grid .rv-replay { padding: 8px 12px; background: rgba(13, 18, 28, .55); }

  /* ── Vote: the words first, then the phone, all in one frame ──── */
  #vote .w-split-row { padding: 38px 18px 34px; gap: 18px; }
  #vote .w-head { order: -1; }
  #vote .w-head h2 { font-size: clamp(32px, 9vw, 38px); }
  #vote .v-vote-wrap .w-phone { width: 160px; translate: 0 calc(var(--v-y, 0px) * .2) !important; }

  /* ── Keep the night: a shorter scrapbook, the three cards swipe ── */
  #recap .memory-composition { height: calc(100px + 107cqw); margin-top: 12px; }
  #recap .memory-print-hero { width: 72%; left: 14%; top: 30px; --tilt: -3deg; }
  #recap .memory-print-cafe { width: 42%; left: 1%; top: calc(74px + 55.4cqw); }
  #recap .memory-print-night { width: 40%; right: 1%; left: auto; top: calc(92px + 55.4cqw); }
  #recap .memory-margin-note { top: 74px; left: auto; right: 6px; font-size: 22px; }
  #recap .memory-margin-note svg { display: none; }
  #recap .memory-doodle { display: none; }
  #recap .v-keep {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 18px;
    margin: 14px -18px 0;
    padding: 4px 18px 12px;
    scrollbar-width: none;
  }
  #recap .v-keep::-webkit-scrollbar { display: none; }
  #recap .v-keep-item { flex: 0 0 80%; scroll-snap-align: start; }

  /* ── Pro: shorter screens strip, the two plans swipe side by side ── */
  #pro .w-card.is-dark { padding: 32px 22px 0; }
  #pro .w-pro-shots { height: 300px; margin-top: 18px; }
  #pro .w-pro-shots .w-phone { width: 158px; }
  #pro .w-pro-shots .w-phone-a { left: 6%; top: 14px; }
  #pro .w-pro-shots .w-phone-b { left: 48%; top: 56px; }
  #pro .w-tiers {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 16px;
    margin: 0 -16px;
    padding: 6px 16px 16px;
    scrollbar-width: none;
    align-items: flex-start;   /* each plan its own height: no empty stretch above the button */
  }
  #pro .w-tiers::-webkit-scrollbar { display: none; }
  #pro .w-tier { flex: 0 0 86%; scroll-snap-align: start; padding: 26px 22px 24px; gap: 12px; }
  #pro .w-tier ul { align-content: start; margin: 6px 0 18px; }
}

/* the narrowest phones (320 wide): the two quotes stack instead */
@media (max-width: 340px) {
  #scout .w-scout-compare { grid-template-columns: minmax(0, 1fr); }
}
