/* ManualeReef Atlas Coralli Lotto 02 v348: uniform photographic and responsive presentation.
   All thirty dossiers retain the approved fish-style hero, FREE taxonomy and Reader gate.
   Real documentary photos are prioritized; explicitly labeled AI illustrations remain secondary.
*/
body.atlas-v348-coral-lot02 .layout>.content{min-width:0;max-width:100%;box-sizing:border-box}
body.atlas-v348-coral-lot02 .layout>.content>section,
body.atlas-v348-coral-lot02 .layout>.content>div,
body.atlas-v348-coral-lot02 .layout>.content>.atlas-geo-panel{max-width:100%;min-width:0;box-sizing:border-box}
body.atlas-v348-coral-lot02 :is(.mr294-gallery,.mr304-documentary,.atlas-generated-gallery,.atlas-real-gallery){
  width:100%;max-width:100%;min-width:0;box-sizing:border-box;
  clear:both;margin:24px 0 20px;padding:clamp(14px,2vw,23px);
  border-radius:16px;border:1px solid #c5e2ed;background:#f1f8fb;
}
body.atlas-v348-coral-lot02 :is(.mr294-gallery,.mr304-documentary,.atlas-generated-gallery,.atlas-real-gallery) :is(h2,h3){
  font-family:Georgia,serif;line-height:1.3;color:#0b3552;overflow-wrap:anywhere;
}
body.atlas-v348-coral-lot02 :is(.mr294-gallery,.mr304-documentary,.atlas-generated-gallery,.atlas-real-gallery) p{
  color:#35576b;line-height:1.65;overflow-wrap:anywhere;
}
body.atlas-v348-coral-lot02 :is(.mr294-media-grid,.mr304-grid,.atlas-visual-grid){
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  align-items:stretch;gap:16px!important;width:100%;max-width:100%;min-width:0;
}
body.atlas-v348-coral-lot02 :is(.mr294-media-grid,.mr304-grid,.atlas-visual-grid) > :is(figure,article,div){
  min-width:0!important;max-width:100%!important;width:100%;margin:0!important;
  box-sizing:border-box;overflow:hidden;border-radius:13px;border:1px solid #d6e8f0;background:#fff;
}
body.atlas-v348-coral-lot02 :is(.mr294-media-grid,.mr304-grid,.atlas-visual-grid) img{
  display:block;width:100%!important;height:280px!important;min-height:0!important;
  max-height:280px!important;object-fit:contain!important;object-position:center;
  border-radius:0!important;background:#eaf4f8;
}
body.atlas-v348-coral-lot02 :is(.mr294-media-grid,.mr304-grid,.atlas-visual-grid) :is(figcaption,.av-copy,.mr304-caption){
  display:block;padding:11px 13px;font-size:12px;line-height:1.6;color:#30566a;
  overflow-wrap:anywhere;
}
body.atlas-v348-coral-lot02 :is(.mr294-media-grid,.mr304-grid,.atlas-visual-grid) .mr294-zoom{
  display:block;width:100%;padding:0;background:transparent;border:0;cursor:zoom-in;
}
body.atlas-v348-coral-lot02 .mr294-tag,
body.atlas-v348-coral-lot02 .atlas-generated-note{display:inline-block;max-width:100%;overflow-wrap:anywhere}
body.atlas-v348-coral-lot02 :is(.atlas-generated-gallery,.atlas-real-gallery) .atlas-visual-card[data-photo-review],
body.atlas-v348-coral-lot02 .atlas-photo-pending-v281-10{display:none!important}
body.atlas-v348-coral-lot02 .atlas-generated-gallery:not(:has(.atlas-visual-card:not([data-photo-review]))){display:none!important}
body.atlas-v348-coral-lot02 .atlas-real-gallery:not(:has(.atlas-visual-card:not([data-photo-review]))){display:none!important}
body.atlas-v348-coral-lot02 .mr304-documentary a,
body.atlas-v348-coral-lot02 .atlas-real-gallery a{color:#075a81!important;text-decoration:underline!important}
body.atlas-v348-coral-lot02 .mr304-documentary .mr304-grid>div{padding:0!important}
body.atlas-v348-coral-lot02 .mr304-documentary .mr304-grid>div>p{padding:0 13px!important;margin:9px 0!important}
body.atlas-v348-coral-lot02 .hero-media-panel .invert-photo-caption{overflow-wrap:anywhere}
@media(max-width:760px){
 body.atlas-v348-coral-lot02 :is(.mr294-media-grid,.mr304-grid,.atlas-visual-grid){
   grid-template-columns:minmax(0,1fr)!important;gap:13px!important;
 }
 body.atlas-v348-coral-lot02 :is(.mr294-media-grid,.mr304-grid,.atlas-visual-grid) img{
   height:265px!important;max-height:265px!important;object-fit:contain!important;
 }
 body.atlas-v348-coral-lot02 :is(.mr294-gallery,.mr304-documentary,.atlas-generated-gallery,.atlas-real-gallery){
   padding:13px!important;margin:17px 0;
 }
}

/* Legacy v281 nested photo cards: do not mislabel authentic photographs as IA. */
body.atlas-v348-coral-lot02 .atlas-generated-gallery:has(.atlas-real-gallery)>.atlas-visual-head{display:none!important}
body.atlas-v348-coral-lot02 .atlas-generated-gallery:has(.atlas-real-gallery)>.atlas-visual-grid{display:block!important}
body.atlas-v348-coral-lot02 .atlas-generated-gallery:has(.atlas-real-gallery)>.atlas-visual-grid>.atlas-ai-card{
  display:block!important;width:100%!important;max-width:none!important;
  padding:0!important;margin:0!important;background:transparent!important;
  border:0!important;overflow:visible!important;
}
body.atlas-v348-coral-lot02 .atlas-generated-gallery:has(.atlas-real-gallery)>.atlas-visual-grid>.atlas-ai-card>img,
body.atlas-v348-coral-lot02 .atlas-generated-gallery:has(.atlas-real-gallery)>.atlas-visual-grid>.atlas-ai-card>.av-copy{display:none!important}
/* Historic identification cards repeated the same image, sometimes from unverified archives.
   Their role is now covered by the sourced hero, FREE diagnostics and documentary gallery.
   Keep a scroll target for the existing Recognition navigation item. */
body.atlas-v348-coral-lot02 .atlas-id-grid.identification-cards{
  height:1px!important;max-height:1px!important;min-height:0!important;overflow:hidden!important;
  margin:0!important;padding:0!important;visibility:hidden!important;scroll-margin-top:115px;
}
body.atlas-v348-coral-lot02 .atlas-id-grid.identification-cards *{pointer-events:none!important}
body.atlas-v348-coral-lot02 .atlas-generated-gallery>.atlas-visual-grid>.atlas-ai-card[data-photo-review]{display:none!important}

/* v348.1: high-specificity reset of historic three-column gallery rules. */
body.atlas-v348-coral-lot02.atlas-species-page .layout .content .atlas-generated-gallery .atlas-visual-grid,
body.atlas-v348-coral-lot02.atlas-species-page .layout .content .atlas-real-gallery .atlas-visual-grid{
 display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
 grid-auto-flow:row!important;gap:16px!important;width:100%!important;max-width:100%!important;
}
body.atlas-v348-coral-lot02.atlas-species-page .layout .content .atlas-generated-gallery:has(.atlas-real-gallery)>.atlas-visual-grid{
 display:block!important;grid-template-columns:none!important;
}
body.atlas-v348-coral-lot02.atlas-species-page .layout .content .atlas-generated-gallery:has(.atlas-real-gallery)>.atlas-visual-grid>.atlas-ai-card{
 display:block!important;width:100%!important;max-width:100%!important;box-sizing:border-box;
 border:0!important;padding:0!important;margin:0!important;background:transparent!important;
}
@media(max-width:760px){
 body.atlas-v348-coral-lot02.atlas-species-page .layout .content .atlas-generated-gallery .atlas-visual-grid,
 body.atlas-v348-coral-lot02.atlas-species-page .layout .content .atlas-real-gallery .atlas-visual-grid{
  grid-template-columns:minmax(0,1fr)!important;
 }
}


/* v349: legacy galleries nested inside an older photographic wrapper must obey
   the same column count as standalone galleries (the v348 browser audit found
   mismatched 3/2 columns in these nested layouts). */
body.atlas-v348-coral-lot02 article.content .atlas-generated-gallery .atlas-real-gallery .atlas-visual-grid,
body.atlas-v348-coral-lot02 article.content .atlas-real-gallery .atlas-visual-grid,
body.atlas-v348-coral-lot02 article.content .mr304-grid,
body.atlas-v348-coral-lot02 article.content .mr294-media-grid {
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
@media(max-width:760px){
 body.atlas-v348-coral-lot02 article.content .atlas-generated-gallery .atlas-real-gallery .atlas-visual-grid,
 body.atlas-v348-coral-lot02 article.content .atlas-real-gallery .atlas-visual-grid,
 body.atlas-v348-coral-lot02 article.content .mr304-grid,
 body.atlas-v348-coral-lot02 article.content .mr294-media-grid {
   grid-template-columns:minmax(0,1fr)!important;
 }
}
