/* P42: mobile portal heading rhythm and foreign work-tail reading continuity.
 * Scoped presentation only. Preserve V5, P40/P41, all literary markup and queries. */
@media (max-width: 600px) {
  .cc-theme-hub .section-header {
    margin-bottom: 22px;
  }
  .cc-theme-hub .section-header .heading-left p {
    margin-block-start: 10px;
    line-height: 1.8;
  }
  .syj-cipai-book .syj-cipai-book__heading {
    align-items: start;
    gap: 8px 16px;
    margin-bottom: 22px;
  }
  .syj-cipai-book .syj-cipai-book__heading > div {
    min-width: 0;
    max-width: 100%;
  }
  .syj-cipai-book .syj-cipai-book__heading h2 {
    border-inline-start-width: 2px;
    padding-inline-start: 12px;
    line-height: 1.4;
  }
  .syj-cipai-book .syj-cipai-book__heading p {
    margin: 8px 0 0 14px;
    line-height: 1.7;
  }
  .syj-cipai-book .syj-cipai-book__heading > span {
    margin-inline-start: 14px;
    line-height: 1.6;
  }
  .syj-cipai-book .syj-cipai-book__directory a {
    align-items: start;
    gap: 8px;
  }
  .syj-cipai-book .syj-cipai-book__directory a > span {
    min-width: 0;
    overflow-wrap: break-word;
    line-height: 1.55;
  }
  .syj-minglu #minglu-results > .syj-theme-domain__heading {
    gap: 6px 14px;
    align-items: baseline;
  }
  .syj-minglu #minglu-results > .syj-theme-domain__heading h2 {
    border-inline-start: 2px solid #c5a676;
    padding-inline-start: 12px;
    min-width: 0;
    overflow-wrap: break-word;
    line-height: 1.4;
  }
  .syj-minglu #minglu-results > .syj-theme-domain__heading p {
    line-height: 1.6;
  }
  :is(html:lang(en),html:lang(es),html:lang(fr))
  .syj-minglu #minglu-results > .syj-theme-domain__heading p {
    flex-basis: 100%;
    margin-inline-start: 14px;
  }
}
@media (max-width: 560px) {
  :is(html:lang(en),html:lang(es),html:lang(fr),html:lang(ja))
  .work-single--v2 .work-tail__navigation {
    grid-template-columns: minmax(0,1fr);
    gap: 12px;
    padding-block: 17px;
  }
  :is(html:lang(en),html:lang(es),html:lang(fr),html:lang(ja))
  .work-single--v2 .work-tail__navigation-cell {
    grid-column: 1;
    min-width: 0;
  }
  :is(html:lang(en),html:lang(es),html:lang(fr),html:lang(ja))
  .work-single--v2 .work-tail__navigation--both .work-tail__navigation-cell--next {
    padding-block-start: 12px;
    border-block-start: 1px solid rgba(197,166,118,.25);
  }
  :is(html:lang(en),html:lang(es),html:lang(fr),html:lang(ja))
  .work-single--v2 .work-tail__navigation-title {
    font-size: 15px;
    line-height: 1.5;
    overflow-wrap: break-word;
  }
  :is(html:lang(en),html:lang(es),html:lang(fr),html:lang(ja))
  .work-single--v2 .work-tail__section--related .work-tail__section-heading {
    gap: 6px 12px;
    flex-wrap: wrap;
  }
  :is(html:lang(en),html:lang(es),html:lang(fr),html:lang(ja))
  .work-single--v2 .work-tail__related-grid {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    overflow: visible;
    gap: 0;
    padding: 0;
    scroll-snap-type: none;
  }
  :is(html:lang(en),html:lang(es),html:lang(fr),html:lang(ja))
  .work-single--v2 .work-tail__related-card {
    display: grid;
    grid-template-columns: clamp(102px,32vw,132px) minmax(0,1fr);
    gap: 13px;
    align-items: start;
    min-width: 0;
    padding: 13px 0;
    border-bottom: 1px solid rgba(197,166,118,.3);
  }
  :is(html:lang(en),html:lang(es),html:lang(fr),html:lang(ja))
  .work-single--v2 .work-tail__related-card:last-child {
    border-bottom: 0;
  }
  :is(html:lang(en),html:lang(es),html:lang(fr),html:lang(ja))
  .work-single--v2 .work-tail__related-card:not(:has(.work-tail__related-image)) {
    grid-template-columns: minmax(0,1fr);
  }
  :is(html:lang(en),html:lang(es),html:lang(fr),html:lang(ja))
  .work-single--v2 .work-tail__related-image {
    width: 100%;
    min-width: 0;
    aspect-ratio: 16/9;
    border-radius: 4px;
  }
  :is(html:lang(en),html:lang(es),html:lang(fr),html:lang(ja))
  .work-single--v2 .work-tail__related-body {
    min-width: 0;
    padding: 0;
  }
  :is(html:lang(en),html:lang(es),html:lang(fr),html:lang(ja))
  .work-single--v2 .work-tail__related-body h3 {
    margin: 0;
    font-size: clamp(15px,4.2vw,17px);
    line-height: 1.45;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  :is(html:lang(en),html:lang(es),html:lang(fr),html:lang(ja))
  .work-single--v2 .work-tail__related-meta {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.6;
    overflow-wrap: anywhere;
  }
  .work-single--v2 :is(.work-tail__navigation-cell a,.work-tail__related-body h3 a):focus-visible {
    outline: 2px solid #315b68;
    outline-offset: 3px;
  }
}

/* P92: shared vertical section rhythm for the four editorial portals.
 * Ordinary inter-section whitespace = 128/96/80px; ad boundaries use half.
 * Keep hero entrances, final section padding and internal card spacing intact. */
:is(.cc-home-portal,.syj-hub__shell,.syj-poet-portal__shell,.cc-theme-hub) {
  --syj-portal-gap: 128px;
  --syj-portal-half-gap: 64px;
}
.cc-home-portal > .cc-home-v2__section + .cc-home-v2__section,
.cc-theme-hub > .section + .section {
  padding-block-start: var(--syj-portal-half-gap);
}
.cc-home-portal > .cc-home-v2__section:has(+ .cc-home-v2__section),
.cc-theme-hub > .section:has(+ .section) {
  padding-block-end: var(--syj-portal-half-gap);
}
.syj-hub__shell > .syj-hub__section + .syj-hub__section,
.syj-poet-portal__shell > .syj-poet-portal__section + .syj-poet-portal__section {
  margin-block-start: var(--syj-portal-gap);
}
/* Advertising is a separate module: avoid stacking section and ad spacers. */
:is(.cc-home-portal,.cc-theme-hub) > :is(.cc-home-v2__section,.section):has(+ .syj-ad) {
  padding-block-end: 0;
}
:is(.cc-home-portal,.cc-theme-hub) > .syj-ad + :is(.cc-home-v2__section,.section) {
  padding-block-start: 0;
}
:is(.cc-home-portal,.syj-hub__shell,.syj-poet-portal__shell,.cc-theme-hub) > .syj-ad {
  margin-block: var(--syj-portal-half-gap);
}
.syj-hub__shell > .syj-ad + .syj-hub__section,
.syj-poet-portal__shell > .syj-ad + .syj-poet-portal__section {
  margin-block-start: var(--syj-portal-half-gap);
}
@media (max-width: 1024px) {
  :is(.cc-home-portal,.syj-hub__shell,.syj-poet-portal__shell,.cc-theme-hub) {
    --syj-portal-gap: 96px;
    --syj-portal-half-gap: 48px;
  }
}
@media (max-width: 600px) {
  :is(.cc-home-portal,.syj-hub__shell,.syj-poet-portal__shell,.cc-theme-hub) {
    --syj-portal-gap: 80px;
    --syj-portal-half-gap: 40px;
  }
}
