#template-article {
    padding: 0;
}

#article-page {
    font-family: YakuHanMPs, "Noto Serif", "Noto Serif JP", serif;
}

ul.wp-block-list,
ol.wp-block-list {
    background-color: #faf5f8;
    border-radius: 1rem;
    margin: 1.5rem 0;
    padding: 1rem 1.5rem 1rem 2.5rem;
    list-style: none;
}

ol.wp-block-list {
    list-style: decimal;
}

.wp-block-list li {
    position: relative;
    padding: 0.6rem 0;
    line-height: 1.8;
}

.wp-block-list li:empty {
    display: none;
}

ul.wp-block-list li::before {
    content: "";
    position: absolute;
    left: -1.25rem;
    top: 1.15rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #a64d79;
}

ol.wp-block-list li::marker {
    color: #a64d79;
    font-weight: 700;
}

.wp-block-table {
    margin: 1.5rem 0;
    border: 1px solid #d1a8bb;
}

.wp-block-table table {
    width: 100%;
    border-collapse: collapse;
}

.wp-block-table td {
    padding: 0.75rem 1rem;
    border: 1px solid #d1a8bb;
    line-height: 1.6;
}

.wp-block-table tbody tr:first-child td {
    background-color: #83164c;
    border-color: #83164c;
    color: #fff;
    font-weight: 700;
}

.wp-block-table tbody tr:first-child td:not(:last-child) {
    border-right: 1px solid #fff;
}

.wp-block-quote {
    position: relative;
    margin: 1.5rem 0;
    padding: 1.5rem 1.5rem 1.5rem 3rem;
    background-color: #faf5f8;
    border-radius: 0.5rem;
}

.wp-block-quote::before {
    content: "\201C";
    position: absolute;
    top: 0.1rem;
    left: 1rem;
    font-family: Georgia, serif;
    font-size: 2.75rem;
    line-height: 1;
    color: #a64d79;
    opacity: 0.5;
}

.wp-block-quote p {
    margin: 0;
    line-height: 1.9;
    font-style: italic;
    color: #372b32;
}

.wp-block-quote cite {
    display: block;
    margin-top: 0.75rem;
    font-style: normal;
    font-size: 0.85rem;
    color: #a64d79;
    text-align: right;
}

.wp-block-quote cite::before {
    content: "\2014 ";
}

.breadcrumb {
    max-width: 924px;
    padding: 140px 12px 0;
    margin: 0 auto;
    margin-bottom: 0;
}

@media (max-width: 1199px) {
    .breadcrumb {
        padding-top: 130px;
    }
}

.breadcrumb a {
    color: #372b32;
}

.breadcrumb a:hover {
    opacity: 0.7;
}

.breadcrumb span {
    margin: 0 4px;
}

.tags {
    margin-bottom: 12px;
    display: flex;
}
.tags a {
    padding: 2px 16px;
    background: var(--accent-color);
    color: #ffffff;
    margin-right: 6px;
    display: block;
    font-size: 12px;
}

.attachment-large.size-large.wp-post-image {
    width: 100%;
    aspect-ratio: 800 / 450;
    height: auto;
    -o-object-fit: cover;
    object-fit: cover;
}

.wp-block-image {
    display: block !important;
    width: 100%;
    position: relative;

}

.wp-block-image.size-full img,
.wp-block-image.size-large img {
    width: 100%;
    aspect-ratio: 800 / 450;
    height: auto;
    -o-object-fit: cover;
    object-fit: cover;
}

figure.wp-block-gallery.has-nested-images {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
}

figure.wp-block-gallery.has-nested-images figure {
    width: 100% !important;
    max-width: 437px;
}

.wp-block-embed.wp-block-embed-youtube {
    margin: 1.5rem 0;
}

.wp-block-embed.wp-block-embed-youtube .wp-block-embed__wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.wp-block-embed.wp-block-embed-youtube .wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.wp-block-embed.wp-block-embed-youtube figcaption {
    margin-top: 0.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: #666;
}

.wp-element-caption {
    width: 100%;
    text-align: center;
    position: absolute;
    bottom: 0%;
    left: 50%;
    -webkit-transform: translate(-50%, 0%);
    transform: translate(-50%, 0%);
    box-sizing: border-box;
    color: #fff;
    font-size: 13px;
    margin: 0;
    overflow: auto;
    padding: 1em;
    text-align: center;
    text-shadow: 0 0 1.5px #000;
    background: linear-gradient(0deg, #0006, #0000);
}

/*
 * ギャラリーブロック内のキャプションは、WordPress自身が出力するインラインCSSで
 * left:0/right:0(position:absolute)を指定してくる(詳細度が上のルールより高い)。
 * その結果 left だけが 0 に上書きされ、上の transform: translate(-50%, 0%) が
 * 残ったままになり、キャプションが自身の幅の半分だけ左にずれてしまう。
 * ギャラリー内に限り transform を打ち消して WordPress側の指定に委ねる。
 */
.wp-block-gallery .wp-element-caption {
    left: 0;
    -webkit-transform: none;
    transform: none;
}

.wp-block-heading {
    font-size: 20px;
    background-color: #83164c;
    color: #fff;
    padding: 10px 12px;
    margin-bottom: 16px;
}

#header {
    background-color: #83164c;
}

/*
 * 記事ページはヘッダー背景を常に濃色(#83164c)で固定しているため、
 * header.css側の「スクロール時は背景が明るくなるのでナビ文字を暗くする」
 * (.scrolled .header { --nav-color: #444444 }) は当てはまらない。
 * 記事ページに限り、スクロール後も文字・ロゴを白のままにする。
 */
body.scrolled .header {
    --nav-color: #ffffff;
}

body.scrolled .header .logo img,
body.scrolled .header:hover .logo img {
    filter: brightness(5);
}

#top-news-topics {
    max-width: 952px;
    width: 100%;
    margin: 0 auto;
    padding: 48px 14px 64px;
}

.article {
    max-width: 900px;
    margin: 0 auto;
}

.article-date {
    font-size: 12px;
    margin-bottom: 6px;
    color: #666;
}

.article-title {
    font-size: 24px;
    margin-bottom: 8px;
}

hr {
    margin: 1rem 0;
    color: inherit;
    border: 0;
    border-top: var(--bs-border-width) solid;
    opacity: .25;
}

.article-content {
    margin-top: 24px;
    line-height: 1.8;
}

@media (max-width: 768px) {
    figure.wp-block-gallery.has-nested-images {
        display: block;
    }

    figure.wp-block-gallery.has-nested-images figure {
        width: 100% !important;
        max-width: 765px;
    }
}

.post-navigation {
    max-width: 240px;
    width: 100%;
    margin: 3rem auto 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-navigation .nav-prev,
.post-navigation .nav-next {
    color: var(--accent-color);
    font-size: 14px;
    text-decoration: none;
}

.post-navigation .nav-prev:hover,
.post-navigation .nav-next:hover {
    text-decoration: underline;
}

.post-navigation .nav-prev .bi-chevron-left {
    margin-right: 4px;
}

.post-navigation .nav-next .bi-chevron-right {
    margin-left: 4px;
}

.post-navigation .nav-disabled {
    visibility: hidden;
}

.related-articles {
    max-width: 900px;
    width: 100%;
    margin: 3rem auto 0;
    background-color: unset;
    border-top: solid 1px #dee2e6;
}

.related-articles-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #372b32;
}

.related-articles .article-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    position: relative;
    width: 100%;
}

.related-articles .article-item {
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .08);
    border-radius: 12px;
}

.related-articles .article-item a {
    display: block;
    height: 100%;
}

.related-articles .article-item .thumb {
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.related-articles .article-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
    -o-object-fit: cover;
    object-fit: cover;
}

.related-articles .article-item:hover img {
    transform: scale(1.1);
    transition: 0.3s;
}

.related-articles .article-item h3 {
    font-size: 16px;
    margin-bottom: 0;
    margin-top: 4px;
}

.related-articles .article-item .content {
    padding: 12px;
}

@media (max-width: 990px) {
    .related-articles .article-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .related-articles .article-list {
        grid-template-columns: 1fr;
    }
}
