/* =========================================================
   全記事一覧：明るい紙色と深緑の編集誌
========================================================= */
.sf-journal {
  padding: 48px 0 56px;
  color: #173f38;
  background: #faf8f2;
}
.sj-wrap {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}
.sj-heading {
  margin-bottom: 28px;
}
.sj-label {
  margin: 0 0 16px;
  color: #967a49;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
}
.sj-label span {
  margin-left: 16px;
  color: #51635b;
  letter-spacing: .04em;
}
.sj-heading h1 {
  margin: 0 0 18px;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.5;
}
.sj-heading > p:last-child {
  margin: 0;
  color: #56655d;
  font-size: 15px;
  line-height: 1.9;
}
/* カテゴリー選択：全カテゴリーを自動表示 */
.sj-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}
.sj-filters a {
  padding: 10px 20px;
  color: #173f38;
  background: transparent;
  border: 1px solid #b6bcb0;
  border-radius: 30px;
  font-size: 13px;
  line-height: 1.6;
  text-decoration: none;
}
.sj-filters a[aria-current],
.sj-filters a:hover {
  color: #fffaf2;
  background: #173f38;
  border-color: #173f38;
}
/* 上部特集：大きな１記事と小さな２記事 */
.sj-feature {
  padding: 32px 0;
  background: #edf0e5;
}
.sj-feature-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 20px;
}
.sj-feature-grid > :first-child {
  grid-row: span 2;
}
.sj-card {
  min-width: 0;
  margin: 0;
  border: 1px solid #ddd9cd;
  background: #fffdf8;
}
.sj-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
  transition: background-color .25s ease, box-shadow .25s ease;
}
.sj-photo {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e9e8de;
}
.sj-photo img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
}
.sj-placeholder {
  display: grid;
  height: 100%;
  place-items: center;
  color: #718277;
  font-family: Georgia, serif;
  font-size: 24px;
}
.sj-card-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 22px;
}
.sj-category {
  margin: 0 0 10px;
  color: #8e7548;
  font-size: 11px;
  font-weight: 600;
}
.sj-card h3 {
  margin: 0 0 12px;
  font-size: 19px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.sj-excerpt {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 20px;
  color: #59685e;
  font-size: 13px;
  line-height: 1.85;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.sj-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}
.sj-card-bottom time {
  color: #748076;
  font-size: 11px;
}
.sj-read {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.sj-read span {
  margin-left: 8px;
  color: #9b8052;
}
.sj-feature-grid > :first-child h3 {
  font-size: clamp(22px, 2vw, 28px);
}
.sj-feature-grid > :not(:first-child) .sj-card-link {
  display: grid;
  grid-template-columns: 38% 1fr;
}
.sj-feature-grid > :not(:first-child) .sj-photo {
  height: 100%;
  min-height: 180px;
  aspect-ratio: auto;
}
.sj-feature-grid > :not(:first-child) .sj-excerpt {
  display: none;
}
/* 下部一覧：写真を控えめに、タイトルを読みやすく */
.sj-list {
  padding-top: 48px;
}
.sj-list-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.sj-list-heading h2 {
  margin: 0;
  font-size: 23px;
}
.sj-list-heading p {
  margin: 0;
  color: #647469;
  font-size: 12px;
}
.sj-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.sj-grid .sj-photo {
  aspect-ratio: 16 / 8;
}
@media (hover: hover) {
  .sj-card-link:hover {
    background: #eef2e9;
    box-shadow: 0 8px 20px rgba(23, 63, 56, .08);
  }
}
.sf-journal a:focus-visible {
  outline: 2px solid #a18755;
  outline-offset: 4px;
}
/* ページ送り：スマホでも折り返さず１行 */
.sf-journal .pagination {
  margin: 36px auto 0;
  padding: 0 12px;
}
.sf-journal .nav-links {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.sf-journal .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 40px;
  padding: 8px 12px;
  color: #173f38;
  border: 1px solid #cccabd;
  border-radius: 3px;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}
.sf-journal .page-numbers.current {
  color: #fffaf2;
  background: #173f38;
  border-color: #173f38;
}
.sf-journal .page-numbers.dots {
  min-width: 14px;
  padding-inline: 0;
  border: 0;
}
.sj-empty {
  padding-block: 40px;
}
/* タブレット・スマホ */
@media (max-width: 980px) {
  .sj-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sj-feature-grid > :not(:first-child) .sj-card-link {
    display: flex;
  }
  .sj-feature-grid > :not(:first-child) .sj-photo {
    min-height: 0;
    height: auto;
    aspect-ratio: 16 / 7;
  }
}
@media (max-width: 767px) {
  .sf-journal {
    padding-block: 32px 40px;
  }
  .sj-wrap {
    width: calc(100% - 32px);
  }
  .sj-heading h1 {
    font-size: 27px;
  }
  .sj-heading > p:last-child {
    font-size: 14px;
  }
  .sj-filters {
    gap: 8px;
    margin-bottom: 24px;
  }
  .sj-filters a {
    padding: 8px 13px;
    font-size: 12px;
  }
  .sj-feature {
    padding-block: 24px;
  }
  .sj-feature-grid,
  .sj-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .sj-feature-grid > :first-child {
    grid-row: auto;
  }
  .sj-feature-grid > :not(:first-child) .sj-card-link {
    display: grid;
    grid-template-columns: 32% 1fr;
  }
  .sj-feature-grid > :not(:first-child) .sj-photo {
    height: 100%;
    aspect-ratio: auto;
  }
  .sj-card-copy {
    padding: 18px;
  }
  .sj-card h3 {
    font-size: 18px;
  }
  .sj-feature-grid > :not(:first-child) h3 {
    font-size: 16px;
  }
  .sj-card-bottom {
    flex-wrap: wrap;
    row-gap: 8px;
  }
  .sj-read {
    margin-left: auto;
  }
  .sj-list {
    padding-top: 36px;
  }
  .sf-journal .nav-links {
    gap: 4px;
  }
  .sf-journal .page-numbers {
    min-width: 28px;
    min-height: 38px;
    padding: 7px 8px;
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sj-card-link {
    transition: none;
  }
}

/* =========================================================
   B案の上部誌面：特集を先に、写真と文章を一体に
========================================================= */
.sf-journal {
  padding-top: 0;
}
.sj-feature {
  padding-block: 36px;
}
.sj-heading {
  padding-top: 40px;
  text-align: center;
}
.sj-filters {
  justify-content: center;
  margin-bottom: 0;
}
.sj-feature-grid {
  align-items: stretch;
  grid-template-columns: 1.15fr 1fr;
  gap: 24px;
}
.sj-feature-grid > :first-child {
  border: 0;
  background: transparent;
}
.sj-feature-grid > :first-child .sj-card-link {
  position: relative;
  justify-content: flex-end;
  min-height: 420px;
  padding: 24px;
  isolation: isolate;
}
.sj-feature-grid > :first-child .sj-photo {
  position: absolute;
  inset: 0;
  height: 100%;
  aspect-ratio: auto;
  z-index: -1;
}
.sj-feature-grid > :first-child .sj-card-copy {
  flex: 0 0 auto;
  width: min(88%, 480px);
  padding: 24px;
  background: rgba(255, 253, 248, .97);
}
.sj-feature-grid > :first-child h3 {
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.6;
}
.sj-feature-grid > :first-child .sj-excerpt {
  margin-bottom: 16px;
}
.sj-feature-grid > :not(:first-child) .sj-card-link {
  display: grid;
  grid-template-columns: 30% minmax(0, 1fr);
}
.sj-feature-grid > :not(:first-child) .sj-card-copy {
  padding: 24px;
}
.sj-feature-grid > :not(:first-child) h3 {
  font-size: 20px;
  line-height: 1.65;
}
.sj-feature-grid > :not(:first-child) .sj-photo {
  height: 100%;
  min-height: 190px;
  aspect-ratio: auto;
}
@media (max-width: 980px) {
  .sj-feature-grid {
    gap: 18px;
  }
  .sj-feature-grid > :first-child .sj-card-link {
    min-height: 400px;
    padding: 18px;
  }
  .sj-feature-grid > :first-child .sj-card-copy {
    width: 100%;
    padding: 20px;
  }
  .sj-feature-grid > :not(:first-child) .sj-card-copy {
    padding: 18px;
  }
  .sj-feature-grid > :not(:first-child) h3 {
    font-size: 18px;
  }
}
@media (max-width: 767px) {
  .sf-journal {
    padding-top: 0;
  }
  .sj-feature {
    padding-block: 24px;
  }
  .sj-feature-grid {
    grid-template-columns: 1fr;
  }
  .sj-feature-grid > :first-child .sj-card-link {
    min-height: 380px;
    padding: 16px;
  }
  .sj-feature-grid > :first-child .sj-card-copy {
    padding: 20px;
  }
  .sj-feature-grid > :first-child h3 {
    font-size: 22px;
  }
  .sj-feature-grid > :not(:first-child) .sj-card-link {
    grid-template-columns: 28% minmax(0, 1fr);
  }
  .sj-feature-grid > :not(:first-child) .sj-photo {
    min-height: 160px;
  }
  .sj-feature-grid > :not(:first-child) h3 {
    font-size: 17px;
  }
  .sj-heading {
    padding-top: 32px;
  }
}

/* =========================================================
   記事一覧の目次：左に見出し、右に説明、下にテーマタブ
========================================================= */
#primary.sf-journal .sj-heading {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  align-items: end;
  gap: 32px;
  padding-top: 40px;
  padding-bottom: 28px;
  text-align: left;
}
#primary.sf-journal .sj-heading h1 {
  margin: 12px 0 0;
  font-size: clamp(25px, 2.8vw, 36px);
  line-height: 1.55;
}
#primary.sf-journal .sj-heading-intro {
  margin: 0;
  padding-left: 24px;
  border-left: 1px solid #c5cbbd;
  color: #52645c;
  font-size: 14px;
  line-height: 1.9;
}
#primary.sf-journal .sj-filters {
  justify-content: flex-start;
  gap: 0;
  padding-block: 0;
  border-top: 1px solid #c5cbbd;
  border-bottom: 1px solid #c5cbbd;
}
#primary.sf-journal .sj-filters a {
  margin: 0;
  padding: 15px 20px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #35534a;
  font-size: 13px;
}
#primary.sf-journal .sj-filters a[aria-current="page"] {
  border-bottom-color: #b28e54;
  background: #e9eee4;
  color: #173f38;
  font-weight: 700;
}
/* =========================================================
   ページ送り：線で区切る誌面風、前後は横長リンク
========================================================= */
#primary.sf-journal .pagination {
  width: min(1240px, calc(100% - 32px));
  margin: 40px auto 0;
  padding: 22px 0;
  border-top: 1px solid #bdc7bb;
  border-bottom: 1px solid #bdc7bb;
}
#primary.sf-journal .nav-links {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
#primary.sf-journal .page-numbers {
  display: inline-flex !important;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: auto !important;
  min-width: 36px;
  height: 40px;
  min-height: 40px;
  margin: 0 !important;
  padding: 0 10px !important;
  border: 0;
  border-radius: 0;
  color: #173f38;
  background: transparent;
  font-size: 14px;
  line-height: 1 !important;
  white-space: nowrap;
  text-decoration: none;
}
#primary.sf-journal .page-numbers.current {
  color: #fffdf8;
  background: #173f38;
}
#primary.sf-journal .page-numbers.prev {
  margin-right: auto !important;
}
#primary.sf-journal .page-numbers.next {
  margin-left: auto !important;
}
#primary.sf-journal .page-numbers.prev,
#primary.sf-journal .page-numbers.next {
  min-width: 106px;
  border: 1px solid #b8c2b7;
  font-weight: 600;
}
#primary.sf-journal .page-numbers.dots {
  min-width: 16px;
  padding: 0 !important;
}
@media (hover: hover) {
  #primary.sf-journal .sj-filters a:hover,
  #primary.sf-journal a.page-numbers:hover {
    background: #e9eee4;
    color: #173f38;
  }
}
@media (max-width: 767px) {
  #primary.sf-journal .sj-heading {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-top: 30px;
    padding-bottom: 22px;
  }
  #primary.sf-journal .sj-heading-intro {
    padding-left: 0;
    border: 0;
    font-size: 13px;
  }
  #primary.sf-journal .sj-filters a {
    padding: 12px 13px;
    font-size: 12px;
  }
  #primary.sf-journal .pagination {
    margin-top: 28px;
    padding-block: 16px;
  }
  #primary.sf-journal .nav-links {
    gap: 3px;
  }
  #primary.sf-journal .page-numbers {
    min-width: 26px;
    height: 36px;
    min-height: 36px;
    padding-inline: 5px !important;
    font-size: 12px;
  }
  #primary.sf-journal .page-numbers.prev,
  #primary.sf-journal .page-numbers.next {
    min-width: 62px;
  }
  #primary.sf-journal .page-numbers.dots {
    min-width: 10px;
  }
}
@media (max-width: 359px) {
  #primary.sf-journal .page-numbers:not(.prev):not(.next):not(.current) {
    display: none !important;
  }
}
