/*
Theme Name: Genntenkaiki
Author: Genntenkaiki Team
Version: 1.0.0
*/

/* リセット＆基本スタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.is-hidden {
    display: none;
}

:root :where(.is-layout-flow) > * {
    margin-block-start: 0;
}

.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* お知らせバー */
.announcement-bar {
    padding: 0.5em 0;
    text-align: center;
    font-size: 14px;
    line-height: 1.4;
    background-color: var(--announcement-bg, #333333);
    color: var(--announcement-color, #ffffff);
}

.announcement-bar .container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.announcement-bar .announcement-link,
.announcement-bar .announcement-text {
    display: block;
    text-align: center;
}

.announcement-bar .announcement-link {
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.announcement-bar .announcement-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ヘッダーコンテナ幅 */
.site-header > .container {
    max-width: var(--genntenkaiki-header-width, none);
}

/* フッターコンテナ幅 */
.site-footer > .container {
    max-width: var(--genntenkaiki-footer-width, none);
}

/* 全幅・幅広配置 */
.alignfull {
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    max-width: 100vw !important;
    width: 100vw !important;
}

.alignwide {
    margin-left: -100px;
    margin-right: -100px;
    max-width: 1200px;
    width: auto;
}

/* 横スクロールを防止 */
body {
    overflow-x: hidden;
}

/* メインビジュアル */
.main-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
}

@media (max-width: 768px) {
    .main-visual {
        min-height: 180px;
    }
}

.main-visual-width-full {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.main-visual-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--mv-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: var(--mv-filter, none);
}

.main-visual-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--mv-overlay-color, #000);
    opacity: var(--mv-overlay-opacity, 0);
    pointer-events: none;
}

.main-visual-dot-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(0, 0, 0, 0.3) 0.5px, transparent 0.5px);
    background-size: 2px 2px;
}

.main-visual-title {
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 2rem 1rem;
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ページメインビジュアル（ページ個別設定） */
.page-main-visual {
    line-height: 0;
}

.page-main-visual-width-full {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.page-main-visual-width-content {
    max-width: var(--genntenkaiki-site-max-width, 1200px);
    margin-left: auto;
    margin-right: auto;
}

.page-main-visual-image-wrapper {
    margin: 0;
    line-height: 0;
}

.page-main-visual img,
.page-main-visual-img {
    width: 100%;
    height: auto;
    display: block;
}

/* ページメインビジュアル動画 */
.page-main-visual-video .page-main-visual-video-wrapper {
    position: relative;
    width: 100%;
    line-height: 0;
}

.page-main-visual-video video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.page-main-visual-video .page-main-visual-video-pc {
    display: block;
}

.page-main-visual-video .page-main-visual-video-mobile {
    display: none;
}

@media (max-width: 768px) {
    .page-main-visual-video .page-main-visual-video-pc {
        display: none;
    }

    .page-main-visual-video .page-main-visual-video-mobile {
        display: block;
    }

    /* モバイル動画がない場合はPC動画を表示 */
    .page-main-visual-video .page-main-visual-video-pc:only-child {
        display: block;
    }
}

/* パンくずリスト */
.breadcrumb {
    padding: 0.75rem 0;
    font-size: 11px;
    background-color: var(--breadcrumb-bg, transparent);
    border-top: 1px solid var(--breadcrumb-border-top, transparent);
    border-bottom: 1px solid var(--breadcrumb-border-bottom, transparent);
}

.breadcrumb-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.breadcrumb-item a {
    color: var(--genntenkaiki-text-color, #333);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    display: inline-block;
    width: 5px;
    height: 5px;
    margin: 0 0.5rem;
    border-top: 1.5px solid var(--genntenkaiki-text-color, #333);
    border-right: 1.5px solid var(--genntenkaiki-text-color, #333);
    transform: rotate(45deg);
}

.breadcrumb-current span {
    color: var(--genntenkaiki-text-color, #333);
}

/* ==========================================================================
   ウィジェットスタイル
   ========================================================================== */

/* ウィジェットベース */
.widget {
    margin-bottom: 2rem;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 1rem;
    padding: 0.8rem 1rem;
    background: var(--genntenkaiki-main-color, #6d7a84);
    color: #fff;
    border-bottom: none;
}

.sidebar .widget {
    font-size: 14px;
}

/* ウィジェットリスト（カテゴリー、アーカイブ、メニューなど） */
.widget ul:not(.wp-block-social-links) {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget ul:not(.wp-block-social-links) li {
    border-bottom: 1px solid #e5e5e5;
}

.widget ul:not(.wp-block-social-links) li:last-child {
    border-bottom: none;
}

.widget ul:not(.wp-block-social-links) li a {
    display: block;
    padding: 0.75rem 0;
    color: var(--genntenkaiki-text-color, #333);
    text-decoration: none;
}

.widget ul:not(.wp-block-social-links) li a:hover {
    color: var(--genntenkaiki-main-color, #6d7a84);
}

/* ネストされたリスト */
.widget ul:not(.wp-block-social-links) ul {
    margin-left: 1rem;
    border-top: 1px solid #e5e5e5;
}

.widget ul:not(.wp-block-social-links) ul li:first-child {
    border-top: none;
}

/* 投稿数 */
.widget li .count,
.widget li .post-count {
    float: right;
    font-size: 0.85em;
}

/* 検索ウィジェット */
.widget_search .wp-block-search__inside-wrapper,
.widget_search .search-form {
    display: flex;
    gap: 0;
    border: 1px solid #ddd;
}

.widget_search .search-form label {
    flex: 1;
    display: flex;
}

.widget_search .wp-block-search__input,
.widget_search .search-field {
    flex: 1;
    width: 100%;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 0;
    font-size: 0.9rem;
    outline: none;
}

.widget_search .wp-block-search__button,
.widget_search .search-submit {
    padding: 0;
    background-color: var(--genntenkaiki-main-color, #6d7a84);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px 18px;
    color: transparent;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-size: 0;
    transition: background-color 0.2s, filter 0.2s;
    width: 50px;
    flex-shrink: 0;
}

.widget_search .wp-block-search__button:hover,
.widget_search .search-submit:hover {
    filter: brightness(0.85);
}

/* 最近の投稿ウィジェット */
.widget_recent_entries ul:not(.wp-block-social-links) li a {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding-left: 1.5rem;
}

.widget_recent_entries ul li a::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-top: 2px solid var(--genntenkaiki-text-color, #333);
    border-right: 2px solid var(--genntenkaiki-text-color, #333);
    transform: translateY(-50%) rotate(45deg);
}

.widget_recent_entries .post-date {
    font-size: 0.8rem;
}

/* カレンダーウィジェット */
.widget_calendar table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    font-size: 14px;
    border: 1px solid #ddd;
    background: #fff;
}

.widget_calendar caption {
    font-weight: 600;
    padding: 0.75rem 0;
    font-size: 14px;
}

.widget_calendar thead {
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    background: #f5f5f5;
    color: #333;
}

.widget_calendar th {
    padding: 0.6rem 0.25rem;
    background: transparent;
    font-weight: 600;
}

.widget_calendar tbody {
    color: #333;
}

.widget_calendar td {
    padding: 0.75rem 0.25rem;
    border: none;
}

.widget_calendar td a {
    display: block;
    font-weight: 600;
    text-decoration: underline;
}

.widget_calendar #today {
    background: var(--genntenkaiki-main-color, #6d7a84);
    color: #fff;
}

.widget_calendar .pad {
    background: transparent;
}

.widget_calendar nav {
    display: flex;
}

.widget_calendar .wp-calendar-nav-prev,
.widget_calendar .wp-calendar-nav-next {
    flex: 1;
    padding: 0.5rem;
}

.widget_calendar .wp-calendar-nav-prev {
    text-align: left;
}

.widget_calendar .wp-calendar-nav-next {
    text-align: right;
}

.widget_calendar nav a {
    font-weight: 400;
    text-decoration: none;
    color: #333;
}

/* タグクラウドウィジェット */
.widget_tag_cloud .tagcloud,
.wp-block-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.widget_tag_cloud .tagcloud a,
.wp-block-tag-cloud a {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    background: #f5f5f5;
    color: var(--genntenkaiki-text-color, #333) !important;
    font-size: 0.85rem !important;
    text-decoration: none;
    border-radius: 3px;
    transition: background 0.2s, color 0.2s;
}

.widget_tag_cloud .tagcloud a:hover,
.wp-block-tag-cloud a:hover {
    background: var(--genntenkaiki-text-color, #333);
    color: #fff !important;
}

/* RSS ウィジェット */
.widget_rss ul li {
    padding: 0.8rem 0;
}

.widget_rss .rsswidget {
    font-weight: 600;
    color: var(--genntenkaiki-text-color, #333);
    text-decoration: none;
}

.widget_rss .rsswidget:hover {
    color: var(--genntenkaiki-link-color, #0073aa);
}

.widget_rss .rss-date {
    display: block;
    font-size: 0.8rem;
    margin-top: 0.3rem;
}

.widget_rss .rssSummary {
    font-size: 0.9rem;
    margin-top: 0.5rem;
    line-height: 1.5;
}

/* テキストウィジェット */
.widget_text .textwidget {
    line-height: 1.7;
}

.widget_text .textwidget p:first-child {
    margin-top: 0;
}

.widget_text .textwidget p:last-child {
    margin-bottom: 0;
}

/* 画像ウィジェット */
.widget_media_image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* ギャラリーウィジェット */
.widget_media_gallery .gallery,
.widget .wp-block-gallery {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
}

.widget_media_gallery .gallery-item,
.widget .wp-block-gallery .wp-block-image {
    margin: 0 !important;
    width: 100% !important;
}

.widget_media_gallery .gallery-item img,
.widget .wp-block-gallery .wp-block-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

/* カテゴリーウィジェット */
.widget_categories ul:not(.wp-block-social-links) li a {
    position: relative;
    padding-left: 1.5rem;
    text-align: left;
}

.widget_categories ul li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 12px;
    background-color: var(--genntenkaiki-text-color, #333);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

/* アーカイブウィジェット */
.widget_archive ul:not(.wp-block-social-links) li a {
    position: relative;
    padding-left: 1.5rem;
    text-align: left;
}

.widget_archive ul li a::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-top: 2px solid var(--genntenkaiki-text-color, #333);
    border-right: 2px solid var(--genntenkaiki-text-color, #333);
    transform: translateY(-50%) rotate(45deg);
}

/* ナビゲーションメニューウィジェット */
.widget_nav_menu ul:not(.wp-block-social-links) li a {
    position: relative;
    padding-left: 1.5rem;
    text-align: left;
}

.widget_nav_menu ul li a::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-top: 2px solid var(--genntenkaiki-text-color, #333);
    border-right: 2px solid var(--genntenkaiki-text-color, #333);
    transform: translateY(-50%) rotate(45deg);
}

/* フッターウィジェットエリア */
.footer-widgets {
    padding: 2rem 0;
}

.footer-widget-area .widget {
    font-size: 14px;
}

.footer-widget-area .widget-title {
    background: transparent;
    color: inherit;
    padding: 0.5rem 0;
    border-bottom: solid 1px currentColor;
    border-image: linear-gradient(to right, currentColor 0%, currentColor 40%, rgba(255,255,255,0.3) 40%, rgba(255,255,255,0.3) 100%) 1;
    margin-bottom: 1rem;
    position: relative;
}

.footer-widget-area .widget ul:not(.wp-block-social-links) li {
    border-bottom: none;
}

.footer-widget-area .widget ul:not(.wp-block-social-links) li a {
    color: inherit;
    opacity: 0.9;
}

.footer-widget-area .widget ul:not(.wp-block-social-links) li a:hover {
    opacity: 1;
}

/* フッターウィジェット - カテゴリー */
.footer-widget-area .widget_categories ul:not(.wp-block-social-links) li a {
    position: relative;
    padding-left: 1.5rem;
}

.footer-widget-area .widget_categories ul li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 12px;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

/* フッターウィジェット - アーカイブ */
.footer-widget-area .widget_archive ul:not(.wp-block-social-links) li a {
    position: relative;
    padding-left: 1.5rem;
}

.footer-widget-area .widget_archive ul li a::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: translateY(-50%) rotate(45deg);
}

/* フッターウィジェット - 最近の投稿 */
.footer-widget-area .widget_recent_entries ul:not(.wp-block-social-links) li a {
    position: relative;
    padding-left: 1.5rem;
}

.footer-widget-area .widget_recent_entries ul li a::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: translateY(-50%) rotate(45deg);
}

/* フッターウィジェット - ナビゲーションメニュー */
.footer-widget-area .widget_nav_menu ul:not(.wp-block-social-links) li a {
    position: relative;
    padding-left: 1.5rem;
}

.footer-widget-area .widget_nav_menu ul li a::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: translateY(-50%) rotate(45deg);
}

/* フッターウィジェット - カレンダー */
.footer-widget-area .widget_calendar nav a {
    color: inherit;
}

/* ==========================================================================
   サイドバーレイアウト
   ========================================================================== */

/* サイドバー付きコンテナ */
.container.has-sidebar {
    display: flex;
    gap: 40px;
}

.container.has-sidebar .content-area {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 340px);
}

.container.has-sidebar .sidebar {
    width: 300px;
    flex-shrink: 0;
}

/* レスポンシブ：モバイルではサイドバーをコンテンツの下に配置 */
@media (max-width: 768px) {
    .container.has-sidebar {
        flex-direction: column;
    }

    .container.has-sidebar .content-area {
        max-width: 100%;
    }

    .container.has-sidebar .sidebar {
        width: 100%;
    }
}

/* ==========================================================================
   アーカイブページ
   ========================================================================== */

/* アーカイブヘッダー */
.archive-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ddd;
}

.archive-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.archive-subtitle {
    font-size: 0.9rem;
    font-weight: normal;
    font-style: italic;
}

/* アーカイブ投稿一覧 */
.archive-posts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 992px) {
    .archive-posts {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .archive-posts {
        grid-template-columns: 1fr;
    }
}

.archive-post {
    display: block;
}

.archive-post .post-thumbnail-link {
    display: block;
    margin-bottom: 1rem;
}

.archive-post .post-thumbnail-link img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.archive-post .no-thumbnail {
    width: 100%;
    aspect-ratio: 4/3;
    background: #ccc;
}

.archive-post .entry-title {
    font-size: 1rem;
    font-weight: bold;
    margin: 0 0 0.5rem;
}

.archive-post .entry-title a {
    color: var(--genntenkaiki-text-color, #333);
    text-decoration: none;
}

.archive-post .entry-title a:hover {
    text-decoration: underline;
}

.archive-post .entry-summary {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.archive-post .entry-summary p {
    margin: 0;
}

.archive-post .entry-meta {
    font-size: 0.8rem;
    display: flex;
    gap: 1rem;
}

.archive-post .entry-meta .meta-icon {
    margin-right: 0.25rem;
}

.archive-post .entry-meta .meta-icon-folder {
    display: inline-block;
    width: 14px;
    height: 12px;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    vertical-align: middle;
}

/* ページネーション */
.pagination,
.nav-links {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 2rem;
}

.pagination .page-numbers,
.nav-links .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.5rem;
    background: #fff;
    color: var(--genntenkaiki-text-color, #333);
    text-decoration: none;
    border: 1px solid #ddd;
}

.pagination .page-numbers.current,
.nav-links .page-numbers.current {
    background: var(--genntenkaiki-main-color, #6d7a84);
    color: #fff;
    border-color: var(--genntenkaiki-main-color, #6d7a84);
}

.pagination .page-numbers:hover:not(.current),
.nav-links .page-numbers:hover:not(.current) {
    background: #f5f5f5;
}

/* リッチテキスト装飾 */
.genntenkaiki-underline {
    text-decoration: underline;
}

/* ==========================================================================
   SNSシェアボタン
   ========================================================================== */
.share-buttons {
    display: flex;
    gap: 10px;
    margin-top: 2rem;
}

.share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 50px;
    border-radius: 6px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.share-button:hover {
    opacity: 0.8;
}

.share-button .share-icon {
    display: block;
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* X (Twitter) */
.share-twitter {
    background-color: #000;
}

.share-twitter .share-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z'/%3E%3C/svg%3E");
}

/* Facebook */
.share-facebook {
    background-color: #3b5998;
}

.share-facebook .share-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M14 13.5h2.5l1-4H14v-2c0-1.03 0-2 2-2h1.5V2.14c-.326-.043-1.557-.14-2.857-.14C11.928 2 10 3.657 10 6.7v2.8H7v4h3V22h4v-8.5z'/%3E%3C/svg%3E");
}

/* LINE */
.share-line {
    background-color: #06c755;
}

.share-line .share-icon {
    width: 32px;
    height: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='%23fff'%3E%3Cpath d='M24 4C12.954 4 4 11.582 4 21c0 7.616 6.284 14.02 14.787 15.81.576.14.766.32.766.71 0 .43-.015 1.545-.023 2.72-.001.22.097.43.264.565.167.134.386.18.592.123 5.157-1.338 9.88-4.088 13.344-7.72C40.16 27.42 44 24.45 44 21 44 11.582 35.046 4 24 4z'/%3E%3Ctext x='24' y='25' text-anchor='middle' font-family='Arial,sans-serif' font-size='10' font-weight='bold' fill='%2306c755'%3ELINE%3C/text%3E%3C/svg%3E");
}

/* はてなブックマーク */
.share-hatena {
    background-color: #00a4de;
}

.share-hatena .share-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M20.47 0C22.42 0 24 1.58 24 3.53v16.94c0 1.95-1.58 3.53-3.53 3.53H3.53C1.58 24 0 22.42 0 20.47V3.53C0 1.58 1.58 0 3.53 0h16.94zm-3.705 14.47c-.78 0-1.41.63-1.41 1.41s.63 1.414 1.41 1.414 1.41-.631 1.41-1.414-.63-1.41-1.41-1.41zm.255-9.14h-2.37v7.29h2.37V5.33zm-6.375 5.275c.72-.36 1.155-1.095 1.155-1.965 0-.705-.225-1.29-.675-1.74-.525-.525-1.365-.81-2.505-.81H5.745v8.25h3.72c1.155 0 2.025-.315 2.61-.93.45-.48.675-1.065.675-1.755 0-1.005-.45-1.74-1.35-2.01v-.04zm-2.64-2.97h.93c.81 0 1.215.39 1.215 1.155 0 .765-.405 1.155-1.215 1.155h-.93V7.635zm1.065 6.465H9.255v-2.55h.96c.885 0 1.335.435 1.335 1.29 0 .84-.435 1.26-1.32 1.26z'/%3E%3C/svg%3E");
}

/* Pocket */
.share-pocket {
    background-color: #ef4056;
}

.share-pocket .share-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M18.813 10.259l-5.646 5.419c-.32.305-.73.458-1.141.458-.41 0-.821-.153-1.141-.458l-5.646-5.419c-.657-.628-.677-1.671-.049-2.328.628-.657 1.671-.677 2.328-.049l4.508 4.322 4.508-4.322c.657-.628 1.7-.608 2.328.049.628.657.608 1.7-.049 2.328zM21 0H3C1.346 0 0 1.346 0 3v6.277c0 .053.004.105.004.158l.002.039c.012.16.025.317.04.474l.006.063c.01.092.02.183.031.274l.016.119c.01.084.021.167.033.25l.023.149c.014.088.029.175.045.262l.024.132c.017.09.035.178.054.267l.029.138c.019.086.039.172.06.256l.033.138c.023.091.049.179.075.268l.033.117c.031.1.063.197.097.294l.025.072c.041.116.084.231.128.344l.005.013c.502 1.246 1.171 2.39 1.996 3.396l.019.024c.081.097.162.193.244.288l.065.074c.075.086.151.17.228.254l.065.071c.088.094.177.188.267.279l.039.04c.089.09.178.177.268.264l.069.065c.084.08.168.159.253.236l.064.059c.1.09.2.179.302.264l.026.023c.115.096.231.19.348.282l.053.041c.093.073.186.144.28.214l.086.064c.086.063.172.125.259.186l.095.066c.086.06.173.118.26.175l.096.063c.093.06.186.118.28.175l.086.052c.103.062.207.122.312.18l.069.039c.12.068.241.133.363.196l.034.018c.141.072.284.142.428.208l.022.009c.115.052.231.103.348.152l.053.022c.109.045.219.088.33.13l.075.029c.104.039.209.076.315.113l.085.029c.104.036.208.07.313.103l.088.028c.109.034.219.067.329.098l.078.022c.122.035.245.067.369.098l.048.012c.143.037.287.07.432.102h.006c.143.03.287.058.432.083l.048.008c.123.022.247.042.371.06l.088.013c.112.016.224.031.337.044l.094.011c.117.013.234.025.352.035l.072.006c.141.012.283.021.425.028l.061.003c.124.005.249.01.374.012l.088.001c.112.001.223.001.335 0h.001c.112.001.223.001.335 0l.088-.001c.125-.002.25-.007.374-.012l.061-.003c.142-.007.284-.016.425-.028l.072-.006c.118-.01.235-.022.352-.035l.094-.011c.113-.013.225-.028.337-.044l.088-.013c.124-.018.248-.038.371-.06l.048-.008c.145-.025.289-.053.432-.083h.006c.145-.032.289-.065.432-.102l.048-.012c.124-.031.247-.063.369-.098l.078-.022c.11-.031.22-.064.329-.098l.088-.028c.105-.033.209-.067.313-.103l.085-.029c.106-.037.211-.074.315-.113l.075-.029c.111-.042.221-.085.33-.13l.053-.022c.117-.049.233-.1.348-.152l.022-.009c.144-.066.287-.136.428-.208l.034-.018c.122-.063.243-.128.363-.196l.069-.039c.106-.058.209-.118.312-.18l.086-.052c.094-.057.187-.115.28-.175l.096-.063c.087-.057.174-.115.26-.175l.095-.066c.087-.061.173-.123.259-.186l.086-.064c.094-.07.187-.141.28-.214l.053-.041c.117-.092.233-.186.348-.282l.026-.023c.102-.085.202-.174.302-.264l.064-.059c.085-.077.169-.156.253-.236l.069-.065c.09-.087.179-.174.268-.264l.039-.04c.09-.091.179-.185.267-.279l.065-.071c.077-.084.153-.168.228-.254l.065-.074c.082-.095.163-.191.244-.288l.019-.024c.825-1.006 1.494-2.15 1.996-3.396l.005-.013c.044-.113.087-.228.128-.344l.025-.072c.034-.097.066-.194.097-.294l.033-.117c.026-.089.052-.177.075-.268l.033-.138c.021-.084.041-.17.06-.256l.029-.138c.019-.089.037-.177.054-.267l.024-.132c.016-.087.031-.174.045-.262l.023-.149c.012-.083.023-.166.033-.25l.016-.119c.011-.091.021-.182.031-.274l.006-.063c.015-.157.028-.314.04-.474l.002-.039c0-.053.004-.105.004-.158V3c0-1.654-1.346-3-3-3z'/%3E%3C/svg%3E");
}

/* ==========================================================================
   投稿ナビゲーション
   ========================================================================== */
.post-navigation {
    margin-top: 3rem;
    border-top: 1px solid #e5e5e5;
    padding-top: 2rem;
}

.post-navigation .nav-links {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    justify-content: space-between;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    flex: 0 1 auto;
    max-width: calc(50% - 0.5rem);
}

.post-navigation .nav-next {
    margin-left: auto;
    text-align: right;
}

.post-navigation .nav-previous a,
.post-navigation .nav-next a {
    display: inline-flex;
    align-items: stretch;
    text-decoration: none;
    color: var(--genntenkaiki-text-color, #333);
    background: transparent;
    border: none;
}

.post-navigation .nav-previous a::before,
.post-navigation .nav-next a::after {
    content: '';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-height: 60px;
    flex-shrink: 0;
    background-color: var(--genntenkaiki-main-color, #6d7a84);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px 12px;
}

.post-navigation .nav-previous a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 18l-6-6 6-6'/%3E%3C/svg%3E");
}

.post-navigation .nav-next a::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E");
}

.post-navigation .nav-previous a > span,
.post-navigation .nav-next a > span {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.75rem 1rem;
}

.post-navigation .nav-subtitle {
    display: none;
}

.post-navigation .nav-title {
    font-size: 1rem;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .post-navigation .nav-links {
        flex-direction: column;
    }

    .post-navigation .nav-previous,
    .post-navigation .nav-next {
        max-width: 100%;
    }
}

/* 関連記事セクション */
.related-posts {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.related-posts-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin: 0 0 1.5rem;
    color: var(--genntenkaiki-text-color, #333);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.related-post {
    background: transparent;
    overflow: hidden;
}

.related-post-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.related-post-link img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.related-post-link .no-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #e0e0e0;
}

.related-post-content {
    padding: 0.75rem 0;
}

.related-post-title {
    font-size: 0.875rem;
    font-weight: normal;
    line-height: 1.5;
    margin: 0 0 0.5rem;
    color: var(--genntenkaiki-text-color, #333);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-post-date {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.related-post-date::before {
    content: '○';
    font-size: 0.625rem;
}

/* レスポンシブ：関連記事 */
@media (max-width: 1024px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}

.entry-content,
.wp-block-group__inner-container,
.wp-block-column,
.wp-block-cover__inner-container,
.wp-block-media-text__content,
.genntenkaiki-inner-container,
.wp-block-details,
.genntenkaiki-caption-box-content,
.genntenkaiki-accordion-content,
.genntenkaiki-tab-panel,
.genntenkaiki-responsive-column {
    & > * {
        margin-bottom: 2em;
    }
    & > *:last-child {
        margin-bottom: 0;
    }
}

/* ==========================================================================
   フッター
   ========================================================================== */
.footer-widgets {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-widget-area {
    flex: 1;
    min-width: 200px;
}

.footer-widget-area > * {
    margin-bottom: 2em;
}

.site-footer .site-info {
    text-align: center;
}

.site-footer .copyright {
    margin: 0;
}

/* コンテンツ上余白なし */
.no-content-top-margin .site-main {
    padding-top: 0;
    margin-top: 0;
}
.no-content-top-margin .site-main .entry-content {
    padding-top: 0;
    margin-top: 0;
}
.no-content-top-margin .site-main .container {
    padding-top: 0;
    margin-top: 0;
}

/* コンテンツ下余白なし */
.no-content-bottom-margin .site-main {
    padding-bottom: 0;
    margin-bottom: 0;
}
.no-content-bottom-margin .site-main .entry-content {
    padding-bottom: 0;
    margin-bottom: 0;
}
.no-content-bottom-margin .site-main .container {
    padding-bottom: 0;
    margin-bottom: 0;
}

/* ブロック下マージンクラス */
.is-margin-bottom-0 { margin-bottom: 0em !important; }
.is-margin-bottom-1 { margin-bottom: 1em !important; }
.is-margin-bottom-2 { margin-bottom: 2em !important; }
.is-margin-bottom-3 { margin-bottom: 3em !important; }
.is-margin-bottom-4 { margin-bottom: 4em !important; }
.is-margin-bottom-5 { margin-bottom: 5em !important; }
.is-margin-bottom-6 { margin-bottom: 6em !important; }

/* テーブルブロック：スマホで縦並び */
@media (max-width: 768px) {
    .wp-block-table.is-table-vertical-sp table,
    .wp-block-table.is-table-vertical-sp thead,
    .wp-block-table.is-table-vertical-sp tbody,
    .wp-block-table.is-table-vertical-sp tr,
    .wp-block-table.is-table-vertical-sp th,
    .wp-block-table.is-table-vertical-sp td {
        display: block;
        width: 100%;
    }
    .wp-block-table.is-table-vertical-sp thead {
        display: none;
    }
    .wp-block-table.is-table-vertical-sp table {
        border: 1px solid var(--table-border-color, #ddd);
    }
    .wp-block-table.is-table-vertical-sp tr,
    .wp-block-table.is-table-vertical-sp th,
    .wp-block-table.is-table-vertical-sp td {
        border: none;
    }
    .wp-block-table.is-table-vertical-sp tr + tr {
        border-top: 1px solid var(--table-border-color, #ddd);
    }
    .wp-block-table.is-table-vertical-sp td + td {
        border-top: 1px solid var(--table-border-color, #ddd);
    }
    .wp-block-table.is-table-vertical-sp td {
        padding: 0.5em 1em;
    }
}

@media (max-width: 600px) {
    .wp-block-media-text.is-stacked-on-mobile > .wp-block-media-text__content {
        padding-left: 0;
        padding-right: 0;
        padding-top: 1.5em;
    }
    .wp-block-media-text.alignfull.is-stacked-on-mobile > .wp-block-media-text__content,
    .wp-block-media-text.is-mobile-text-padding.is-stacked-on-mobile > .wp-block-media-text__content {
        padding-left: 20px;
        padding-right: 20px;
    }
}