/* Huayu Cinema v1.5.0 — legacy-friendly article images.
   Images in post_content are never cropped, deleted, or replaced. */
.hc-single-content, .hc-single-content > *, .hc-single-main,
.hc-single-main .wp-block-shortcode, .hc-single-main .hc-related {
  box-sizing:border-box; min-width:0;
}
.hc-single-content :is(img,video,iframe,svg) {max-width:100%;}
.hc-single-content :is(figure,.wp-block-image) {box-sizing:border-box;max-width:100%;}
.hc-single-content img {height:auto;object-fit:contain;}
.hc-single-content :is(.hc-prose-visual,figure.hc-prose-visual,p.hc-prose-visual) {
  width:100%;max-width:100%!important;min-width:0;
  margin:32px auto 36px!important;text-align:center;
}
.hc-single-content .hc-prose-visual > :is(a, picture),
.hc-single-content .hc-prose-visual > a > picture {display:inline-block;max-width:100%;vertical-align:top;}
.hc-single-content .hc-prose-visual img {
  display:block;margin-inline:auto!important;max-width:100%!important;
  height:auto!important;object-fit:contain!important;
  border-radius:8px;box-shadow:0 7px 25px rgba(35,39,35,.065);
}
/* Landscape stills can use the readable column; portraits remain poster-sized. */
.hc-single-content .hc-prose-visual--landscape img {width:auto!important;max-height:560px;}
.hc-single-content .hc-prose-visual--square img {width:auto!important;max-width:min(100%,540px)!important;max-height:540px;}
.hc-single-content .hc-prose-visual--portrait img {
  width:auto!important;max-width:min(100%,440px)!important;max-height:660px!important;
}
/* Later portrait illustrations remain secondary even when their files differ. */
.hc-single-content .hc-prose-visual--secondary-poster:not(.hc-prose-visual--repeat) img {
  max-width:min(100%,355px)!important;max-height:525px!important;
}
/* Repeated same-source images stay visible, but no longer dominate each screen. */
.hc-single-content .hc-prose-visual--repeat {
  padding:14px 18px 16px;background:#f3eee6;border:1px solid #e7e0d6;
  border-radius:10px;max-width:390px!important;
}
.hc-single-content .hc-prose-visual--repeat img {width:auto!important;max-width:min(100%,270px)!important;max-height:350px!important;box-shadow:none;}
.hc-single-content .hc-prose-visual--repeat .hc-repeat-controls {
  display:flex;justify-content:space-between;align-items:center;gap:12px;
  margin:13px 0 0;font-size:.72rem;line-height:1.5;color:#85766b;text-align:left;
}
.hc-single-content .hc-repeat-controls button {
  display:inline-flex;align-items:center;justify-content:center;min-height:34px;
  padding:6px 11px;border:1px solid #d0bdb0;border-radius:6px;
  font:inherit;font-weight:720;color:#8a473b;background:#fffaf4;cursor:pointer;
}
.hc-single-content .hc-repeat-controls button:hover,
.hc-single-content .hc-repeat-controls button:focus-visible {border-color:#a35144;outline-offset:3px;}
.hc-single-content .hc-prose-visual--repeat.is-expanded {max-width:100%!important;background:transparent;border-color:transparent;}
.hc-single-content .hc-prose-visual--repeat.is-expanded img {
  max-width:min(100%,440px)!important;max-height:660px!important;
}
.hc-single-content .hc-prose-visual figcaption,.hc-single-content .hc-prose-visual .wp-element-caption {
  max-width:650px;margin:11px auto 0;line-height:1.65;font-size:.78rem;color:#8f847b;
}
/* Headings, list cards and column widths must not inherit min-content sizing. */
.hc-single-layout .hc-single-main,.hc-single-layout .hc-related--compact,
.hc-single-layout .hc-related-list {width:100%!important;max-width:100%!important;min-width:0!important;}
.hc-single-layout .hc-related-row {
  display:flex!important;flex-direction:row!important;align-items:center!important;
  flex-wrap:nowrap!important;gap:18px!important;width:100%!important;
  max-width:100%!important;min-width:0!important;box-sizing:border-box;
}
.hc-single-layout .hc-related-row__visual {flex:0 0 112px;min-width:112px;max-width:112px;}
.hc-single-layout .hc-related-row__content {
  flex:1 1 0!important;width:auto!important;max-width:none!important;
  min-width:0!important;writing-mode:horizontal-tb!important;
  overflow-wrap:anywhere;word-break:normal;
}
.hc-single-layout .hc-related-row__content :is(h3,p,a,span,time) {
  writing-mode:horizontal-tb!important;min-width:0;max-width:100%;
}
.hc-single-layout .hc-related-row__arrow {flex:0 0 18px;}
.hc-single-layout .hc-article-end__nav {width:100%;min-width:0;}
@media(max-width:600px) {
  .hc-single-content :is(.hc-prose-visual,figure.hc-prose-visual,p.hc-prose-visual) {margin:23px auto 27px!important;}
  .hc-single-content .hc-prose-visual--portrait img {max-width:min(100%,340px)!important;max-height:510px!important;}
  .hc-single-content .hc-prose-visual--secondary-poster:not(.hc-prose-visual--repeat) img {max-width:min(100%,285px)!important;max-height:435px!important;}
  .hc-single-content .hc-prose-visual--repeat {padding:12px;max-width:100%!important;}
  .hc-single-content .hc-prose-visual--repeat img {max-width:min(100%,230px)!important;max-height:330px!important;}
  .hc-single-content .hc-prose-visual--repeat.is-expanded img {max-width:min(100%,340px)!important;max-height:510px!important;}
  .hc-single-content .hc-prose-visual--repeat .hc-repeat-controls {flex-wrap:wrap;}
  .hc-single-layout .hc-related-row {gap:12px!important;}
  .hc-single-layout .hc-related-row__visual {flex:0 0 78px;min-width:78px;max-width:78px;}
  .hc-single-layout .hc-related-row__arrow {display:none!important;}
}
