/* 検索結果・カテゴリー一覧の記事カード（Yoripita Top Page 1.4.0〜。2026-11-06）。
   トップページの「新着記事」（top.css の .ypt-grid・.ypt-card・.ypt-label）と同じ値。.ypt-archive の中だけに効く。
   列数：PC（1024px〜）4列・タブレット（600〜1023px）2列・スマホ（〜599px）1列。画像は元の比率のまま全体を表示（切り取らない・変形しない）。
   タイトルは最大3行で、4行以上になるときは3行目の末尾に「…」（2026-11-06ユーザー指示。1.4.2 の作成中に全文表示を試したが、3行まで＋…に決めた）。新着記事の値を変えたときは、ここも合わせる。 */
.ypt-archive {
  --ypt-green: #0d5541;
  --ypt-text: #26332e;
  --ypt-gray: #f6f8f7;
  margin: 0 0 8px;
}
.ypt-archive *, .ypt-archive *::before, .ypt-archive *::after { box-sizing: border-box; }
.ypt-archive .ypt-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 20px; }
.ypt-archive .ypt-card { margin: 0; padding: 0; min-width: 0; }
.ypt-archive .ypt-card__link { display: block; color: inherit; text-decoration: none; }
.ypt-archive .ypt-card__media { position: relative; display: block; background: var(--ypt-gray); }
.ypt-archive img.ypt-img { display: block; width: 100%; height: auto; max-width: 100%; margin: 0; object-fit: contain; }
.ypt-archive .ypt-noimage { display: block; aspect-ratio: 16 / 9; background: var(--ypt-gray); }
.ypt-archive .ypt-label { position: absolute; top: 0; left: 0; z-index: 2; max-width: 100%; padding: 4px 10px; background: rgba(13, 85, 65, .65); color: #fff; font-size: 12px; font-weight: 700; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* カテゴリー一覧では画像の左上のカテゴリー名を出さない（1.4.1。ページ上部のカテゴリー名で分かるため）。検索結果では出す */
.ypt-archive--category .ypt-label { display: none; }
.ypt-archive .ypt-card__title { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: 10px; font-size: 15px; font-weight: 700; line-height: 1.55; color: var(--ypt-text); }
.ypt-archive .ypt-card__link:hover .ypt-card__title { color: var(--ypt-green); text-decoration: underline; }
.ypt-archive .ypt-card__link:focus-visible { outline: 3px solid #7fb8a1; outline-offset: 2px; }

@media (max-width: 1023px) {
  .ypt-archive .ypt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 18px; }
  .ypt-archive .ypt-card__title { font-size: 16px; }
}
@media (max-width: 599px) {
  .ypt-archive .ypt-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .ypt-archive .ypt-card__title { font-size: 16px; line-height: 1.4; margin-top: 10px; } /* 1.4.2：17px・1.55 → 16px・1.4 */
  .ypt-archive .ypt-label { font-size: 12px; padding: 4px 9px; }
}
