/* MahaCina《诗与酒》｜诗人门户「今日诗人」设计 V2
 * 用户确认视觉方向：整框的轻宋式起伏角、肖像与作品共用轮廓；仅外金线+淡内线。
 * 以上线原页面文字、图片、布局为准，不使用设计概念图中的文字或图片。
 * 独立在 R1 样式之后加载，可单独撤下实现安全回滚。
 */
/* CONTENT CLIP: the same 20px Song-corner geometry as the SVG border-image.
 * The photo and the whole work card are clipped INWARD of the pale inset stroke.
 * This prevents rectangular photo remnants at all four stepped corners.
 * shape() keeps these corners fixed in CSS pixels at every responsive width/height.
 */
.syj-poet-channel #poet-recommendations {
  --daily-art-inner-clip: shape(
    from 20px 8px,
    hline to calc(100% - 20px),
    curve to calc(100% - 12px) 16px with calc(100% - 15px) 8px / calc(100% - 12px) 10px,
    curve to calc(100% - 8px) 26px with calc(100% - 7px) 19px / calc(100% - 8px) 21px,
    vline to calc(100% - 26px),
    curve to calc(100% - 12px) calc(100% - 16px) with calc(100% - 8px) calc(100% - 21px) / calc(100% - 7px) calc(100% - 19px),
    curve to calc(100% - 20px) calc(100% - 8px) with calc(100% - 12px) calc(100% - 10px) / calc(100% - 15px) calc(100% - 8px),
    hline to 20px,
    curve to 12px calc(100% - 16px) with 15px calc(100% - 8px) / 12px calc(100% - 10px),
    curve to 8px calc(100% - 26px) with 12px calc(100% - 19px) / 7px calc(100% - 21px),
    vline to 26px,
    curve to 12px 16px with 8px 21px / 7px 19px,
    curve to 20px 8px with 12px 10px / 15px 8px,
    close
  );
}

.syj-poet-channel #poet-recommendations .syj-daily-gallery__frame {
  overflow: visible;
  border: 0;
  border-radius: 0;
}

/* Main panel: one clean gold contour, one faint ivory-gold inner rule. */
.syj-poet-channel #poet-recommendations .syj-daily-gallery__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  box-sizing: border-box;
  pointer-events: none;
  border: 26px solid transparent;
  border-image-source: url("../images/poet-daily-panel-outline-v2.svg");
  border-image-slice: 26;
  border-image-width: 26px;
  border-image-repeat: stretch;
  background: none;
}

/* Small single crest seamlessly bridges the two top rules; no extra corner filigree. */
.syj-poet-channel #poet-recommendations .syj-daily-gallery__frame::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: -18px;
  left: 50%;
  width: 84px;
  height: 34px;
  pointer-events: none;
  transform: translateX(-50%);
  background-color: var(--poet-card);
  background-image: url("../images/poet-daily-panel-crest-v2.svg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 84px 34px;
  /* Feather the crest's 84px SVG seam into the long horizontal border; no rectangular join. */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%);
}

/* Shared contour with cards: remove intermediate decorative borders/shadows. */
.syj-poet-channel #poet-recommendations .syj-poet-picks__portrait {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 4px 8px rgba(69,51,28,.12));
  isolation: isolate;
}
.syj-poet-channel #poet-recommendations .syj-poet-picks__portrait::before {
  content: none;
}
.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: 3;
  display: block;
  box-sizing: border-box;
  pointer-events: none;
  border: 20px solid transparent;
  border-image-source: url("../images/poet-daily-shared-outline-v2.svg");
  border-image-slice: 20;
  border-image-width: 20px;
  border-image-repeat: stretch;
  background: none;
}

/* The pale second line is 5px inside the gold contour, touching the photo itself. */
.syj-poet-channel #poet-recommendations .syj-poet-picks__portrait > .syj-poet-picks__portrait-window {
  inset: 0;
  border-radius: 0;
  clip-path: var(--daily-art-inner-clip) !important;
  overflow: hidden;
}
.syj-poet-channel #poet-recommendations .syj-poet-picks__portrait-window img {
  object-fit: cover;
  object-position: 50% 35%;
}

/* The same curved outer/inner pair extends over the three representative cards.
   Old SVG decorative outline and extra drop-shadow layers are not reused. */
.syj-poet-channel #poet-recommendations .syj-daily-gallery__grid li {
  border: 0;
  border-radius: 0;
  filter: drop-shadow(0 3px 7px rgba(69,51,28,.11));
}
.syj-poet-channel #poet-recommendations .syj-daily-gallery__work {
  clip-path: var(--daily-art-inner-clip);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Keep previous R1: exactly one plain, thin line beside '代表作品'. */
.syj-poet-channel #poet-recommendations .syj-daily-gallery__works .syj-daily-gallery__heading::after {
  content: "";
  height: 1px;
  min-width: 12px;
  background: #C5A676;
  background-image: none;
  border: 0;
  opacity: .88;
}

@media(max-width:680px) {
  .syj-poet-channel #poet-recommendations .syj-daily-gallery__frame::before {
    top: -15px;
    width: 68px;
    height: 28px;
    background-size: 68px 28px;
  }
  .syj-poet-channel #poet-recommendations .syj-daily-gallery__frame::after {
    border-width: 22px;
    border-image-slice: 26;
    border-image-width: 22px;
  }
}

/* Older browsers without the geometrically exact CSS shape() get a fixed-pixel
   stepped polygon silhouette, rather than a rectangular image bleeding out.
   Chrome/modern browsers keep the smooth matching Bézier shape() above. */
@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-picks__portrait-window,
  .syj-poet-channel #poet-recommendations .syj-daily-gallery__work {
    clip-path: polygon(
      20px 8px, calc(100% - 20px) 8px,
      calc(100% - 15px) 10px, calc(100% - 12px) 16px,
      calc(100% - 8px) 26px, calc(100% - 8px) calc(100% - 26px),
      calc(100% - 12px) calc(100% - 16px), calc(100% - 15px) calc(100% - 10px),
      calc(100% - 20px) calc(100% - 8px), 20px calc(100% - 8px),
      15px calc(100% - 10px), 12px calc(100% - 16px),
      8px calc(100% - 26px), 8px 26px, 12px 16px, 15px 10px
    ) !important;
  }
}
