@charset "UTF-8";

/* CSSカスタムプロパティ */
:root {
  --font-mincho: "yu-mincho-pr6n", "Yu Mincho", "YuMincho", 'ＭＳ Ｐ明朝', 'MS PMincho', serif;
  --font-brush-mincho: "dnp-shuei-4go-std", "yu-mincho-pr6n", "Yu Mincho", "YuMincho", 'ＭＳ Ｐ明朝', 'MS PMincho', serif;
  --font-gothic: "a-otf-gothic-bbb-pr6n", 'ヒラギノ角ゴシック Pro', 'Hiragino Kaku Gothic Pro', "メイリオ", sans-serif;
}

strong,
.gokingen {
  font-family: var(--font-gothic);
  font-weight: 500;
}

.issue.memorial h2 {
  font-size: 1.8rem;
}

.issue.memorial p {
  margin: 0;
}

.issue.memorial p.para {
  margin: 1.5em 0 0;
}

.issue.memorial p.subtitle {
  font-family: var(--font-brush-mincho);
  font-size: 1.2rem;
  color: #4a4a4a;
  line-height: 1.5rem;
  text-align: right;
  margin: -1em 0 1em;
}

/* 図表 */
figure {
  margin: 1em 40px;
}

figure img {
  display: block;
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  margin: 0 auto;
}

figcaption {
  display: block;
  font-family: var(--font-gothic);
  font-size: 1rem;
  color: #4a4a4a;
  line-height: 1.5rem;
  text-align: center;
  padding-top: 0.5rem;
}

figcaption.left {
  text-align: left;
  padding-left: 0;
}

.portrait-deceased {
  display: block;
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  margin: 0 auto;
  border: 12px double black;
  box-sizing: border-box;
}

.photo-set {
  margin: 1.5em 40px;
}

.photo-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8em;
}

.photo-row.columns-2 {
  grid-template-columns: repeat(2, 1fr);
}

.photo-row>figure {
  margin: 0;
}

.photo-row>figure>img,
.photo-row>img {
  display: block;
  width: 100%;
  height: auto;
}

.photo-row.columns-2.reverse> :nth-child(1) {
  order: 2;
}

.photo-row.columns-2.reverse> :nth-child(2) {
  order: 1;
}

.photo-row figcaption,
.photo-set figcaption {
  margin: 0;
}

/* ========================================
   特別追悼号 追従目次
======================================== */

/* 本文＋目次 */
.memorial-layout {
  width: 1280px;
  margin: 50px auto 0;
  display: grid;
  grid-template-columns: 1000px 260px;
  grid-template-areas: "content toc";
  gap: 20px;
  align-items: start;
}

/* 既存の #contents の中央寄せ・上マージンを解除 */
.memorial-layout #contents {
  grid-area: content;
  width: 1000px;
  margin: 0;
}

.memorial-layout #contents h2:first-child {
  margin-top: 0;
}

/* 目次 */
.memorial-toc {
  grid-area: toc;
  position: sticky;
  top: 20px;
  align-self: start;
  width: 260px;
  box-sizing: border-box;
  border: 1px solid #e5e5e5;
  background: #fff;
  z-index: 10;
}

.memorial-toc__title {
  margin: 0;
  padding: 10px;
  background: #3760c8;
  color: #fff;
  font-family: var(--font-gothic);
  font-size: 1rem;
  line-height: 1.5;
  text-align: center;
}

.memorial-toc__list,
.memorial-toc__list ul {
  margin: 0;
  list-style: none;
}

.memorial-toc__list {
  padding: 10px 18px 18px;
}

.memorial-toc__list>li {
  border-bottom: 1px dotted #ccc;
}

.memorial-toc__list li {
  font-family: var(--font-gothic);
  font-size: 0.9rem;
  line-height: 1.5;
}

.memorial-toc__list a {
  position: relative;
  display: block;
  padding: 8px 0 8px 16px;
  color: #222;
  text-decoration: none;
  transition: color 0.2s ease;
}

.memorial-toc__list>li>a::before {
  content: "";
  position: absolute;
  top: 1.05em;
  left: 0;
  width: 6px;
  height: 6px;
  border-top: 2px solid #3760c8;
  border-right: 2px solid #3760c8;
  transform: rotate(45deg);
}

.memorial-toc__list a:hover {
  color: #3760c8;
}

/* 子項目 */
.memorial-toc__list ul {
  padding: 0 0 6px 14px;
}

.memorial-toc__list ul li {
  font-size: 0.85rem;
}

.memorial-toc__list ul a {
  padding: 5px 0 5px 13px;
}

.memorial-toc__list ul a::before {
  content: "";
  position: absolute;
  top: 0.95em;
  left: 1px;
  width: 5px;
  height: 1px;
  background: #888;
}

/* PCでは開閉ボタンは不要 */
.memorial-toc__toggle {
  display: none;
}

/* アンカー移動時の余白 */
.issue.memorial h2[id] {
  scroll-margin-top: 20px;
}

@media all and (max-width: 768px) {
  .header h1 {
    font-family: var(--font-brush-mincho);
    font-size: 1.2em;
    font-weight: 500;
    text-align: center;
    line-height: 60px;
    height: 48px;
    width: 100%;
    background: #12335a;
    color: #fff;
    margin: 0;
  }

  .issue.memorial h2 {
    width: auto;
    margin: 30px 20px 0;
    font-size: 1.2em;
    background: #3760c8;
    color: #fff;
    padding: 5px;
    line-height: 1.5em;
    text-align: center;
    font-family: var(--font-brush-mincho);
    border: 0;
  }

  .issue.memorial section {
    width: auto;
    margin: 0 20px;
    padding: 20px;
    background-color: #fff;
    color: #11202f;
    display: block;
    float: none;
    text-align: justify;
    font-size: 1.15em;
    font-family: var(--font-mincho);
    line-height: 1.8em;
    border: 1px solid #d4d4d4;
  }

  .issue.memorial p.subtitle {
    font-size: 1rem;
    line-height: 1.2em;
  }

  .issue.memorial h3 {
    color: #11202f;
    text-align: left;
    line-height: 1.4em;
    margin: 2rem 0 1rem -0.5rem;
  }

  /* ========================================
     特別追悼号 目次 SP
  ======================================== */

  .memorial-layout {
    display: block;
    width: auto;
    margin: 0;
  }

  .memorial-layout #contents {
    width: auto;
    margin: 0;
  }

  .memorial-layout #contents h2:first-child {
    margin-top: 50px;
  }

  .memorial-toc {
    position: sticky;
    top: 0;
    z-index: 90;
    width: 100%;
    margin: 0;
    border: 0;
    background: #12335a;
  }

  .memorial-toc__toggle {
    position: relative;
    z-index: 2;
    display: flex;
    /* ← これが重要 */
    align-items: center;
    justify-content: center;
    gap: 0.5em;

    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    padding: 0 60px;

    border: 0;
    background: #12335a;
    color: #fff;
    font: inherit;
    cursor: pointer;
  }

  .memorial-toc__toggle-text {
    font-family: var(--font-gothic);
    font-size: 0.95rem;
    font-weight: 500;
  }

  .memorial-toc__toggle-arrow {
    display: inline-block;
    width: 0.45em;
    height: 0.45em;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-0.15em) rotate(45deg);
    transition: transform 0.25s ease;
  }

  .memorial-toc.is-open .memorial-toc__toggle-arrow {
    transform: translateY(0.15em) rotate(225deg);
  }

  /* 開閉パネル */
  .memorial-toc__panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1;

    max-height: 0;
    overflow: hidden;
    opacity: 0;

    background: transparent;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.18);

    transition:
      max-height 0.45s ease,
      opacity 0.25s ease;
  }

  .memorial-toc.is-open .memorial-toc__panel {
    max-height: calc(100dvh - 44px);
    overflow-y: auto;
    opacity: 1;
    -webkit-overflow-scrolling: touch;
  }

  /* PC用タイトルはSPでは非表示 */
  .memorial-toc__title {
    display: none;
  }

  .memorial-toc__list {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .memorial-toc__list>li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }

  .memorial-toc__list li {
    font-family: var(--font-gothic);
    line-height: 1.4;
  }

  /*
   * 親項目
   */
  .memorial-toc__list>li>a,
  .memorial-toc__list>li>a:link,
  .memorial-toc__list>li>a:visited {
    display: block;
    padding: 0.9em 1em;

    background: rgba(129, 153, 186, 0.95);
    color: #fff;

    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
  }

  .memorial-toc__list a,
  .memorial-toc__list a:link,
  .memorial-toc__list a:visited {
    display: block;
    padding: 0.8em 1em;
    color: #fff;
    text-decoration: none;
  }

  /* PC用矢印を消す */
  .memorial-toc__list a::before,
  .memorial-toc__list>li>a::before,
  .memorial-toc__list ul a::before {
    content: none;
    display: none;
  }

  .memorial-toc__list a:hover,
  .memorial-toc__list a:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
  }

  /*
   * 子項目の領域
   */
  .memorial-toc__list ul {
    margin: 0;
    padding: 0;
    list-style: none;
    background: transparent;
  }

  /*
   * 子項目
   */
  .memorial-toc__list ul li {
    margin: 0;
    padding: 0;

    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .memorial-toc__list ul a,
  .memorial-toc__list ul a:link,
  .memorial-toc__list ul a:visited {
    display: block;

    /*
     * インデントで階層を表現
     */
    padding: 0.85em 1em 0.85em 2em;

    background: rgba(105, 130, 164, 0.95);
    color: #fff;

    font-size: 0.95rem;
    font-weight: normal;
    text-decoration: none;
  }

  /*
   * hover / focus
   */
  .memorial-toc__list>li>a:hover,
  .memorial-toc__list>li>a:focus {
    background: #748eaf;
  }

  .memorial-toc__list ul a:hover,
  .memorial-toc__list ul a:focus {
    background: #5f789b;
  }

  /*
   * 矢印・横棒等はすべて表示しない
   */
  .memorial-toc__list a::before,
  .memorial-toc__list a::after {
    content: none;
    display: none;
  }

  .memorial-toc__list>li,
  .memorial-toc__list ul li {
    border: 0;
  }

  /* 目次追従分を考慮 */
  /* memorial-toc.js を参照
  .issue.memorial h2[id] {
    scroll-margin-top: 48px;
  }
  */

  .memorial-toc__panel {
    background: transparent;
    /*
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    */
  }
}