/* Scope: WordPress case single pages only. Desktop untouched. */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  body.single-case .detail .dgrid,
  body.single-case .detail .dmain,
  body.single-case .detail .dsection,
  body.single-case .detail .dsection__p {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  body.single-case .detail .dsection__p {
    overflow-wrap: anywhere;
    word-break: normal;
    overflow-x: clip;
  }
  /* Legacy fixed-width table-based layouts: stack text and photo cells. */
  body.single-case .detail .dsection__p table,
  body.single-case .detail .dsection__p tbody,
  body.single-case .detail .dsection__p thead,
  body.single-case .detail .dsection__p tfoot,
  body.single-case .detail .dsection__p tr,
  body.single-case .detail .dsection__p td,
  body.single-case .detail .dsection__p th {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
    float: none !important;
  }
  body.single-case .detail .dsection__p table {
    border-spacing: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow: visible !important;
  }
  body.single-case .detail .dsection__p td,
  body.single-case .detail .dsection__p th {
    padding-left: 0 !important;
    padding-right: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    vertical-align: top;
  }
  /* Old HTML often uses float/align attributes to place photos to the right. */
  body.single-case .detail .dsection__p img,
  body.single-case .detail .dsection__p figure,
  body.single-case .detail .dsection__p .wp-caption,
  body.single-case .detail .dsection__p video,
  body.single-case .detail .dsection__p iframe,
  body.single-case .detail .dsection__p embed,
  body.single-case .detail .dsection__p object,
  body.single-case .detail .dsection__p svg {
    max-width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }
  body.single-case .detail .dsection__p img[align="left"],
  body.single-case .detail .dsection__p img[align="right"],
  body.single-case .detail .dsection__p img.alignleft,
  body.single-case .detail .dsection__p img.alignright,
  body.single-case .detail .dsection__p figure.alignleft,
  body.single-case .detail .dsection__p figure.alignright {
    float: none !important;
    display: block;
    margin: 12px auto !important;
  }
  body.single-case .detail .dsection__p p,
  body.single-case .detail .dsection__p div,
  body.single-case .detail .dsection__p h1,
  body.single-case .detail .dsection__p h2,
  body.single-case .detail .dsection__p h3,
  body.single-case .detail .dsection__p h4,
  body.single-case .detail .dsection__p pre {
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }
  body.single-case .detail .dsection__p [style*="float: right"],
  body.single-case .detail .dsection__p [style*="float:right"],
  body.single-case .detail .dsection__p [style*="float: left"],
  body.single-case .detail .dsection__p [style*="float:left"] {
    float: none !important;
    max-width: 100% !important;
  }
  body.single-case .detail .dsection__p [width] { max-width: 100% !important; }
  body.single-case .detail .dsection__p hr { max-width: 100%; }
}

/* v3: photo enlargement without enlarging tiny decorative icons or wide banners. */
@media screen and (min-width: 768px) and (max-width: 1024px) {
 body.single-case .detail .dsection__p img.jt-mobile-photo {
   display:block !important;
   float:none !important;
   width:100% !important;
   max-width:100% !important;
   height:auto !important;
   margin:14px auto !important;
   object-fit:contain !important;
 }
 /* Keep small sun/marker graphics compact and inline, not full-width photos. */
 body.single-case .detail .dsection__p img.jt-mobile-icon {
   display:inline-block !important;
   float:none !important;
   width:auto !important;
   max-width:44px !important;
   height:auto !important;
   margin:0 5px 0 0 !important;
   vertical-align:middle !important;
 }
 /* Legacy yellow callouts: avoid icon-only cells taking a full row where possible. */
 body.single-case .detail .dsection__p td[bgcolor] img.jt-mobile-icon,
 body.single-case .detail .dsection__p [style*="background"] img.jt-mobile-icon {
   vertical-align:middle !important;
 }
}
