/* MahaCina《诗与酒》 · 今日诗人 V3 · 2026-11-23
 * Correction after user screenshot: no solid-color patch around crest;
 * clipped panel PAPER itself (not only the paintings), four perfectly symmetric
 * portrait/work corners, one outer metal line + one faint INNER engraved line.
 * Scoped strictly to poet portal; V2 remains in place for safe rollback.
 */
.syj-poet-channel #poet-recommendations {
  --daily-panel-fill: shape(
    from 23px 1px,
    hline to calc(100% - 23px),
    curve to calc(100% - 9px) 14px with calc(100% - 12px) 1px / calc(100% - 9px) 5px,
    curve to calc(100% - 1px) 26px with calc(100% - 4px) 16px / calc(100% - 1px) 20px,
    vline to calc(100% - 26px),
    curve to calc(100% - 9px) calc(100% - 14px) with calc(100% - 1px) calc(100% - 20px) / calc(100% - 4px) calc(100% - 16px),
    curve to calc(100% - 23px) calc(100% - 1px) with calc(100% - 9px) calc(100% - 5px) / calc(100% - 12px) calc(100% - 1px),
    hline to 23px,
    curve to 9px calc(100% - 14px) with 12px calc(100% - 1px) / 9px calc(100% - 5px),
    curve to 1px calc(100% - 26px) with 4px calc(100% - 16px) / 1px calc(100% - 20px),
    vline to 26px,
    curve to 9px 14px with 1px 20px / 4px 16px,
    curve to 23px 1px with 9px 5px / 12px 1px,
    close
  );
}

/* Remove the square background that the prior ::before crest patch introduced.
 * This pseudo-element is now the only paper background layer, clipped to the
 * exact ornamental outer frame, so NOT ONE PIXEL remains at outside corners. */
.syj-poet-channel #poet-recommendations .syj-daily-gallery__frame {
  background: transparent;
  border: 0;
  border-radius: 0;
  isolation: isolate;
}
.syj-poet-channel #poet-recommendations .syj-daily-gallery__frame::before {
  content: "";
  position: absolute;
  inset: 0;
  top: 0;
  left: 0;
  z-index: -1;
  width: auto;
  height: auto;
  transform: none;
  display: block;
  pointer-events: none;
  background: var(--poet-card);
  background-image: none;
  border-radius: 22px;
  clip-path: var(--daily-panel-fill);
  -webkit-mask-image: none;
  mask-image: none;
}

/* The V2 border-image is kept. Mask just its central TOP band instead of
 * covering it with a visible solid-color rectangle. The crest is fully transparent. */
.syj-poet-channel #poet-recommendations .syj-daily-gallery__frame::after {
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 0 28px, black 28px),
    linear-gradient(to right, black 0 calc(50% - 41.25px), transparent calc(50% - 40.5px) calc(50% + 40.5px), black calc(50% + 41.25px));
  mask-image:
    linear-gradient(to bottom, transparent 0 28px, black 28px),
    linear-gradient(to right, black 0 calc(50% - 41.25px), transparent calc(50% - 40.5px) calc(50% + 40.5px), black calc(50% + 41.25px));
  -webkit-mask-composite: source-over;
  mask-composite: add;
}
.syj-poet-channel #poet-recommendations .syj-daily-gallery__crest {
  position: absolute;
  z-index: 4;
  top: -18px;
  left: 50%;
  width: 84px;
  height: 34px;
  transform: translateX(-50%);
  pointer-events: none;
  background: transparent url("../images/poet-daily-panel-crest-v2.svg") center / 84px 34px no-repeat;
}

/* Portrait and 3 work cards: identical symmetric corners (no strange stepped
 * nibs or 9-slice stretching), exactly TWO strokes: an exterior gold border
 * and one subtle inset line drawn over the image/copy area. */
.syj-poet-channel #poet-recommendations .syj-poet-picks__portrait,
.syj-poet-channel #poet-recommendations .syj-daily-gallery__grid li {
  position: relative;
  border: 1px solid #B28A50;
  border-radius: 18px;
  background: var(--poet-card);
  overflow: hidden;
  isolation: isolate;
  filter: none;
  box-shadow: 0 5px 11px rgba(68, 48, 27, .09);
}
.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: 5px;
  z-index: 3;
  box-sizing: border-box;
  display: block;
  border: 1px solid rgba(239, 224, 193, .80);
  border-radius: 13px;
  border-image: none;
  border-image-source: none;
  background: none;
  pointer-events: none;
}
.syj-poet-channel #poet-recommendations .syj-poet-picks__portrait > .syj-poet-picks__portrait-window {
  inset: 0;
  border-radius: 0;
  clip-path: none !important;
  overflow: hidden;
}
.syj-poet-channel #poet-recommendations .syj-daily-gallery__work {
  height: 100%;
  overflow: hidden;
  clip-path: none !important;
  border-radius: 17px;
  background: var(--poet-card);
}

/* Card copy now contains ONLY the title; do not reserve excerpt/separator rows. */
.syj-poet-channel #poet-recommendations .syj-daily-gallery__work-copy {
  padding: 12px 11px 14px;
  min-height: 55px;
  justify-content: center;
}
.syj-poet-channel #poet-recommendations .syj-daily-gallery__work-copy p,
.syj-poet-channel #poet-recommendations .syj-daily-gallery__work-copy p::before {
  display: none;
}

/* Preserve the owner's earlier request: just one small golden line beside heading. */
.syj-poet-channel #poet-recommendations .syj-daily-gallery__works .syj-daily-gallery__heading::after {
  content: "";
  height: 1px;
  background: #C5A676;
  background-image: none;
  border: 0;
  opacity: .88;
}

/* Shallow rounded fallback for browsers lacking path-based clipping.
 * Modern Chrome/Edge uses exact geometry 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-daily-gallery__frame::before {
    clip-path: inset(0 round 24px);
  }
}
@media (max-width: 680px) {
  .syj-poet-channel #poet-recommendations .syj-daily-gallery__crest {
    top: -15px;
    width: 68px;
    height: 28px;
    background-size: 68px 28px;
  }
  .syj-poet-channel #poet-recommendations .syj-daily-gallery__frame::after {
    -webkit-mask-image:
      linear-gradient(to bottom, transparent 0 26px, black 26px),
      linear-gradient(to right, black 0 calc(50% - 33.5px), transparent calc(50% - 33px) calc(50% + 33px), black calc(50% + 33.5px));
    mask-image:
      linear-gradient(to bottom, transparent 0 26px, black 26px),
      linear-gradient(to right, black 0 calc(50% - 33.5px), transparent calc(50% - 33px) calc(50% + 33px), black calc(50% + 33.5px));
  }
}