/* ─────────────────────────────────────────────────────────────────────────
   oembed default skin — semantic card.
   class 가 아닌 tag selector + nested CSS 로 작성한다. HTMLPurifier 가 본문
   저장 단계에서 class 를 자유롭게 보존해 주지 않으므로 카드 markup 에 class 를
   박아 두면 view 페이지에서 스타일이 사라진다. 카드 식별은 wrapper 의
   editor_component 속성(HTMLPurifier attr 화이트리스트에 등록되어 살아남음)으로
   수행한다.
   ───────────────────────────────────────────────────────────────────────── */
body div[data-oembed-type="card"] > figure {
  display: flex;
  flex-direction: row;
  align-items: center;
  position: relative;
  margin: 1rem 0;
  padding: 0.5rem;
  max-width: 360px;
  border: 1px solid #e1e4e8;
  border-radius: 0.75rem;
  gap: 0.5rem;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;

  &:hover {
    border-color: #c2c8d0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  }

  > img {
    width: 72px;
    height: 72px;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
    background: #f3f4f6;
    border: 1px solid #eef0f2;
    border-radius: 0.75rem;
  }

  > figcaption {
    display: flex;
    flex: 1;
    gap: 0.25rem;
    flex-direction: column;
    min-width: 0;

    > h3 {
      margin: 0 !important;
      color: #1f2328;

      > a {
        text-decoration: none;
        color: inherit;
        font-size: 0.85rem;
        font-weight: 600;
        line-height: 1.35;

        display: block;
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;

        &::after {
          content: '';
          position: absolute;
          inset: 0;
          z-index: 1;
        }
      }
    }

    > p {
      margin: 0;
      font-size: 0.675rem;
      line-height: 1.5;
      color: #57606a;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    > cite {
      margin-top: auto;
      font-size: 0.65rem;
      line-height: 0.65rem;
      color: #6e7781;
      font-style: normal;
      letter-spacing: 0.01em;
    }
  }
}