/* MahaCina《诗与酒》· 今日诗人 V5：双弧等曲率镜像边框
 * 四图同一主曲线，四角严格水平/垂直镜像；
 * 每角有两段长度、曲率相等且中点切线连续的三次 Bézier 曲线。
 * V5.1 大外框亦使用四图完全相同的SVG角母版，版式与文学内容不变。
 */
.syj-poet-channel #poet-recommendations {
  --daily-v5-paper: var(--poet-card, #faf6ed);
  --daily-v5-equal-cut: shape(
    from 24px 1px,
    hline to calc(100% - 24px),
    curve to calc(100% - 12px) 12px with calc(100% - 17px) 1px / calc(100% - 17px) 7px,
    curve to calc(100% - 1px) 24px with calc(100% - 7px) 17px / calc(100% - 1px) 17px,
    vline to calc(100% - 24px),
    curve to calc(100% - 12px) calc(100% - 12px) with calc(100% - 1px) calc(100% - 17px) / calc(100% - 7px) calc(100% - 17px),
    curve to calc(100% - 24px) calc(100% - 1px) with calc(100% - 17px) calc(100% - 7px) / calc(100% - 17px) calc(100% - 1px),
    hline to 24px,
    curve to 12px calc(100% - 12px) with 17px calc(100% - 1px) / 17px calc(100% - 7px),
    curve to 1px calc(100% - 24px) with 7px calc(100% - 17px) / 1px calc(100% - 17px),
    vline to 24px,
    curve to 12px 12px with 1px 17px / 7px 17px,
    curve to 24px 1px with 17px 7px / 17px 1px,
    close
  );
  /* V5.2: inner SVG path at 5px, with a subpixel artwork bleed beneath
   * its stroke. Same symmetric two-cubic geometry; no exposed paper seam. */
  --daily-v5-art-cut: shape(
    from 21px .5px,
    hline to calc(100% - 21px),
    curve to calc(100% - 10.65px) 10.65px with calc(100% - 15px) .5px / calc(100% - 15px) 6.5px,
    curve to calc(100% - .5px) 21px with calc(100% - 6.5px) 15px / calc(100% - .5px) 15px,
    vline to calc(100% - 21px),
    curve to calc(100% - 10.65px) calc(100% - 10.65px) with calc(100% - .5px) calc(100% - 15px) / calc(100% - 6.5px) calc(100% - 15px),
    curve to calc(100% - 21px) calc(100% - .5px) with calc(100% - 15px) calc(100% - 6.5px) / calc(100% - 15px) calc(100% - .5px),
    hline to 21px,
    curve to 10.65px calc(100% - 10.65px) with 15px calc(100% - .5px) / 15px calc(100% - 6.5px),
    curve to .5px calc(100% - 21px) with 6.5px calc(100% - 15px) / .5px calc(100% - 15px),
    vline to 21px,
    curve to 10.65px 10.65px with .5px 15px / 6.5px 15px,
    curve to 21px .5px with 15px 6.5px / 15px .5px,
    close
  );
}

/* The exact same ONE 24px two-arc master contour is applied to the portrait and all cards.
 * No old border-radius: mixed round+scallop caused the V2 geometry defects.
 * Clip the PAPER parent, not just the underlying photo, to prevent corner bleed.
 */
.syj-poet-channel #poet-recommendations .syj-poet-picks__portrait,
.syj-poet-channel #poet-recommendations .syj-daily-gallery__grid li {
  position: relative;
  border: 0;
  border-radius: 0;
  padding: 4px;
  background: var(--daily-v5-paper);
  clip-path: var(--daily-v5-equal-cut);
  overflow: hidden;
  isolation: isolate;
  box-shadow: none;
  filter: none;
}

/* True outline comes from one vector drawing; nine-slice leaves its 28px
 * corners UNSTRETCHED even when the portrait is 3:4 and cards are landscape.
 * The pale inner stroke covers the subpixel artwork edge; the outer gold gutter remains.
 */
.syj-poet-channel #poet-recommendations .syj-poet-picks__portrait::after,
.syj-poet-channel #poet-recommendations .syj-daily-gallery__grid li::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  display: block;
  box-sizing: border-box;
  pointer-events: none;
  background: none;
  border: 28px solid transparent;
  border-image: url("../images/poet-daily-equal-double-arc-v5.svg?v=equal24-b") 28 / 28px stretch;
  border-radius: 0;
}

/* Legacy portrait ::before is disabled upstream; the real image is also clipped
 * to its own equal-arc outline. This is more than covering square corners. */
.syj-poet-channel #poet-recommendations .syj-poet-picks__portrait > .syj-poet-picks__portrait-window {
  inset: 4px;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  clip-path: var(--daily-v5-art-cut) !important;
  overflow: hidden;
  background: #E7DAC4;
}
.syj-poet-channel #poet-recommendations .syj-poet-picks__portrait-window img {
  object-fit: cover;
  object-position: 50% 35%;
}

/* Full work surface is clipped, including the off-white title strip.
 * Keep 3 cards title-only; the inner hairline meets the image edge. */
.syj-poet-channel #poet-recommendations .syj-daily-gallery__grid li {
  display: flex;
  flex-direction: column;
}
.syj-poet-channel #poet-recommendations .syj-daily-gallery__work {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  height: auto;
  border: 0;
  border-radius: 0;
  clip-path: var(--daily-v5-art-cut) !important;
  overflow: hidden;
  background: var(--daily-v5-paper);
}
.syj-poet-channel #poet-recommendations .syj-daily-gallery__painting {
  border-radius: 0;
}
.syj-poet-channel #poet-recommendations .syj-daily-gallery__work-copy {
  padding: 12px 11px 13px;
}

/* V5.1 | MAIN FRAME CORNER IDENTITY: this is the missing piece.
 * Use the *exact same* 24px double-arc shape and 80×80 SVG asset as the portrait
 * and three work cards; nine-slice preserves corner geometry for every size.
 * The main panel's PAPER ::before is clipped by the same outer master shape,
 * so no rectangular paper/colour remains beyond the gold line.
 * Existing transparent top crest and its local mask remain undisturbed.
 */
.syj-poet-channel #poet-recommendations {
  --daily-panel-fill: var(--daily-v5-equal-cut);
}
.syj-poet-channel #poet-recommendations .syj-daily-gallery__frame::before {
  clip-path: var(--daily-v5-equal-cut);
  border-radius: 0;
}
.syj-poet-channel #poet-recommendations .syj-daily-gallery__frame::after {
  border: 28px solid transparent;
  border-image: url("../images/poet-daily-equal-double-arc-v5.svg?v=equal24-b") 28 / 28px stretch;
  border-radius: 0;
}

/* Older engines that don't support shape() still have clean rectangular
 * clipping, rather than exposed square photo corners. */
@supports not (clip-path: shape(from 0px 0px, line to 100% 0px, line to 100% 100%, line to 0px 100%, close)) {
  .syj-poet-channel #poet-recommendations .syj-poet-picks__portrait,
  .syj-poet-channel #poet-recommendations .syj-daily-gallery__grid li {
    clip-path: inset(0 round 18px);
  }
  .syj-poet-channel #poet-recommendations .syj-poet-picks__portrait > .syj-poet-picks__portrait-window,
  .syj-poet-channel #poet-recommendations .syj-daily-gallery__work {
    clip-path: inset(0 round 14px) !important;
  }
}

/* V5.3 | Dynasty label: one quiet gilded contour, the miniature V5 corner.
 * Keep real text and natural wrapping; no badge background or extra inner line. */
.syj-poet-channel #poet-recommendations .syj-daily-gallery__byline {
  align-items: center;
}
.syj-poet-channel #poet-recommendations .syj-daily-gallery__identity {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  box-sizing: border-box;
  min-height: 27px;
  max-width: 100%;
  padding: 3px 13px;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.syj-poet-channel #poet-recommendations .syj-daily-gallery__identity::after {
  content: "";
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  pointer-events: none;
  border: 10px solid transparent;
  border-image: url("../images/poet-daily-dynasty-single-arc-v53.svg") 10 / 10px stretch;
  border-radius: 0;
}

/* V5.4 | Owner refinement: shallow corners and editorial weight hierarchy. */
.syj-poet-channel #poet-recommendations .syj-daily-gallery__identity {
  min-height: 26px;
  padding: 3px 14px;
}
.syj-poet-channel #poet-recommendations .syj-daily-gallery__identity::after {
  border: 8px solid transparent;
  border-image: url("../images/poet-daily-dynasty-single-arc-v54.svg") 8 / 8px stretch;
}
.syj-poet-channel #poet-recommendations .syj-daily-gallery__grid .syj-daily-gallery__work-copy h3 {
  font-weight: 400;
}
html:lang(en) body.syj-poet-channel #poet-recommendations .syj-daily-gallery__frame #poet-daily-title {
  font-weight: 700;
}

/* V5.5 | Foreign dynasty banners: horizontal editorial titles in the reserved
 * paper area; preserve the original Chinese arrangement and painted scene. */
:is(html:lang(en),html:lang(es),html:lang(fr),html:lang(ja)) body.syj-poet-channel #poet-generations .syj-era-overview__main {
  grid-template-columns: minmax(0,1fr);
  align-content: end;
  align-items: end;
  gap: 10px;
}
:is(html:lang(en),html:lang(es),html:lang(fr),html:lang(ja)) body.syj-poet-channel #poet-generations .syj-era-overview__main .syj-era-overview__identity {
  grid-column: 1;
  text-align: left;
  width: min(100%, 58%);
  min-width: 0;
  margin: 0;
}
:is(html:lang(en),html:lang(es),html:lang(fr),html:lang(ja)) body.syj-poet-channel #poet-generations .syj-era-overview__main .syj-era-overview__name {
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  font-family: var(--syj-type-display, Georgia, serif);
  font-size: clamp(26px,3vw,40px);
  line-height: 1.22;
  font-weight: 500;
  letter-spacing: .005em;
  margin: 0;
  overflow-wrap: break-word;
  text-wrap: balance;
}
:is(html:lang(en),html:lang(es),html:lang(fr),html:lang(ja)) body.syj-poet-channel #poet-generations .syj-era-overview__main .syj-era-overview__intro {
  grid-column: 1;
  max-width: min(100%, 58%);
  margin: 0;
  padding: 0;
}
@media (max-width:640px) {
  :is(html:lang(en),html:lang(es),html:lang(fr),html:lang(ja)) body.syj-poet-channel #poet-generations .syj-era-overview__main--designed {
    gap: 0;
    align-content: start;
  }
  :is(html:lang(en),html:lang(es),html:lang(fr),html:lang(ja)) body.syj-poet-channel #poet-generations .syj-era-overview__main--designed .syj-era-overview__identity {
    grid-row: 2;
    width: auto;
    margin: 12px 16px 18px;
  }
  :is(html:lang(en),html:lang(es),html:lang(fr),html:lang(ja)) body.syj-poet-channel #poet-generations .syj-era-overview__main--designed .syj-era-overview__name {
    font-size: clamp(24px,6vw,32px);
  }
  :is(html:lang(en),html:lang(es),html:lang(fr),html:lang(ja)) body.syj-poet-channel #poet-generations .syj-era-overview__main--designed .syj-era-overview__intro {
    grid-row: 3;
    max-width: none;
    margin: 0 16px 18px;
  }
}

/* V5.6 | Latin dynasty banners: expressive locally installed book italic.
 * No network font, no change to Chinese/Japanese or the daily-poet module. */
:is(html:lang(en),html:lang(es),html:lang(fr)) body.syj-poet-channel #poet-generations .syj-era-overview__main .syj-era-overview__identity {
  width: min(100%, 66%);
}
:is(html:lang(en),html:lang(es),html:lang(fr)) body.syj-poet-channel #poet-generations .syj-era-overview__main .syj-era-overview__name {
  /* V5.7: owner selected option C, Georgia bold italic. */
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: clamp(34px, 4.4vw, 60px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.025em;
  text-wrap: balance;
}
@media (max-width:640px) {
  :is(html:lang(en),html:lang(es),html:lang(fr)) body.syj-poet-channel #poet-generations .syj-era-overview__main--designed .syj-era-overview__identity {
    width: auto;
  }
  :is(html:lang(en),html:lang(es),html:lang(fr)) body.syj-poet-channel #poet-generations .syj-era-overview__main--designed .syj-era-overview__name {
    font-size: clamp(30px, 8vw, 42px);
  }
}

/* V5.8 | Latin era spread: meaningful chronology, higher visual anchor,
 * restrained typography and a ruled feature list. No new literary claims. */
:is(html:lang(en),html:lang(es),html:lang(fr)) body.syj-poet-channel #poet-generations .syj-era-overview__main--designed .syj-era-overview__identity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  margin-block-end: clamp(12px,3.1vw,44px);
  width: min(100%, 70%);
}
:is(html:lang(en),html:lang(es),html:lang(fr)) body.syj-poet-channel #poet-generations .syj-era-overview__main--designed .syj-era-overview__years {
  order: -1;
  margin: 0;
  color: #8e6b37;
  font-size: clamp(14px,1.3vw,18px);
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: .09em;
  line-height: 1.4;
}
:is(html:lang(en),html:lang(es),html:lang(fr)) body.syj-poet-channel #poet-generations .syj-era-overview__main--designed .syj-era-overview__identity::after {
  content: "";
  width: 72px;
  height: 1px;
  flex: none;
  background: #b08d57;
  margin-top: 4px;
}
:is(html:lang(en),html:lang(es),html:lang(fr)) body.syj-poet-channel #poet-generations .syj-era-overview__aside {
  justify-content: center;
  padding: clamp(22px,2.5vw,36px);
}
:is(html:lang(en),html:lang(es),html:lang(fr)) body.syj-poet-channel #poet-generations .syj-era-overview__features-heading h4 {
  font-size: clamp(18px,1.65vw,23px);
  line-height: 1.35;
  font-weight: 600;
}
:is(html:lang(en),html:lang(es),html:lang(fr)) body.syj-poet-channel #poet-generations .syj-era-overview__features {
  margin-top: 22px;
  gap: 0 22px;
  background: none;
}
:is(html:lang(en),html:lang(es),html:lang(fr)) body.syj-poet-channel #poet-generations .syj-era-overview__features li {
  min-height: 52px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(197,166,118,.28);
  font-size: clamp(14px,1.15vw,16px);
  line-height: 1.55;
  overflow-wrap: anywhere;
}
@media (max-width:640px) {
  :is(html:lang(en),html:lang(es),html:lang(fr)) body.syj-poet-channel #poet-generations .syj-era-overview__main--designed .syj-era-overview__identity {
    width: auto;
    margin: 12px 16px 18px;
    gap: 6px;
  }
  :is(html:lang(en),html:lang(es),html:lang(fr)) body.syj-poet-channel #poet-generations .syj-era-overview__main--designed .syj-era-overview__years { font-size: 13px; }
  :is(html:lang(en),html:lang(es),html:lang(fr)) body.syj-poet-channel #poet-generations .syj-era-overview__aside { padding: 20px 16px; }
  :is(html:lang(en),html:lang(es),html:lang(fr)) body.syj-poet-channel #poet-generations .syj-era-overview__features { margin-top: 12px; gap: 0 16px; }
  :is(html:lang(en),html:lang(es),html:lang(fr)) body.syj-poet-channel #poet-generations .syj-era-overview__features li { min-height: 42px; }
}

/* V5.9 | Representative poet cards: compact factual metadata, all five locales.
 * Existing portraits, curated membership and links are unchanged. */
.syj-poet-channel #poet-generations .syj-era-poet__copy {
  padding: 14px 14px 13px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.syj-poet-channel #poet-generations .syj-era-poet__identity {
  display: block;
  min-height: 0;
}
.syj-poet-channel #poet-generations .syj-era-poet__identity h5 {
  font-size: clamp(17px,1.55vw,23px);
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}
.syj-poet-channel #poet-generations .syj-era-poet__identity > p {
  margin: 5px 0 0;
  font-size: 11px;
  line-height: 1.5;
}
.syj-poet-channel #poet-generations .syj-era-poet__lifespan {
  color: var(--poet-text);
  margin: 9px 0 0;
  font-size: 13px;
  line-height: 1.5;
  font-variant-numeric: lining-nums tabular-nums;
}
.syj-poet-channel #poet-generations .syj-era-poet__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 13px;
}
.syj-poet-channel #poet-generations .syj-era-poet__collection {
  min-width: 0;
  font-size: 12px;
  line-height: 1.5;
  color: #8e6b37;
  overflow-wrap: anywhere;
}
.syj-poet-channel #poet-generations .syj-era-poet__collection:hover { text-decoration: underline; }
.syj-poet-channel #poet-generations .syj-era-poet__more {
  position: static;
  margin-inline-start: auto;
  flex: 0 0 28px;
}
.syj-poet-channel #poet-generations .syj-era-poet__copy a:focus-visible {
  outline: 2px solid #315b68;
  outline-offset: 3px;
}
@media (max-width:640px) {
 .syj-poet-channel #poet-generations .syj-era-poet__copy { padding: 10px 11px 11px; }
 .syj-poet-channel #poet-generations .syj-era-poet__identity h5 { font-size: 17px; }
}

/* P44: title-only poet family cards; reserve a real arrow column, never overlap text. */
html:lang(zh) .syj-poet-channel #poet-families .syj-poet-portal__family--painted .syj-poet-portal__family-cover {
 display: grid;
 grid-template-columns: minmax(0, 1fr) 25px;
 align-items: center;
 column-gap: 10px;
 padding: 14px 14px 9px;
 min-height: 88px;
 box-sizing: border-box;
}
html:lang(zh) .syj-poet-channel #poet-families .syj-poet-portal__family--painted .syj-poet-portal__family-cover:not(:has(.syj-poet-portal__family-arrow)) {
 grid-template-columns: minmax(0,1fr);
}
html:lang(zh) .syj-poet-channel #poet-families .syj-poet-portal__family--painted .syj-poet-portal__family-cover h3 {
 grid-column: 1;
 min-width: 0;
 max-width: 100%;
 margin: 0;
 padding: 0;
 white-space: normal;
 overflow-wrap: anywhere;
 hyphens: auto;
 line-height: 1.35;
}
html:lang(zh) .syj-poet-channel #poet-families .syj-poet-portal__family--painted .syj-poet-portal__family-cover p {
 display: none;
}
html:lang(zh) .syj-poet-channel #poet-families .syj-poet-portal__family--painted .syj-poet-portal__family-arrow {
 grid-column: 2;
 position: static;
 inset: auto;
 align-self: center;
 justify-self: end;
 flex: none;
 box-sizing: border-box;
 margin: 0;
}
html:lang(zh) .syj-poet-channel #poet-families .syj-poet-portal__family--painted .syj-poet-portal__family-cover:focus-visible {
 outline: 2px solid #315b68;
 outline-offset: -3px;
}
@container (max-width: 560px) {
 html:lang(zh) .syj-poet-channel #poet-families .syj-poet-portal__family--painted .syj-poet-portal__family-cover {
  min-height: 66px;
 }
}

/* P93: continuous, size-aware two-stroke SVG; no stitched crest or nine-slice.
 * Only switches off V5 layers once the replacement has actually rendered. */
.syj-poet-channel #poet-recommendations .syj-daily-gallery__frame[data-daily-vector="ready"]::before,
.syj-poet-channel #poet-recommendations .syj-daily-gallery__frame[data-daily-vector="ready"]::after,
.syj-poet-channel #poet-recommendations .syj-daily-gallery__frame[data-daily-vector="ready"] > .syj-daily-gallery__crest,
.syj-poet-channel #poet-recommendations .syj-poet-picks__portrait[data-daily-vector="ready"]::before,
.syj-poet-channel #poet-recommendations .syj-poet-picks__portrait[data-daily-vector="ready"]::after,
.syj-poet-channel #poet-recommendations .syj-daily-gallery__grid li[data-daily-vector="ready"]::before,
.syj-poet-channel #poet-recommendations .syj-daily-gallery__grid li[data-daily-vector="ready"]::after {
  display: none;
}
.syj-poet-channel #poet-recommendations .syj-daily-vector {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  overflow: visible;
  pointer-events: none;
  z-index: 4;
}
.syj-poet-channel #poet-recommendations .syj-daily-vector--panel {
  top: -16px;
  height: calc(100% + 16px);
  z-index: -1;
}
.syj-poet-channel #poet-recommendations .syj-daily-vector path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.syj-poet-channel #poet-recommendations .syj-daily-vector__outer {
  stroke: #B08D57;
  stroke-width: 1.05px;
}
.syj-poet-channel #poet-recommendations .syj-daily-vector--panel .syj-daily-vector__outer {
  fill: var(--poet-card, #faf6ed);
}
.syj-poet-channel #poet-recommendations .syj-daily-vector__inner {
  stroke: #D7BD94;
  stroke-opacity: .85;
  stroke-width: .85px;
}

/* P94: Poet universe — stone-blue action, card hover and compact footer CTA. */
.syj-poet-channel #poet-families .syj-poet-portal__family--painted .syj-poet-portal__family-arrow {
  color: #315b68;
  border-color: #315b68;
  background: transparent;
  transition: color .2s ease-out, background-color .2s ease-out, border-color .2s ease-out, transform .2s ease-out;
}
.syj-poet-channel #poet-families .syj-poet-portal__family--painted .syj-family-arrow-icon {
  transition: transform .2s ease-out;
}
.syj-poet-channel #poet-families .syj-poet-portal__family--painted .syj-poet-portal__family-more {
  justify-content: flex-start;
  align-items: center;
  gap: 7px;
  color: #315b68;
}
.syj-poet-channel #poet-families .syj-poet-portal__family--painted .syj-poet-portal__family-more .syj-motion-arrow {
  flex: none;
  margin: 0;
  transition: transform .2s ease-out;
}
@media (hover: hover) and (pointer: fine) {
  .syj-poet-channel #poet-families .syj-poet-portal__family--painted {
    transition: transform .2s ease-out, box-shadow .2s ease-out;
  }
  .syj-poet-channel #poet-families .syj-poet-portal__family--painted:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(49,91,104,.10);
  }
  .syj-poet-channel #poet-families .syj-poet-portal__family--painted:hover .syj-poet-portal__family-arrow {
    color: #f8f3ea;
    background-color: #315b68;
    transform: scale(1.04);
  }
  .syj-poet-channel #poet-families .syj-poet-portal__family--painted:hover .syj-family-arrow-icon,
  .syj-poet-channel #poet-families .syj-poet-portal__family--painted .syj-poet-portal__family-more:hover .syj-motion-arrow {
    transform: translateX(2px);
  }
}
.syj-poet-channel #poet-families .syj-poet-portal__family--painted:focus-within .syj-poet-portal__family-arrow {
  color: #f8f3ea;
  background-color: #315b68;
}
@media (prefers-reduced-motion: reduce) {
  .syj-poet-channel #poet-families .syj-poet-portal__family--painted,
  .syj-poet-channel #poet-families .syj-poet-portal__family--painted :is(.syj-poet-portal__family-arrow,.syj-family-arrow-icon,.syj-motion-arrow) {
    transition: none;
    transform: none;
  }
}
