/* CreativEdge mobile layer: loaded last on every page.
   Many desktop layouts set grid columns inline, which beats the page stylesheets,
   so phones got squeezed multi-column layouts. This collapses them. */
@media (max-width:820px){
  /* Any inline multi-column grid becomes one column */
  [style*="grid-template-columns"]{grid-template-columns:minmax(0,1fr)!important}
  /* Small number + text rows can stay side by side */
  [style*="grid-template-columns:60px"]{grid-template-columns:52px minmax(0,1fr)!important}
  /* Divider columns between grid cells are not needed once stacked */
  .vr{display:none!important}
  /* Footer: one column so the studio links and the Moonmail sign-up show */
  .fcols{grid-template-columns:minmax(0,1fr)!important;gap:30px!important}
  .fcols>div+div{border-left:0!important;padding-left:0!important;border-top:1.5px solid currentColor;padding-top:26px}
  /* How it works: the big outlined numbers stack into a column on phones */
  .steps[aria-hidden="true"]{display:none!important}
  /* Two-column text lists become one */
  [style*="columns:2"]{columns:1!important}
  /* Section markers (big number, label, rule, side note) wrap instead of squeezing */
  .mh2,.marker{flex-wrap:wrap;row-gap:10px}
  .mh2 .no,.marker .no{font-size:58px!important}
  .mh2>.rule,.marker>.rule{display:none}
  /* About page: heading and intro stack */
  .scraphead{display:block!important}
  .scraphead>p{margin-top:22px!important}
  /* Handwritten decks wrap instead of running off screen */
  .deck .hand{white-space:normal!important;font-size:30px!important;text-align:center}
  .deck>.rule{display:none}
  /* Justified text leaves big gaps on narrow screens */
  .j,.clipping p,[style*="text-align:justify"]{text-align:left!important}
  /* Sign-up forms: the button drops under the email field when space runs out */
  .moon-form.big{flex-wrap:wrap;border-radius:24px}
  .moon-form.big input{flex:1 1 100%}
  .moon-form.big button{flex:1 1 100%}

  /* ---------- Less scrolling on phones (desktop unchanged) ---------- */
  /* Swipe rows instead of long stacks: project clippings and the hanging photo walls */
  .clips{display:flex!important;overflow-x:auto;scroll-snap-type:x mandatory;gap:16px!important;margin:0 -20px;padding:12px 20px 26px;scrollbar-width:none}
  .clips::-webkit-scrollbar,.pegs::-webkit-scrollbar{display:none}
  .clips>.clipping{flex:0 0 76%;scroll-snap-align:center;margin-top:0!important}
  .lines .pegs{flex-wrap:nowrap!important;justify-content:flex-start;overflow-x:auto;scroll-snap-type:x mandatory;margin:0 -20px;padding:0 20px 20px;scrollbar-width:none}
  .lines .hang{flex:0 0 62%!important;width:62%!important;margin-top:18px!important;scroll-snap-align:center}
  .lines .rope{display:none}
  /* Homepage */
  .leaks .pcard ul{display:none}
  .fp .nf-steps{display:none}
  .fp .nf-side>*:not(.nf-glance){display:none}
  .meet>div:nth-child(n+4){display:none}
  .meet .gridpaper.scrap{display:none}
  /* Case studies: the extra polaroids repeat the slideshow photos */
  .spread .sp-pol{display:none}
  .spread .sp-media{padding-bottom:30px!important}
  /* Footer: shorter, links side by side */
  footer.wrap>div:first-of-type,footer.wrap>div:first-of-type+.dbl{display:none!important}
  .fcols{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:26px 18px!important}
  .fcols>div:first-child,.fcols>div:last-child{grid-column:1/-1}
  .fcols>div+div{border-top:0;padding-top:0}
  .fcols>div:last-child{border-top:1.5px solid currentColor;padding-top:24px}
  .fcols .flinks a{font-size:20px!important;padding:8px 0!important}
  .fcols img[src*="wordmark"]{width:220px!important}
}
