/* ==================================================
   Stories archive and single-post editorial templates
   ================================================== */

.wf-stories-archive,
.wf-story-single {
  /* 20pxでは画面端に文字が寄りすぎて窮屈という指摘（2026-09-16）。 */
  --wf-story-gutter: clamp(28px, 8.33vw, 120px);
  --wf-chrome-gutter: var(--wf-story-gutter);
  width: 100%;
  max-width: none;
  margin: 0;
  /* サイトフッターはこのコンテナの内側に出力される。下paddingを残すと
     黒いフッターの下に白い余白が見える（2026-09-16）。下は0にし、
     本文との間隔はフッター側の margin-top で確保する。 */
  padding: 0 var(--wf-story-gutter) 0;
  box-sizing: border-box;
  color: var(--wf-color-ink);
  font-family: var(--wf-font-ja);
}
.wf-story-single .wf-footer-wrap,
.wf-stories-archive .wf-footer-wrap {
  margin-top: 120px;
}
.wf-stories-archive *,
.wf-stories-archive *::before,
.wf-stories-archive *::after,
.wf-story-single *,
.wf-story-single *::before,
.wf-story-single *::after {
  box-sizing: border-box;
}
.wf-stories-archive a,
.wf-story-single a {
  color: inherit;
}
.wf-stories-archive .wf-header,
.wf-story-single .wf-header {
  width: min(
    calc(100vw - (var(--wf-story-gutter) * 2)),
    var(--wf-content-max)
  );
  margin-right: auto;
  margin-left: auto;
}
.wf-stories-archive__header {
  width: min(100%, var(--wf-content-max));
  margin: 0 auto;
  padding: 112px 0 72px;
}
.wf-stories-archive__header > p,
.wf-story__eyebrow,
.wf-story-cta > p,
.wf-story__author > p:first-child {
  margin: 0 0 18px;
  font-family: var(--wf-font-sans);
  font-size: 11px;
  letter-spacing: 0.12em;
}
.wf-stories-archive h1,
.wf-story h1 {
  margin: 0;
  font-weight: var(--wf-font-weight-heading);
  letter-spacing: normal;
}
.wf-stories-archive h1 {
  font-size: clamp(48px, 6.2vw, 86px);
  line-height: 0.94;
}
.wf-stories-archive__header > div {
  max-width: var(--wf-article-max);
  margin-top: 28px;
}
.wf-stories-archive__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 56px 40px;
  width: min(100%, var(--wf-content-max));
  margin: 0 auto;
}
.wf-story-card a {
  display: block;
  text-decoration: none;
}
/* height: auto が無いと WordPress の height 属性が優先され、幅だけ縮んで
   高さが元のまま（超縦長）になる。aspect-ratio も効かなくなる。 */
.wf-story-card img,
.wf-story-card__placeholder {
  display: grid;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  place-items: center;
  background: #e7e7e2;
  object-fit: cover;
}
.wf-story-card__placeholder {
  border: 1px solid #c5c5be;
  color: #30302d;
  font: 11px var(--wf-font-sans);
  letter-spacing: 0.1em;
}
.wf-story-card time,
.wf-story__header time {
  display: block;
  margin-top: 16px;
  color: #555;
  font-size: 12px;
}
.wf-story-card h2 {
  margin: 10px 0 0;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.2;
}
.wf-story-card p {
  margin: 12px 0 0;
  color: #555;
  font-size: 14px;
}
.wf-story-card__protected {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #333;
}
.wf-stories-archive .page-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  width: min(100%, var(--wf-content-max));
  margin: 72px auto 0;
  padding: 0;
  list-style: none;
}
.wf-stories-archive .page-numbers a,
.wf-stories-archive .page-numbers span {
  display: grid;
  min-width: 40px;
  min-height: 40px;
  place-items: center;
  border: 1px solid #111;
  text-decoration: none;
}
.wf-stories-archive .page-numbers .current {
  background: #111;
  color: #fff;
}
.wf-stories-archive__empty {
  width: min(100%, var(--wf-content-max));
  margin: 0 auto;
}

.wf-story__header {
  width: min(100%, var(--wf-content-max));
  margin: 0 auto;
  padding: 112px 0 96px;
  padding-left: var(--wf-story-gutter);
}
.wf-story h1 {
  max-width: 1000px;
  font-size: var(--wf-font-size-h1);
  line-height: var(--wf-line-h1);
  text-wrap: balance;
}
.wf-story__deck {
  max-width: var(--wf-article-max);
  margin: 32px 0 0;
  font-size: 20px;
  line-height: 1.5;
}
.wf-story__hero {
  width: min(100%, var(--wf-content-max));
  margin: 0 auto 120px;
}
.wf-story__hero img {
  display: block;
  width: 100%;
  height: auto;
}
.wf-story__content {
  width: min(100%, var(--wf-content-max));
  margin: 0 auto;
  padding-left: var(--wf-story-gutter);
  font-size: 16px;
  line-height: 1.75;
}
.wf-story__content > * {
  max-width: var(--wf-article-max);
}
.wf-story__content p,
.wf-story__content ul,
.wf-story__content ol {
  margin: 0 0 24px;
}
.wf-story__content .post-password-form {
  margin: 0 0 24px;
}
.wf-story__content .post-password-form label {
  display: block;
}
.wf-story__content .post-password-form input[type="password"] {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 320px;
  height: 48px;
  margin-top: 8px;
  padding: 0 14px;
  border: 1px solid #dadde1;
  border-radius: 0;
  background: #ffffff;
  font: inherit;
}
.wf-story__content .post-password-form .wp-block-button {
  display: block;
  margin-top: 16px;
}
.wf-story__content .post-password-form input[type="submit"] {
  display: inline-flex;
  box-sizing: border-box;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: 0;
  border-radius: 0;
  background: #111;
  color: #fff !important;
  font: inherit;
  cursor: pointer;
}
.wf-story__content h2,
.wf-story__content h3 {
  margin: 36px 0 18px;
  font-weight: 400;
  letter-spacing: normal;
}
.wf-story__content h2 {
  font-size: var(--wf-font-size-h2);
  line-height: var(--wf-line-h2);
}
.wf-story__content h3 {
  font-size: var(--wf-font-size-h3);
  line-height: var(--wf-line-h3);
}
.wf-story__content figure {
  margin: 56px 0;
}
.wf-story__content figure.alignwide {
  width: min(100vw - (var(--wf-story-gutter) * 2), var(--wf-content-max));
  max-width: none;
  margin-right: calc((min(100vw - (var(--wf-story-gutter) * 2), var(--wf-content-max)) - var(--wf-article-max)) / -2);
  margin-left: calc((min(100vw - (var(--wf-story-gutter) * 2), var(--wf-content-max)) - var(--wf-article-max)) / -2);
}
.wf-story__content figure img {
  display: block;
  width: 100%;
  height: auto;
}
.wf-story__content figcaption {
  margin-top: 10px;
  color: #555;
  font-size: 12px;
  line-height: 1.5;
}
.wf-story__content blockquote {
  margin: 56px 0;
  padding: 0;
  border: 0;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.18;
}
.wf-story__content blockquote cite {
  display: block;
  margin-top: 16px;
  font-size: 12px;
  font-style: normal;
}
.wf-story-cta {
  margin: 72px 0;
  padding: 36px;
  border: 1px solid #111;
  background: #f2f2ee;
}
.wf-story-cta h2,
.wf-story__author h2 {
  margin: 0;
  font-size: 30px;
  font-weight: 400;
  line-height: 1.1;
}
.wf-story-button {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  margin-top: 28px;
  padding: 12px 24px;
  background: #111;
  color: #fff !important;
  text-decoration: none;
}
/* <footer> タグを使っているため、親テーマの「フッターは黒背景」という
   スタイルが当たり、黒背景に黒文字で読めなくなっていた（2026-09-16）。
   背景と文字色を明示して打ち消す。 */
.wf-story__author {
  width: min(100%, var(--wf-article-max));
  margin: 120px auto 0;
  padding-top: 36px;
  border-top: 1px solid #111;
  background: transparent !important;
  color: var(--wf-color-ink) !important;
}
.wf-story__author p,
.wf-story__author h2 {
  color: var(--wf-color-ink) !important;
}
.wf-story__author > p:last-child {
  margin: 18px 0 0;
}
.wf-story > .wf-story-cta--article_final_membership {
  width: min(100%, var(--wf-content-max));
  margin: 96px auto 0;
  padding: 64px;
  background: #111;
  color: #fff;
}
.wf-story-cta--article_final_membership .wf-story-button {
  background: #fff;
  color: #111 !important;
}

@media (max-width: 767px) {
  /* サイトフッターはこのコンテナの内側にあるため、下paddingを入れると
     黒いフッターの下に白い余白が出る。間隔はフッター側で取る。 */
  .wf-stories-archive,
  .wf-story-single {
    --wf-story-gutter: 5%;
    padding-bottom: 0;
  }
  .wf-story-single .wf-footer-wrap,
  .wf-stories-archive .wf-footer-wrap {
    margin-top: 72px;
  }
  .wf-stories-archive__header,
  .wf-story__header {
    padding: 72px 0 56px;
  }
  .wf-story__header,
  .wf-story__content {
    padding-left: 0;
  }
  .wf-stories-archive__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .wf-story-card h2 {
    font-size: 20px;
  }
  .wf-story__deck {
    font-size: 18px;
  }
  .wf-story__hero {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-bottom: 72px;
  }
  .wf-story__content figure.alignwide {
    width: 100%;
    margin-right: 0;
    margin-left: 0;
  }
  .wf-story-cta,
  .wf-story > .wf-story-cta--article_final_membership {
    margin-top: 56px;
    margin-bottom: 56px;
    padding: 28px;
  }
  .wf-story__author {
    margin-top: 72px;
  }
}
