/* WZX_FIX10_R3E2_MOBILE_VISUAL v20261104-e2
 * Mobile image layout only. Preserves existing photographs, crop source,
 * alt, links, SEO, consultation controls, footer and desktop visuals.
 * Intentionally scoped under main and <=760px.
 */
@media screen and (max-width:760px) {
  /* Prevent any residual large desktop grid item from forcing wide columns. */
  main :is(.article-grid,.case-list-container,.lawyer-profile,.profile-office,
           .wzx9e3-case-layout,.wzx-wall-inner,.case-story-layout,.r2-article-layout) {
    min-width:0;
  }
  main img {max-width:100%;}

  /* HOME: image ABOVE copy for every editorial card; preserve whole visual. */
  body.wzx10r1a-home main .article-grid,
  main .content-section .article-grid {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:16px;
  }
  body.wzx10r1a-home main .article-grid > .article-card,
  main .content-section .article-grid > a.article-card {
    display:flex;
    flex-direction:column;
    grid-template-columns:minmax(0,1fr);
    align-items:stretch;
    width:100%;
    min-width:0;
    height:auto;
    overflow:hidden;
    border-radius:16px;
  }
  body.wzx10r1a-home main .article-card > .article-visual,
  main .content-section .article-card > .article-visual {
    display:block;
    flex:none;
    width:100%;
    min-width:0;
    height:auto;
    min-height:0;
    max-height:none;
    aspect-ratio:16/10;
    overflow:hidden;
    background:#f4f0e9;
    border-radius:16px 16px 0 0;
  }
  body.wzx10r1a-home main .article-card .article-visual > img,
  main .content-section .article-card .article-visual > img {
    display:block;
    width:100%;
    height:100%;
    min-height:0;
    max-height:none;
    aspect-ratio:auto;
    object-fit:contain;
    object-position:center center;
  }
  body.wzx10r1a-home main .article-card > .article-detail,
  main .content-section .article-card > .article-detail {
    width:100%;
    min-width:0;
    height:auto;
    padding:18px 18px 20px;
  }
  body.wzx10r1a-home main .article-card .article-detail :is(h2,h3),
  main .content-section .article-card .article-detail :is(h2,h3) {
    margin-block:9px 10px;
    font-size:clamp(19px,5.1vw,23px);
    line-height:1.48;
    overflow-wrap:anywhere;
  }
  main .content-section .article-card .article-detail p {font-size:14px;line-height:1.8;}

  /* CASE LIST: full original documentary image, then readable summary. */
  body.wzx10r1d-cases main .case-list-container {grid-template-columns:minmax(0,1fr);gap:18px;}
  body.wzx10r1d-cases main .case-feature-card,
  main .case-list-container > .case-feature-card {
    display:flex;
    flex-direction:column;
    grid-template-columns:minmax(0,1fr);
    min-width:0;
    width:100%;
    height:auto;
    overflow:hidden;
    border-radius:16px;
  }
  body.wzx10r1d-cases main .case-feature-card > img,
  body.wzx10r1d-cases main .case-feature-card > .case-dynamic-img,
  main .case-list-container > .case-feature-card > img,
  main .case-list-container > .case-feature-card > .case-dynamic-img {
    display:block;
    flex:none;
    width:100%;
    min-width:0;
    height:auto;
    min-height:0;
    max-height:none;
    aspect-ratio:16/10;
    object-fit:contain;
    object-position:center;
    background:#f3eee5;
  }
  body.wzx10r1d-cases main .case-dynamic-img img,
  main .case-list-container .case-dynamic-img img {
    display:block;
    width:100%;
    height:100%;
    min-height:0;
    max-height:none;
    object-fit:contain;
    object-position:center;
  }
  body.wzx10r1d-cases main .case-feature-card > div:not(.case-dynamic-img),
  main .case-list-container > .case-feature-card > div:not(.case-dynamic-img) {
    min-width:0;
    width:100%;
    padding:19px 18px 22px;
  }
  main .case-list-container .case-feature-card h2 {
    font-size:clamp(20px,5.2vw,24px);
    line-height:1.5;
    overflow-wrap:anywhere;
  }

  /* LAWYER: keep face and portrait complete, not side-squeezed. */
  main .lawyer-profile {
    grid-template-columns:minmax(0,1fr);
    min-width:0;
    row-gap:22px;
  }
  main .lawyer-profile .profile-image {
    min-width:0;
    width:100%;
    max-width:340px;
    margin-inline:auto;
  }
  main .lawyer-profile .profile-image img {
    display:block;
    width:100%;
    height:auto;
    max-height:none;
    object-fit:contain;
    object-position:center top;
  }
  main .lawyer-profile .profile-info {width:100%;min-width:0;}
  body.wzx10r1a-home main .hero .hero-photo-area {min-width:0;max-width:100%;}
  body.wzx10r1a-home main .hero .hero-photo-wrap {width:min(100%,350px);margin-inline:auto;}
  body.wzx10r1a-home main .hero .hero-photo-wrap > img {
    display:block;
    width:100%;
    height:auto;
    object-fit:contain;
    object-position:center top;
  }

  /* LAWYER / CASE REFERENCE & OFFICE: images should never become narrow strips. */
  main .wzx9e3-case-layout,
  main .wzx-wall-inner,
  main .profile-office {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:20px;
  }
  main .wzx9e3-case-image,
  main .wzx-wall-photo {width:100%;min-width:0;height:auto;max-height:none;}
  main .wzx9e3-case-image img,
  main .wzx-wall-photo img,
  main .profile-office > img {
    display:block;
    width:100%;
    height:auto;
    min-height:0;
    max-height:none;
    object-fit:contain;
    object-position:center;
  }
  main .wzx-wall-photo {margin:0;}

  /* REAL CASE detail: both photos stay readable and preserve their proportions. */
  body.wzx10r1d-case-story main .case-story-layout {grid-template-columns:minmax(0,1fr);}
  body.wzx10r1d-case-story main .case-story-aside {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:14px;
    min-width:0;
  }
  body.wzx10r1d-case-story main .case-story-aside img,
  main .case-story-aside img {
    display:block;
    width:100%;
    height:auto;
    max-height:none;
    aspect-ratio:auto;
    object-fit:contain;
    object-position:center;
  }
  body.wzx10r1d-case-story main .case-story-aside p {grid-column:auto;}

  /* CMS / article author blocks: stack the attorney photograph and copy. */
  main :is(.wzx-author-card,.wzx-lawyer-card,.lawyer-author-card,
           .author-profile-card,.wzx-author-profile,.wzx-authorbox,
           .lawyer-bio-card) {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    align-items:start;
    min-width:0;
    gap:16px;
  }
  main :is(.wzx-author-card,.wzx-lawyer-card,.lawyer-author-card,
           .author-profile-card,.wzx-author-profile,.wzx-authorbox,
           .lawyer-bio-card) img {
    display:block;
    width:min(100%,240px);
    max-width:100%;
    height:auto;
    max-height:320px;
    object-fit:contain;
    object-position:center top;
    margin-inline:auto;
  }
  main :is(.wzx-author-card,.wzx-lawyer-card,.lawyer-author-card,
           .author-profile-card,.wzx-author-profile,.wzx-authorbox,
           .lawyer-bio-card) :is(h2,h3) {font-size:clamp(20px,5vw,25px);line-height:1.45;}
  main :is(.wzx-author-card,.wzx-lawyer-card,.lawyer-author-card,
           .author-profile-card,.wzx-author-profile,.wzx-authorbox,
           .lawyer-bio-card) p {font-size:14px;line-height:1.85;}

  /* ARTICLE photos, QR and iframe: no distortion or side overflow. */
  main :is(.wzx-rich,.article-content,.article-body,.full-article,
           .editable-content,.case-richtext,.news-content) img,
  main :is(.wzx-rich,.article-content,.article-body,.full-article,
           .editable-content,.case-richtext,.news-content) figure img {
    display:block;
    max-width:100%;
    height:auto;
    object-fit:contain;
    margin-inline:auto;
    border-radius:10px;
  }
  main :is(.wzx-rich,.article-content,.article-body,.full-article,
           .editable-content,.case-richtext,.news-content) figure {
    max-width:100%;
    margin-inline:0;
  }
  main :is(.wzx-wechat-qr,.wechat-qr,.qr-box,.qr-code,.wzx-qr) img {
    width:min(100%,220px);
    height:auto;
    max-height:none;
    object-fit:contain;
  }
}
@media screen and (max-width:390px) {
  main .content-section .article-card > .article-detail,
  main .case-list-container > .case-feature-card > div:not(.case-dynamic-img) {
    padding-inline:15px;
  }
  main .lawyer-profile .profile-image {max-width:290px;}
}
