/* Source: concretta-mobile-gallery-v427.css */
/* CONCRETTA V427 — Gallery family mobile/tablet/iPhone/Android/landscape safety.
   Scoped to body.ct-gallery-page. Desktop >=1181px remains unchanged. */

body.ct-gallery-page{overflow-x:hidden;}
body.ct-gallery-page *,body.ct-gallery-page *::before,body.ct-gallery-page *::after{box-sizing:border-box;}
body.ct-gallery-page :where(img,video,iframe,svg){max-width:100%;}
body.ct-gallery-page :where(.cg271-shell,.cg271-hero-copy,.cg271-hero-art,.cg327-manifesto-body,.cg271-grid,.cg271-card,.cg271-media,.cg271-cta-inner){min-width:0;}

/* Touch tablets and compact landscape tablets. */
@media (min-width:701px) and (max-width:1180px){
  body.ct-gallery-page .cg271-shell{width:calc(100% - 56px);max-width:1180px;}
  body.ct-gallery-page .cg271-hero-grid{
    min-height:0;
    grid-template-columns:1fr;
    gap:24px;
    padding:108px 0 48px;
  }
  body.ct-gallery-page .cg271-hero-copy{max-width:760px;}
  body.ct-gallery-page .cg271-hero h1{max-width:760px;font-size:clamp(42px,6vw,54px);overflow-wrap:anywhere;}
  body.ct-gallery-page .cg271-hero-lead{max-width:700px;}
  body.ct-gallery-page .cg271-hero-art{min-height:112px;justify-content:flex-start;padding:0;}
  body.ct-gallery-page .cg271-hero-art::before{inset:10% 18% 0 0;}
  body.ct-gallery-page .cg271-hero-art::after{right:28%;height:68%;}
  body.ct-gallery-page .cg271-hero-mark{text-align:left;padding:28px 0 0 24px;}

  body.ct-gallery-page .cg327-manifesto-grid{grid-template-columns:1fr;gap:30px;}
  body.ct-gallery-page .cg327-manifesto-head{max-width:680px;}
  body.ct-gallery-page .cg327-manifesto-body{max-width:none;}
  body.ct-gallery-page .cg271-grid{column-count:2;column-gap:20px;}
  body.ct-gallery-page .cg271-card,body.ct-gallery-page .cg271-card--wide{margin-bottom:20px;break-inside:avoid;}

  body.ct-gallery-page .cg271-lightbox{
    width:calc(100% - 28px);
    height:min(88dvh,860px);
    max-height:88dvh;
    margin:auto;
  }
  body.ct-gallery-page .cg271-lightbox-media img{max-width:calc(100% - 124px);max-height:calc(100% - 72px);}
}

/* Phones, including iPhone and large Samsung/Android phones. */
@media (max-width:700px){
  body.ct-gallery-page{overflow-x:hidden!important;}
  body.ct-gallery-page .cg271-shell{width:calc(100% - 32px);max-width:none;}

  body.ct-gallery-page .cg271-hero{overflow:hidden;}
  body.ct-gallery-page .cg271-hero-grid{
    min-height:0;
    grid-template-columns:1fr;
    gap:14px;
    padding-top:max(92px,calc(76px + env(safe-area-inset-top)));
    padding-bottom:34px;
  }
  body.ct-gallery-page .cg271-hero-copy,
  body.ct-gallery-page .cg271-hero h1,
  body.ct-gallery-page .cg271-hero-lead{max-width:100%;min-width:0;}
  body.ct-gallery-page .cg271-hero h1{font-size:clamp(32px,9vw,39px);line-height:1.02;overflow-wrap:anywhere;word-break:normal;}
  body.ct-gallery-page .cg271-hero-lead{margin-top:18px;font-size:14.5px;line-height:1.62;}
  body.ct-gallery-page .cg271-hero-art{min-height:84px;padding:0;}
  body.ct-gallery-page .cg271-hero-art::before{inset:10% 12% 0 0;}
  body.ct-gallery-page .cg271-hero-art::after{right:22%;height:68%;}
  body.ct-gallery-page .cg271-hero-mark{text-align:left;padding:22px 0 0 18px;}
  body.ct-gallery-page .cg271-hero-mark strong{font-size:20px;}

  body.ct-gallery-page .cg333-family-grid{
    display:flex;
    overflow-x:auto;
    overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;
    scroll-snap-type:x proximity;
    scrollbar-width:none;
  }
  body.ct-gallery-page .cg333-family-grid::-webkit-scrollbar{display:none;}
  body.ct-gallery-page .cg333-family-item{flex:0 0 min(76vw,260px);scroll-snap-align:start;}

  body.ct-gallery-page .cg327-manifesto{padding-top:60px;}
  body.ct-gallery-page .cg327-manifesto-grid{grid-template-columns:1fr;gap:28px;}
  body.ct-gallery-page .cg327-manifesto-head h2{font-size:clamp(28px,8vw,34px);overflow-wrap:anywhere;}
  body.ct-gallery-page .cg327-manifesto-lead{font-size:19px;line-height:1.48;}
  body.ct-gallery-page .cg327-manifesto-notes{grid-template-columns:1fr;gap:0;margin-top:34px;}
  body.ct-gallery-page .cg327-manifesto-note--offset{margin-top:26px;}

  body.ct-gallery-page .cg271-gallery{padding-bottom:58px;}
  body.ct-gallery-page .cg271-grid{column-count:1;column-gap:0;}
  body.ct-gallery-page .cg271-card,body.ct-gallery-page .cg271-card--wide{margin-bottom:18px;break-inside:avoid;}
  body.ct-gallery-page .cg271-media,body.ct-gallery-page .cg271-card--wide .cg271-media{aspect-ratio:auto;}
  body.ct-gallery-page .cg271-media img{height:auto;max-height:none;object-fit:contain;}

  body.ct-gallery-page .cg271-empty{grid-template-columns:1fr;gap:30px;min-height:0;padding:38px 24px;}
  body.ct-gallery-page .cg271-empty-side{padding-top:24px;}

  body.ct-gallery-page .cg271-cta-inner{grid-template-columns:1fr;gap:28px;padding:34px 24px;align-items:start;}
  body.ct-gallery-page .cg271-cta-inner h2{overflow-wrap:anywhere;}
  body.ct-gallery-page .cg271-cta-link{max-width:100%;white-space:normal;text-align:left;}

  body.ct-gallery-page .cg271-lightbox{
    width:calc(100% - 12px);
    height:calc(100dvh - 12px);
    max-height:calc(100dvh - 12px);
    margin:auto;
    border-radius:14px;
  }
  body.ct-gallery-page .cg271-lightbox-wrap,
  body.ct-gallery-page .cg271-lightbox-media{height:100%;min-height:0;}
  body.ct-gallery-page .cg271-lightbox-media{padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom);}
  body.ct-gallery-page .cg271-lightbox-media img{
    max-width:calc(100% - 20px);
    max-height:calc(100% - 92px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    width:auto;height:auto;object-fit:contain;
  }
  body.ct-gallery-page .cg271-lightbox-close{right:max(12px,env(safe-area-inset-right));top:max(12px,env(safe-area-inset-top));}
  body.ct-gallery-page .cg271-lightbox-prev{left:max(14px,env(safe-area-inset-left));}
  body.ct-gallery-page .cg271-lightbox-next{right:max(14px,env(safe-area-inset-right));}
  body.ct-gallery-page :where(input,select,textarea){font-size:16px;max-width:100%;}
}

/* iPhone Safari: use stable small viewport when browser chrome changes height. */
@supports (-webkit-touch-callout:none){
  @media (max-width:700px){
    body.ct-gallery-page .cg271-lightbox{height:calc(100svh - 12px);max-height:calc(100svh - 12px);}
  }
}

/* Phone landscape / short-height browsers. */
@media (max-width:900px) and (max-height:520px) and (orientation:landscape){
  body.ct-gallery-page .cg271-shell{width:calc(100% - 40px);}
  body.ct-gallery-page .cg271-hero-grid{
    min-height:0!important;
    padding-top:max(76px,calc(60px + env(safe-area-inset-top)))!important;
    padding-bottom:24px!important;
    gap:8px!important;
  }
  body.ct-gallery-page .cg271-hero h1{font-size:clamp(29px,5.2vw,38px);}
  body.ct-gallery-page .cg271-hero-lead{margin-top:10px;font-size:13px;line-height:1.48;}
  body.ct-gallery-page .cg271-hero-art{display:none;}
  body.ct-gallery-page .cg327-manifesto{padding-top:38px;padding-bottom:32px;}
  body.ct-gallery-page .cg327-manifesto-grid{gap:18px;}
  body.ct-gallery-page .cg327-manifesto-head h2{font-size:clamp(26px,4.5vw,32px);}
  body.ct-gallery-page .cg327-manifesto-lead{font-size:16px;}
  body.ct-gallery-page .cg327-manifesto-notes{margin-top:22px;}

  body.ct-gallery-page .cg271-lightbox{
    width:calc(100% - 12px);
    height:calc(100dvh - 8px);
    max-height:calc(100dvh - 8px);
    border-radius:12px;
  }
  body.ct-gallery-page .cg271-lightbox-media img{
    max-width:calc(100% - 118px - env(safe-area-inset-left) - env(safe-area-inset-right));
    max-height:calc(100% - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }
  body.ct-gallery-page .cg271-lightbox-nav{top:50%;bottom:auto;transform:translateY(-50%);}
  body.ct-gallery-page .cg271-lightbox-prev{left:max(12px,env(safe-area-inset-left));}
  body.ct-gallery-page .cg271-lightbox-next{right:max(12px,env(safe-area-inset-right));}
  body.ct-gallery-page .cg271-lightbox-count{bottom:max(8px,env(safe-area-inset-bottom));}
}

/* Touch landscape tablets: keep two-column gallery while respecting device gutters. */
@media (min-width:992px) and (max-width:1180px) and (hover:none) and (pointer:coarse){
  body.ct-gallery-page{overflow-x:clip;}
  body.ct-gallery-page .cg271-shell{width:calc(100% - 64px);}
  body.ct-gallery-page .cg271-grid{column-count:2;}
}

