/* Base/layout: token definitions live in design-tokens.css. */

/* --- Reset & Base --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--f-base);
    background-color: var(--c-bg);
    color: var(--c-text-main);
    line-height: 2.0;
    /* ゆったりとした行間 */
    font-weight: 500;
    /* 丸ゴシックは少し太めが見やすい */
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s ease;
}

img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-m);
}

ul {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0.05em;
}

figure.wp-block-image {
    margin-bottom: 1.5em;
    margin-top: 1.5em;
    margin-left: auto;
    margin-right: auto;
}

/* --- Utility --- */
.container {
    max-width: var(--w-container);
    margin: 0 auto;
    padding: 0 30px;
}

/* WordPress Core Alignment */
.alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1.5em;
}

.alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1.5em;
}

.aligncenter {
    clear: both;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5em;
}

/* WordPress Gallery */
.gallery {
    margin-bottom: 1.5em;
}

.gallery-item {
    display: inline-block;
    text-align: center;
    vertical-align: top;
    width: 100%;
    padding: 0.5em;
}

/* ============================================================
   Gallery Caption Styles
   ギャラリーキャプション位置設定
   ============================================================ */

/* オーバーレイスタイル（デフォルト） */
.wp-block-gallery.is-style-caption-overlay .wp-block-image {
    position: relative;
    overflow: hidden;
}

.wp-block-gallery.is-style-caption-overlay .wp-block-image figure {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-m);
}

.wp-block-gallery.is-style-caption-overlay .wp-block-image img {
    border-radius: var(--radius-m);
}

.wp-block-gallery.is-style-caption-overlay .wp-block-image figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: #fff;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    border-radius: 0 0 var(--radius-m) var(--radius-m);
    backdrop-filter: blur(2px);
}

/* 下表示スタイル - グリッドレイアウトを維持 */

.wp-block-gallery.is-style-caption-below .wp-block-image figure,
.wp-block-gallery.is-style-caption-below figure.wp-block-image {
    /* グリッドセル内でfigureをグリッド化して縦並びに */
    display: grid !important;
    grid-template-rows: 1fr auto !important;
    grid-template-columns: 1fr !important;
    height: 100%;
}

/* WPコアの::before擬似要素（ブラー背景）を無効化 */
.wp-block-gallery.is-style-caption-below .wp-block-image figure::before,
.wp-block-gallery.is-style-caption-below figure.wp-block-image::before {
    content: none !important;
    display: none !important;
}

.wp-block-gallery.is-style-caption-below .wp-block-image img,
.wp-block-gallery.is-style-caption-below figure.wp-block-image img {
    grid-row: 1;
    grid-column: 1;
    border-radius: var(--radius-m);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wp-block-gallery.is-style-caption-below .wp-block-image figcaption,
.wp-block-gallery.is-style-caption-below figure.wp-block-image figcaption {
    grid-row: 2;
    grid-column: 1;
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    background: transparent !important;
    background-image: none !important;
    color: var(--c-text-light) !important;
    text-align: center;
    padding: 8px 4px 0 !important;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-radius: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    text-shadow: none !important;
}

/* ふんわり浮かぶボタン */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 40px;
    margin: 1rem 0;
    background-color: var(--c-theme);
    color: #fff;
    border-radius: var(--radius-pill);
    font-weight: 700;
    box-shadow: 0 10px 20px color-mix(in srgb, var(--c-theme) 30%, transparent);
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px color-mix(in srgb, var(--c-theme) 40%, transparent);
    background-color: var(--c-theme-dark);
    color: #fff;
}

.btn:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px color-mix(in srgb, var(--c-theme) 25%, transparent);
}

.btn:focus {
    outline: 3px solid color-mix(in srgb, var(--c-theme) 50%, transparent);
    outline-offset: 3px;
}

/* WordPress Button Block - エディタと同じスタイル */
.wp-block-button__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 40px;
    margin: 1rem 0;
    background-color: color-mix(in srgb, var(--c-theme) 90%, black);
    color: #fff;
    border-radius: var(--radius-pill);
    font-weight: 700;
    box-shadow: 0 10px 20px color-mix(in srgb, var(--c-theme) 30%, transparent);
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s, color 0.3s, border-color 0.3s;
    border: 2px solid transparent;
    text-decoration: none;
    cursor: pointer;
}

.wp-block-button__link:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px color-mix(in srgb, var(--c-theme) 40%, transparent);
    background-color: var(--c-theme-dark);
    color: #fff;
}

.wp-block-button__link:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px color-mix(in srgb, var(--c-theme) 25%, transparent);
}

.wp-block-button__link:focus {
    outline: 3px solid color-mix(in srgb, var(--c-theme) 50%, transparent);
    outline-offset: 3px;
}

/* WordPress Button Block - Outline Style */
.wp-block-button.is-style-outline .wp-block-button__link {
    background-color: transparent !important;
    color: var(--c-theme) !important;
    border: 2px solid currentColor !important;
    box-shadow: none;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
    background-color: var(--c-theme) !important;
    color: #fff !important;
    box-shadow: 0 10px 20px color-mix(in srgb, var(--c-theme) 30%, transparent);
}

.section-title {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--c-text-main);
}

.section-lead {
    text-align: center;
    margin-bottom: 60px;
    color: var(--c-text-light);
    font-size: 0.95rem;
}

/* --- Header: Floating Pill --- */
.header {
    padding: 30px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    pointer-events: none;
}

.header-bar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 12px 30px;
    border-radius: var(--radius-pill);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: auto;
    max-width: var(--w-container);
    margin: 0 auto;
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--c-text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-mark {
    width: 12px;
    height: 12px;
    background-color: var(--c-theme);
    border-radius: 50%;
}

/* 画像ロゴ */
.logo--image {
    gap: 0;
}

.logo--image .custom-logo {
    max-height: 40px;
    width: auto;
    height: auto;
    border-radius: 0;
}

/* アイコン＋テキストロゴ */
.logo--icon-text {
    gap: 10px;
}

.logo-mark--icon {
    width: 32px;
    height: 32px;
    background-color: transparent;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-mark--icon .logo-icon-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.nav-pc {
    display: flex;
    gap: 30px;
}

.nav-pc ul {
    display: flex;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-pc .menu-item,
.nav-mobile .menu-item {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    font-size: 0.9rem;
    color: var(--c-text-main);
    transition: color 0.3s;
}

.nav-item:hover {
    color: var(--c-theme);
}

.header .btn {
    padding: 10px 24px;
    font-size: 0.9rem;
    margin: 0;
}

/* Mobile Menu Button */
.mobile-menu-toggle {
    display: none;
    position: relative;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

/* On mobile, the single toggle is moved out of the sticky header's
   stacking context while the drawer is open. Its placeholder keeps
   the pill header and button coordinates unchanged. */
.mobile-menu-toggle.is-floating {
    position: fixed;
    z-index: 1102;
    margin: 0;
}

.mobile-menu-toggle-placeholder {
    display: none;
}

.mobile-menu-toggle span {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 2px;
    background-color: var(--c-text-main);
    margin: 0;
    border-radius: 2px;
    transform-origin: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Position all three lines relative to the exact same center. */
.mobile-menu-toggle span:nth-child(1) {
    transform: translate(-50%, -50%) translateY(-7px);
}

.mobile-menu-toggle span:nth-child(2) {
    transform: translate(-50%, -50%);
}

.mobile-menu-toggle span:nth-child(3) {
    transform: translate(-50%, -50%) translateY(7px);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translate(-50%, -50%) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* Mobile Navigation */
.nav-mobile {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1101;
    transition: right 0.3s ease, visibility 0s linear 0.3s;
    visibility: hidden;
    overflow-y: auto;
    padding: 80px 30px 30px;
}

.nav-mobile ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-mobile.active {
    right: 0;
    visibility: visible;
    transition: right 0.3s ease, visibility 0s;
}

.nav-mobile .nav-item {
    display: block;
    padding: 15px 0;
    border-bottom: 1px solid #F0F0F0;
    font-size: 1rem;
    color: var(--c-text-main);
}

.nav-mobile .nav-item:hover {
    color: var(--c-theme);
}

.nav-mobile .nav-item:last-child {
    border-bottom: none;
}

.nav-mobile .btn {
    margin-top: 20px;
    width: 100%;
    justify-content: center;
}

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .mobile-menu-toggle span,
    .nav-mobile,
    .nav-mobile.active,
    .mobile-overlay {
        transition: none;
    }
}

/* --- Hero: Soft Shape --- */
.hero {
    padding: 80px 0 120px;
    text-align: center;
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.4rem;
    margin-bottom: 32px;
}

.hero p {
    font-size: 1.05rem;
    margin-bottom: 48px;
    color: var(--c-text-main);
}

.hero-img-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 450px;
    margin: 0 auto;
    border-radius: var(--radius-l);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.05);
}

.hero-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 5s ease;
    border-radius: 0;
}

.hero-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.9), transparent 45%),
        linear-gradient(135deg, color-mix(in srgb, var(--c-theme) 22%, white), color-mix(in srgb, var(--c-accent) 34%, white));
    color: var(--c-text-main);
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hero-img-container:hover img {
    transform: scale(1.05);
}

/* --- Updates: Floating Cards --- */
.updates {
    background-color: #F4F8F9;
    padding: 100px 0;
    border-radius: 60px 60px 0 0;
}

.updates-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 50px;
}

.news-block {
    background: var(--c-bg-card);
    padding: 40px;
    border-radius: var(--radius-l);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

/* News Category Tabs */
.news-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.news-tab {
    padding: 10px 20px;
    background: #F4F8F9;
    border: none;
    border-radius: var(--radius-pill);
    font-family: var(--f-base);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--c-text-main);
    cursor: pointer;
    transition: all 0.3s ease;
}

.news-tab:hover {
    background: var(--c-accent-light);
}

.news-tab.active {
    background: var(--c-theme);
    color: #fff;
    font-weight: 700;
}

.news-list-container {
    position: relative;
    min-height: 200px;
}

.news-list li {
    border-bottom: 1px solid #F0F0F0;
    padding: 20px 0;
}

.news-list li:last-child {
    border-bottom: none;
}

.news-date {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--c-text-light);
    margin-right: 15px;
}

.news-list__empty {
    display: block;
    color: var(--c-text-light);
}

.blog-card {
    display: block;
    background: var(--c-bg-card);
    border-radius: var(--radius-l);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
    color: inherit;
}

.blog-card--placeholder:hover {
    transform: none;
}

.blog-img-area {
    height: 200px;
    background-color: #eee;
    overflow: hidden;
}

.blog-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--c-theme) 28%, white), color-mix(in srgb, var(--c-accent) 24%, white));
    color: color-mix(in srgb, var(--c-text-main) 82%, white);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.blog-img-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.blog-text-area {
    padding: 30px;
}

.blog-tag {
    font-size: 0.75rem;
    background-color: var(--c-theme-pale);
    color: var(--c-text-main);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    margin-bottom: 12px;
    display: inline-block;
}

/* --- Toritsugi: Soft Icons --- */
.toritsugi {
    padding: 120px 0;
    background-color: var(--c-bg);
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 60px;
}

.step-item {
    text-align: center;
    padding: 20px;
}

.icon-circle {
    width: 120px;
    height: 120px;
    background-color: #FFF;
    border-radius: 50%;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    box-shadow: 0 15px 40px color-mix(in srgb, var(--c-theme) 20%, transparent);
    overflow: hidden;
}

.icon-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.step-title {
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: var(--c-text-main);
}

.step-desc {
    font-size: 0.95rem;
    color: var(--c-text-light);
}

/* --- Access: Card Style --- */
.access {
    padding: 0 0 100px;
}

/* --- Reorderable front page: independent section surfaces ---
   The original hero -> updates -> toritsugi -> access order retains all its
   existing styling. In other orders, the neutral page canvas is continuous,
   and the colored updates block becomes a fully rounded inset panel instead
   of a half-rounded background that only worked with its former neighbors.
   Keep these rules scoped: non-front pages and the default order do not change. */
body.mitachi-front-sections-reordered .site-main {
    background-color: var(--c-bg);
}

body.mitachi-front-sections-reordered .site-main > .hero,
body.mitachi-front-sections-reordered .site-main > .toritsugi,
body.mitachi-front-sections-reordered .site-main > .access {
    background-color: var(--c-bg);
    padding-top: clamp(52px, 6vw, 80px);
    padding-bottom: clamp(52px, 6vw, 80px);
}

/* An accent *island*, not a full-bleed background joined to its former
   following section. The card keeps its familiar blue and content styles. */
body.mitachi-front-sections-reordered .site-main > .updates {
    margin: clamp(16px, 2.5vw, 28px) clamp(12px, 3vw, 36px);
    padding: clamp(72px, 7vw, 100px) 0;
    border-radius: clamp(28px, 5vw, 60px);
    background-color: #F4F8F9;
}

/* The first and last sections need enough breathing room next to the
   floating header and the standalone rounded footer, regardless of type. */
body.mitachi-front-sections-reordered .site-main > section:first-child {
    padding-top: clamp(80px, 8vw, 112px);
}
body.mitachi-front-sections-reordered .site-main > section:last-child {
    padding-bottom: clamp(80px, 8vw, 112px);
}

/* Hero keeps its established above-the-fold spacing when first, even if
   the rest of the page has been reordered. */
body.mitachi-front-sections-reordered .site-main > .hero:first-child {
    padding: 80px 0 120px;
}

@media (max-width: 768px) {
    body.mitachi-front-sections-reordered .site-main > .updates {
        margin-inline: 12px;
        border-radius: 28px;
    }
    body.mitachi-front-sections-reordered .site-main > section:first-child:not(.hero) {
        padding-top: 72px;
    }
}

.access-card {
    background: #FFFFFF;
    border-radius: var(--radius-l);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.05);
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.map-area {
    min-height: 400px;
    background: #eee;
}

.map-area iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.info-area {
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-row {
    margin-bottom: 24px;
}

.info-label {
    font-size: 0.8rem;
    color: var(--c-text-light);
    display: block;
    margin-bottom: 4px;
}

.info-val {
    font-size: 1.1rem;
}

/* --- Footer --- */
.footer {
    background-color: #F2F0EB;
    padding: 60px 0;
    text-align: center;
    border-radius: 60px 60px 0 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px 30px;
    margin-bottom: 40px;
    font-size: 0.9rem;
}

/* wp_nav_menuが生成するul/liにも対応 */
.footer-links ul,
.footer-links menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links a:hover {
    color: var(--c-theme);
}

/* --- Post & Page Content --- */
.site-content {
    padding: 80px 0;
}

.entry-header {
    margin-bottom: 40px;
}

.entry-title {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--c-text-main);
}

.entry-meta {
    font-size: 0.9rem;
    color: var(--c-text-light);
    margin-bottom: 10px;
}

.entry-content {
    line-height: 2;
    margin-bottom: 40px;
}

.entry-content p {
    margin-bottom: 1.5em;
}

.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    margin-top: 2em;
    margin-bottom: 1em;
}

/* --- Heading Styles --- */

/* 左ボーダースタイル */
.entry-content .heading-style-left-border {
    padding-left: 20px;
    border-left: 5px solid var(--c-theme);
    position: relative;
}

/* 下線スタイル */
.entry-content .heading-style-bottom-line {
    padding-bottom: 12px;
    border-bottom: 3px solid var(--c-theme);
    position: relative;
}

.entry-content .heading-style-bottom-line::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--c-theme-pale);
}

/* 背景付きスタイル */
.entry-content .heading-style-background {
    padding: 15px 20px;
    background: linear-gradient(to right, var(--c-theme-pale), transparent);
    border-radius: 8px;
}

/* ドットアイコンスタイル */
.entry-content .heading-style-icon-dot {
    padding-left: 30px;
    position: relative;
}

.entry-content .heading-style-icon-dot::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-color: var(--c-theme);
    border-radius: 50%;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--c-theme) 30%, transparent);
}

.entry-content ul,
.entry-content ol {
    margin-left: 2em;
    margin-bottom: 1.5em;
    list-style: disc;
}

.entry-content ol {
    list-style: decimal;
}

.entry-footer {
    padding-top: 20px;
    border-top: 1px solid #F0F0F0;
}

/* Post Navigation */
.post-navigation {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #F0F0F0;
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.post-navigation .nav-item {
    flex: 0 0 calc(50% - 15px);
    max-width: calc(50% - 15px);
}

.post-navigation .nav-item.nav-placeholder {
    visibility: hidden;
    pointer-events: none;
}

.post-navigation .nav-item a {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: var(--c-bg-card);
    border-radius: var(--radius-m);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    align-items: center;
}

/* 右側の記事：サムネイルを右に配置（デスクトップのみ） */
.post-navigation .nav-item:nth-child(2) a {
    flex-direction: row-reverse;
}

.post-navigation .nav-item a:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
}

.post-navigation .nav-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: var(--radius-m);
}

.post-navigation .nav-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.post-navigation .nav-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 0;
}

.post-navigation .nav-subtitle {
    font-size: 0.85rem;
    color: var(--c-text-light);
    font-weight: 500;
}

.post-navigation .nav-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--c-text-main);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Archive & Blog */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

.post-card {
    position: relative;
    background: var(--c-bg-card);
    border-radius: var(--radius-l);
    overflow: hidden;
    /* box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02); */
    box-shadow: 0px 5px 13px rgb(0 0 0 / 8%);
    transition: transform 0.3s;
    cursor: pointer;
}

.post-card:hover {
    transform: translateY(-5px);
}

.post-thumbnail {
    background-color: #eee;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

/* アーカイブのサムネイル高さ・比率・object-fitは動的CSSで制御 */

/* 個別投稿・固定ページのサムネイル */
.single .post-thumbnail,
.page .post-thumbnail {
    height: 400px;
}

.single .post-thumbnail img,
.page .post-thumbnail img {
    object-fit: cover;
}

.post-content {
    padding: 30px;
}

.post-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.post-title a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.post-excerpt {
    font-size: 0.95rem;
    color: var(--c-text-light);
    line-height: 1.8;
}

.post-thumbnail a,
.category-list a,
.read-more {
    position: relative;
    z-index: 1;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 60px;
}

.page-numbers {
    padding: 10px 20px;
    background: var(--c-bg-card);
    border-radius: var(--radius-pill);
    transition: all 0.3s;
}

.page-numbers:hover,
.page-numbers.current {
    background: var(--c-theme);
    color: #fff;
}

/* Comments */
.comments-area {
    margin-top: 60px;
    padding-top: 60px;
    border-top: 2px solid #F0F0F0;
}

.comment-list {
    list-style: none;
    margin-left: 0;
}

.comment {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--c-bg-card);
    border-radius: var(--radius-m);
}

.comment-author {
    font-weight: 700;
    margin-bottom: 10px;
}

.comment-meta {
    font-size: 0.85rem;
    color: var(--c-text-light);
    margin-bottom: 15px;
}

/* Comment form: keep WordPress Core field semantics and third-party filters intact.
   Layout and visual treatment belong to the theme stylesheet, not PHP markup. */
.comments-area .comment-respond {
    width: 100%;
    max-width: 800px;
    margin: 2.5rem 0 0;
    padding: clamp(24px, 4vw, 40px);
    background: var(--c-bg-card);
    border: 1px solid color-mix(in srgb, var(--c-theme) 30%, var(--c-bg-card));
    border-radius: var(--radius-m);
    box-shadow: 0 12px 36px rgba(89, 80, 72, 0.07);
}

.comments-area .comment-reply-title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.2rem, 2.4vw, 1.5rem);
    color: var(--c-text-main);
}

.comments-area .comment-reply-title #cancel-comment-reply-link {
    display: inline-block;
    margin-inline-start: 0.8rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--c-text-main);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.comments-area .comment-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem 1.5rem;
    min-width: 0;
}

.comments-area .comment-form > * {
    grid-column: 1 / -1;
    min-width: 0;
    margin: 0;
}

/* Core outputs author and email consecutively for visitors; both may be
   independently omitted by comment_form_default_fields filters. */
.comments-area .comment-form > .comment-form-author,
.comments-area .comment-form > .comment-form-email {
    grid-column: auto;
}

.comments-area .comment-form .comment-notes,
.comments-area .comment-form .logged-in-as,
.comments-area .comment-form .must-log-in {
    color: var(--c-text-light);
    font-size: 0.9rem;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.comments-area .comment-form .required-field-message {
    display: inline;
}

.comments-area .comment-form .required {
    color: var(--c-text-main);
    font-weight: 700;
}

.comments-area .comment-form :is(
    .comment-form-comment,
    .comment-form-author,
    .comment-form-email,
    .comment-form-url
) > label {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--c-text-main);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.6;
}

.comments-area .comment-form :is(
    input[type="text"],
    input[type="email"],
    input[type="url"],
    textarea
) {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0.8rem 1rem;
    border: 1px solid color-mix(in srgb, var(--c-text-light) 40%, var(--c-bg-card));
    border-radius: 12px;
    background: var(--c-bg);
    color: var(--c-text-main);
    font: inherit;
    font-size: 1rem;
    line-height: 1.6;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.comments-area .comment-form textarea {
    min-height: 180px;
    resize: vertical;
}

.comments-area .comment-form :is(
    input[type="text"],
    input[type="email"],
    input[type="url"],
    textarea
):focus {
    border-color: var(--c-theme-dark);
    outline: 2px solid var(--c-theme-dark);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-theme) 16%, transparent);
}

.comments-area .comment-form [aria-invalid="true"] {
    border-color: #a13e35;
}

.comments-area .comment-form .comment-form-cookies-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.8;
}

.comments-area .comment-form .comment-form-cookies-consent input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 0.35rem 0 0;
    accent-color: var(--c-theme-dark);
    cursor: pointer;
}

.comments-area .comment-form .comment-form-cookies-consent label {
    min-width: 0;
    cursor: pointer;
    overflow-wrap: anywhere;
}

.comments-area .comment-form a,
.comments-area .comment-reply-title a {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.comments-area .comment-form a:focus-visible,
.comments-area .comment-reply-title a:focus-visible,
.comments-area .comment-form .comment-form-cookies-consent input:focus-visible {
    outline: 2px solid var(--c-theme-dark);
    outline-offset: 3px;
}

.comments-area .comment-form .form-submit {
    margin-top: 0.25rem;
}

.comments-area .comment-form .form-submit .submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    max-width: 100%;
    padding: 0.8rem 2.25rem;
    margin: 0;
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--c-theme);
    color: var(--c-text-main);
    font: inherit;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--c-theme) 24%, transparent);
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.comments-area .comment-form .form-submit .submit:hover {
    background: var(--c-theme-light);
    transform: translateY(-2px);
}

.comments-area .comment-form .form-submit .submit:focus-visible {
    outline: 3px solid var(--c-theme-dark);
    outline-offset: 3px;
}

@media (max-width: 640px) {
    .comments-area .comment-respond {
        padding: 22px 18px;
    }

    .comments-area .comment-form {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

    .comments-area .comment-form > .comment-form-author,
    .comments-area .comment-form > .comment-form-email {
        grid-column: 1 / -1;
    }

    .comments-area .comment-form .form-submit .submit {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .comments-area .comment-form :is(input, textarea),
    .comments-area .comment-form .form-submit .submit {
        transition: none;
    }

    .comments-area .comment-form .form-submit .submit:hover {
        transform: none;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .nav-pc {
        display: none;
    }

    .header .btn {
        display: none;
    }

    /* Hide header contact button on mobile */
    .mobile-menu-toggle,
    .mobile-menu-toggle-placeholder {
        display: block;
    }

    .nav-mobile {
        display: block;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero-img-container {
        height: 250px;
    }

    .updates-grid {
        grid-template-columns: 1fr;
    }

    .steps {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .access-card {
        grid-template-columns: 1fr;
    }

    .map-area {
        height: 250px;
    }

    .info-area {
        padding: 40px 30px;
    }

    .footer-links {
        gap: 12px 20px;
    }

    .footer-links ul,
    .footer-links menu {
        gap: 12px 20px;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    /* Post Navigation Mobile */
    .post-navigation .nav-links {
        flex-direction: column;
        gap: 20px;
    }

    .post-navigation .nav-item {
        flex: 1 1 auto;
        max-width: 100%;
    }

    .post-navigation .nav-item a {
        padding: 15px;
        flex-direction: row;
        /* モバイルでは全てサムネイルを左に統一 */
    }

    .post-navigation .nav-thumbnail {
        width: 60px;
        height: 60px;
    }

    /* 背景付き見出しをSP時は単色に */
    .entry-content .heading-style-background {
        background: var(--c-theme-pale);
    }
}

/* WordPress Specific */
.sticky {}

.bypostauthor {}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    text-align: center;
    font-size: 0.9rem;
    color: var(--c-text-light);
    margin-top: 0.5em;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    white-space: nowrap;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* --- Search Form --- */
.search-form {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.search-form-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-form .search-field {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid #F0F0F0;
    border-radius: var(--radius-pill);
    font-family: var(--f-base);
    font-size: 1rem;
    color: var(--c-text-main);
    background-color: var(--c-bg-card);
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
}

.search-form .search-field:focus {
    border-color: var(--c-theme);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-theme) 15%, transparent);
}

.search-form .search-field::placeholder {
    color: var(--c-text-light);
}

.search-form .search-submit {
    padding: 12px 30px;
    flex-shrink: 0;
}

/* Search Form in Widget Areas */
.widget .search-form {
    max-width: 100%;
}

/* Mobile Search Form */
@media (max-width: 768px) {
    .search-form-wrapper {
        gap: 8px;
    }

    .search-form .search-field {
        padding: 10px 16px;
        font-size: 0.95rem;
    }

    .search-form .search-submit {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* ============================================================
   Paragraph Block Custom Styles
   段落ブロックのカスタムスタイル
   ============================================================ */
/* 段落ブロックのカスタムスタイルは block-styles.css に移動しました */

/* ============================================================
   Breadcrumb
   パンくずリスト
   ============================================================ */
.breadcrumb {
    margin-bottom: 2rem;
    padding: 0;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.875rem;
    color: var(--c-text-light);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    max-width: 100%;
}

.breadcrumb-item::after {
    content: "›";
    margin-left: 0.5rem;
    color: var(--c-text-light);
    font-size: 1rem;
    flex-shrink: 0;
}

.breadcrumb-item:last-child::after {
    content: none;
}

.breadcrumb-item a,
.breadcrumb-item span {
    display: inline-block;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.breadcrumb-item a {
    color: var(--c-text-light);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb-item a:hover {
    color: var(--c-theme);
    text-decoration: underline;
}

.breadcrumb-item span {
    color: var(--c-text-main);
    font-weight: 500;
}

/* 最後のアイテム（現在のページ）はより長く表示 */
.breadcrumb-item:last-child a,
.breadcrumb-item:last-child span {
    max-width: 500px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .breadcrumb {
        margin-bottom: 1.5rem;
    }

    .breadcrumb-list {
        font-size: 0.8125rem;
        gap: 0.4rem;
    }

    .breadcrumb-item::after {
        margin-left: 0.4rem;
    }

    /* モバイルでは短めに */
    .breadcrumb-item a,
    .breadcrumb-item span {
        max-width: 200px;
    }

    .breadcrumb-item:last-child a,
    .breadcrumb-item:last-child span {
        max-width: 300px;
    }
}

/* --- Scroll to Top Button --- */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.scroll-to-top:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.scroll-to-top:active {
    transform: translateY(0);
}

/* アイコン */
.scroll-to-top-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.scroll-to-top-icon svg {
    width: 100%;
    height: 100%;
}

.scroll-to-top-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
}

/* テキスト付きの場合 */
.scroll-to-top.has-text {
    width: auto;
    min-width: 56px;
    padding: 0 20px;
    border-radius: 28px;
}

.scroll-to-top-text {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
    }

    .scroll-to-top.has-text {
        min-width: 48px;
        padding: 0 16px;
        border-radius: 24px;
    }

    .scroll-to-top-icon {
        width: 20px;
        height: 20px;
    }

    .scroll-to-top-text {
        font-size: 0.8125rem;
    }
}

/* --- Social Icons --- */
.mitachi-social-icons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--c-bg-card);
    color: var(--c-text-main);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.social-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.social-icon:hover {
    transform: translateY(-3px) scale(1.1);
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Brand Colors on Hover */
.social-icon-instagram:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

.social-icon-facebook:hover {
    background-color: #1877F2;
}

.social-icon-x:hover {
    background-color: #000;
}

.social-icon-tiktok:hover {
    background-color: #000;
}

.social-icon-line:hover {
    background-color: #06C755;
}

.social-icon-youtube:hover {
    background-color: #FF0000;
}

/* Footer context */
.footer .mitachi-social-icons {
    margin-bottom: 30px;
}

/* ==========================================================================
   Table of Contents
   目次スタイル
   ========================================================================== */

.toc-container {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: var(--c-bg-card);
    border-radius: var(--radius-m);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* デザインバリエーション: シンプル */
.toc-container.toc-design-simple {
    background: var(--c-bg-card);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

/* デザインバリエーション: ボックス */
.toc-container.toc-design-boxed {
    background: color-mix(in srgb, var(--c-theme) 8%, var(--c-bg-card));
    border: 1px solid color-mix(in srgb, var(--c-theme) 20%, transparent);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

/* デザインバリエーション: ボーダー */
.toc-container.toc-design-border {
    background: var(--c-bg-card);
    border-left: 4px solid var(--c-theme);
    border-radius: 0 var(--radius-m) var(--radius-m) 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

/* ヘッダー */
.toc-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid color-mix(in srgb, var(--c-text-light) 20%, transparent);
}

.toc-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--c-text-main);
}

/* リスト基本スタイル */
.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 順序付きリスト（ol）- PHPで階層番号を出力するためCSSカウンターは使わない */
ol.toc-list {
    list-style: none;
}

/* 順序なしリスト（ul） */
ul.toc-list>.toc-item::before {
    content: "•";
    display: inline-block;
    min-width: 1.5em;
    margin-right: 0.5em;
    font-weight: 700;
    color: var(--toc-marker-color, var(--c-theme));
}

/* 階層番号スタイル（PHP出力） */
.toc-number {
    font-weight: 700;
    color: var(--toc-marker-color, var(--c-theme));
    margin-right: 0.5em;
    white-space: nowrap;
}

/* 目次アイテム */
.toc-item {
    display: flex;
    align-items: baseline;
    padding: 0.4em 0;
}

.toc-item a {
    color: var(--c-text-main);
    text-decoration: none;
    transition: color 0.3s ease;
    flex: 1;
}

.toc-item a:hover {
    color: var(--c-theme);
}

/* インデントレベル */
.toc-item.toc-level-0 {
    padding-left: 0;
}

.toc-item.toc-level-1 {
    padding-left: 1.5em;
    font-size: 0.9em;
}

.toc-item.toc-level-2 {
    padding-left: 3em;
    font-size: 0.85em;
}

.toc-item.toc-level-3 {
    padding-left: 4.5em;
    font-size: 0.8em;
}

.toc-item.toc-level-4 {
    padding-left: 6em;
    font-size: 0.8em;
}

/* 折りたたみ時の非表示 */
.toc-collapsed .toc-item-hidden {
    display: none;
}

/* トグルボタン */
.toc-toggle {
    display: block;
    width: 100%;
    margin-top: 1rem;
    padding: 0.75em 1em;
    background: color-mix(in srgb, var(--c-theme) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--c-theme) 30%, transparent);
    border-radius: var(--radius-pill);
    color: var(--c-theme);
    font-family: var(--f-base);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.toc-toggle:hover {
    background: color-mix(in srgb, var(--c-theme) 20%, transparent);
}

.toc-toggle:focus {
    outline: 2px solid var(--c-theme);
    outline-offset: 2px;
}

/* マーカー色変数 */
.toc-container[data-marker-color="theme"] {
    --toc-marker-color: var(--c-theme);
}

.toc-container[data-marker-color="text"] {
    --toc-marker-color: var(--c-text-main);
}

/* レスポンシブ */
@media (max-width: 768px) {
    .toc-container {
        padding: 1.25rem 1.5rem;
        margin: 1.5rem 0;
    }

    .toc-item.toc-level-1 {
        padding-left: 1em;
    }

    .toc-item.toc-level-2 {
        padding-left: 2em;
    }

    .toc-item.toc-level-3 {
        padding-left: 3em;
    }

    .toc-item.toc-level-4 {
        padding-left: 4em;
    }
}
