/*
Theme Name: Nagi Rhythm v2 改修版
Description: Nagi Rhythmの個人ブログ用テーマ。記事検索・テーマ別一覧・関連記事に対応。
Author: Nagi
Version: 1.3.0
Requires at least: 6.3
Requires PHP: 7.4
*/

/* =========================================================
   1. VARIABLES & BASE SETTINGS
========================================================= */
:root {
    --bg: #ffffff;
    --text: #111111;
    --sub-text: #555555;
    --accent: #000000;
    --border: #e5e5e5;
    --light-gray: #f9f9f7;
    --max-width: 1180px;
    --drawer-width: 85%;
    --update-red: #d32f2f;
}

body {
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans JP', sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* テキスト選択時の色（ブランドカラーでリッチに） */
::selection {
    background: #111;
    color: #fff;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}
a:hover { opacity: 0.7; }
ul { list-style: none; padding: 0; margin: 0; }
img { max-width: 100%; height: auto; display: block; background: #eee; }
button { font-family: 'Oswald', sans-serif; cursor: pointer; }


/* =========================================================
   2. HEADER & NAVIGATION & STATUS TICKER
========================================================= */
.status-ticker {
    background: #111; color: #eee; font-family: 'Oswald', sans-serif;
    font-size: 11px; letter-spacing: 0.1em; padding: 12px 0;
    overflow: hidden; white-space: nowrap; position: relative; z-index: 200;
}
.ticker-wrap { display: inline-block; animation: ticker 60s linear infinite; }
@keyframes ticker { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }
.ticker-item { margin-right: 40px; opacity: 0.9; display: inline-flex; align-items: center; }
.ticker-highlight { color: #888; margin-right: 8px; font-weight: 700; }
.live-dot { width: 6px; height: 6px; background: #4caf50; border-radius: 50%; display: inline-block; margin-right: 5px; animation: pulse 2s infinite; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.3; } 100% { opacity: 1; } }

header {
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px); z-index: 100;
}
.header-inner {
    max-width: var(--max-width); margin: 0 auto; padding: 15px 20px;
    display: flex; justify-content: space-between; align-items: center;
}
.logo {
    font-family: 'Oswald', sans-serif; font-size: 24px; font-weight: 700;
    letter-spacing: -0.02em; border: 3px solid #000; padding: 4px 12px; line-height: 1;
}
.desktop-nav { display: flex; gap: 25px; }
.nav-link { display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.nav-link .en { font-family: 'Oswald', sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 0.05em; }
.nav-link .ja { font-size: 10px; color: #888; margin-top: 2px; font-weight: 500; }
.nav-link:hover .ja { color: #000; }
@media (max-width: 900px) { .desktop-nav { display: none; } }


/* =========================================================
   3. FOOTER & MOBILE NAV & DRAWER
========================================================= */
.fat-footer {
    background: var(--light-gray); padding: 60px 20px 30px;
    border-top: 1px solid var(--border); font-size: 12px; color: var(--sub-text);
}
.footer-grid {
    max-width: var(--max-width); margin: 0 auto;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px;
}
.footer-col h4 {
    color: #000; font-family: 'Oswald', sans-serif; margin: 0 0 20px;
    font-size: 12px; border-bottom: 1px solid #ddd; padding-bottom: 8px; display: inline-block;
}
.footer-links li {
    margin-bottom: 10px; display: flex; justify-content: space-between;
    border-bottom: 1px dashed #e0e0e0; padding-bottom: 5px;
}
.copyright {
    text-align: center; margin-top: 60px; padding-top: 20px;
    border-top: 1px solid #ddd; font-size: 10px; letter-spacing: 0.1em; color: #999;
}

.mobile-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(255,255,255,0.98); border-top: 1px solid var(--border);
    height: 60px; display: none; justify-content: space-around; align-items: center; z-index: 1000;
}
@media (max-width: 850px) { .mobile-nav { display: flex; } }
.nav-item { display: flex; flex-direction: column; align-items: center; font-size: 9px; color: #aaa; font-weight: 700; width: 100%; }
.nav-icon { font-size: 18px; margin-bottom: 2px; }
.nav-item.active { color: #000; }

.drawer {
    position: fixed; top: 0; right: -100%; width: var(--drawer-width); height: 100%;
    background: #fff; z-index: 2000; transition: right 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.1); padding: 40px; box-sizing: border-box;
    display: flex; flex-direction: column; overflow-y: auto;
}
.drawer.open { right: 0; }
.drawer-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 1500; opacity: 0; visibility: hidden;
    transition: all 0.4s; backdrop-filter: blur(2px);
}
.drawer-overlay.open { opacity: 1; visibility: visible; }
.drawer-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; border-bottom: 2px solid #000; padding-bottom: 10px; }
.drawer-title { font-family: 'Oswald', sans-serif; font-size: 24px; font-weight: 700; }
.close-btn { background: none; border: none; font-size: 30px; line-height: 1; padding: 0; }
.drawer-list li { margin-bottom: 20px; }
.drawer-link { font-family: 'Oswald', sans-serif; font-size: 18px; font-weight: 500; display: block; }

.drawer-link small { font-family: 'Noto Sans JP'; font-size: 12px; color: #888; margin-left: 10px; font-weight: 400; }

.back-to-top {
    position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px;
    background: #111; color: #fff; display: flex; justify-content: center; align-items: center;
    border-radius: 50%; opacity: 0; visibility: hidden; transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); z-index: 999; box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--update-red); transform: translateY(-3px); }
.back-to-top svg { width: 24px; height: 24px; }
@media (max-width: 600px) { .back-to-top { bottom: 80px; right: 20px; width: 45px; height: 45px; } }


/* =========================================================
   4. FRONT PAGE (HOME)
========================================================= */
.hero-section {
    max-width: var(--max-width); margin: 40px auto; padding: 0 20px;
    display: grid; grid-template-columns: 2fr 1fr; gap: 40px;
}
@media (max-width: 900px) { .hero-section { grid-template-columns: 1fr; } }
.hero-main { position: relative; aspect-ratio: 16/9; overflow: hidden; background: #000; }
.hero-main img { width: 100%; height: 100%; object-fit: cover; opacity: 0.9; }
.hero-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 30px; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); color: #fff; }
.cat-tag { background: #111; color: #fff; padding: 4px 10px; font-size: 10px; font-weight: 700; display: inline-block; margin-bottom: 10px; font-family: 'Oswald', sans-serif; letter-spacing: 0.05em; }
.hero-overlay .cat-tag { background: #fff; color: #000; }
.hero-title { font-family: 'Noto Serif JP', serif; font-size: clamp(1.4rem, 3vw, 2rem); margin: 0; line-height: 1.4; font-weight: 600; color: #fff; }

.sub-article { display: flex; gap: 15px; align-items: flex-start; border-bottom: 1px solid var(--border); padding-bottom: 20px; margin-bottom: 20px; }
.sub-article:last-child { border-bottom: none; margin-bottom: 0; }
.sub-thumb { width: 90px; height: 65px; object-fit: cover; flex-shrink: 0; }
.sub-info h3 { font-size: 13px; margin: 0 0 5px 0; line-height: 1.5; font-weight: 500; }
.meta { font-size: 10px; color: #999; font-family: 'Oswald', sans-serif; font-weight: 500; letter-spacing: 0.05em; display: flex; align-items: center; gap: 5px; }

.hero-main img, .sub-thumb, .article-thumb, .grid-card img {
    filter: sepia(5%) saturate(80%) contrast(105%);
    transition: filter 0.5s ease, transform 0.5s ease, opacity 0.3s;
}
.hero-main:hover img, .article-card:hover .article-thumb, .grid-card:hover img {
    filter: none;
}

.profile-strip { background: var(--light-gray); border-top: 1px solid #111; border-bottom: 1px solid #111; padding: 50px 20px; margin: 60px 0; }
.profile-inner { max-width: 800px; margin: 0 auto; display: flex; align-items: center; gap: 40px; }
.profile-image { width: 200px; height: 200px; border-radius: 50%; overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-family: 'Oswald', sans-serif; font-size: 3rem; font-weight: 700; background-color: #111; }
.profile-image img { width: 100%; height: 100%; object-fit: cover; }
.profile-content { flex: 1; }
.role-badge { font-family: 'Oswald', sans-serif; font-size: 10px; background: #000; color: #fff; padding: 3px 8px; display: inline-block; margin-bottom: 8px; }
.profile-name { font-family: 'Oswald', sans-serif; font-size: 1.8rem; margin: 0 0 10px 0; line-height: 1; }
.profile-bio { font-size: 0.9rem; line-height: 1.7; color: #444; }
@media (max-width: 600px) { .profile-inner { flex-direction: column; text-align: center; gap: 20px; } }

.container { max-width: var(--max-width); margin: 60px auto; padding: 0 20px; display: grid; grid-template-columns: 1fr 300px; gap: 50px; }
@media (max-width: 900px) { .container { grid-template-columns: 1fr; } }

.section-head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid #000; padding-bottom: 10px; margin-bottom: 30px; }
.section-title { font-family: 'Oswald', sans-serif; font-size: 18px; font-weight: 700; margin: 0; letter-spacing: 0.1em; }
.view-all { font-size: 11px; font-weight: 700; text-decoration: underline; }

.article-card { display: grid; grid-template-columns: 240px 1fr; gap: 25px; align-items: start; margin-bottom: 30px; padding-bottom: 30px; border-bottom: 1px solid #f0f0f0; }
.article-card:last-of-type { border-bottom: none; }
@media (max-width: 600px) { .article-card { grid-template-columns: 1fr; gap: 15px; } .article-thumb { height: 180px; } }
.article-thumb { width: 100%; height: 160px; object-fit: cover; }
.card-content h3 { font-family: 'Noto Serif JP', serif; font-size: 1.35rem; margin: 8px 0 10px; line-height: 1.6; font-weight: 600; }
.excerpt { font-size: 13px; color: var(--sub-text); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 0; }

/* ウィジェット共通 */
.widget { margin-bottom: 40px; }
.widget-title { font-family: 'Oswald', sans-serif; font-size: 12px; font-weight: 700; border-bottom: 1px solid #000; padding-bottom: 5px; margin-bottom: 15px; letter-spacing: 0.1em; }
.postbox-card { background: var(--light-gray); padding: 25px; text-align: center; border: 1px solid var(--border); }
.postbox-text { font-size: 12px; line-height: 1.6; margin: 10px 0 20px; color: var(--sub-text); }
.btn-black { display: inline-block; padding: 12px 30px; background: #111; color: #fff; font-family: 'Oswald', sans-serif; font-size: 12px; font-weight: 700; border: 1px solid #111; transition: all 0.3s; text-align: center; letter-spacing: 0.1em; }
.btn-black:hover { background: #fff; color: #111; }

.sidebar-search { display: flex; border: 2px solid #111; border-radius: 2px; overflow: hidden; }
.sidebar-search input { flex: 1; padding: 12px 15px; border: none; outline: none; font-family: 'Noto Sans JP', sans-serif; font-size: 0.9rem; }
.sidebar-search button { background: #111; color: #fff; border: none; padding: 0 15px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: opacity 0.3s; }
.sidebar-search button:hover { opacity: 0.8; }
.sidebar-search svg { width: 18px; height: 18px; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: 11px; padding: 5px 10px; border: 1px solid #ddd; color: var(--sub-text); display: flex; align-items: center; gap: 5px; }
.tag:hover { border-color: #000; color: #000; background: #fff; }
.tag-count { font-size: 9px; background: #eee; color: #888; padding: 2px 6px; border-radius: 10px; margin-left: 5px; font-weight: 700; transition: all 0.3s; }
.tag:hover .tag-count { background: #111; color: #fff; }

/* スマホ（幅900px以下）の時、サイドバーエリアを非表示にする */
@media (max-width: 900px) {
    /* サイドバー全体のIDまたはクラスを指定 */
    /* ※テーマによってクラス名は変わりますが、一般的にな名称を入れています */
    #sidebar, .sidebar, #secondary, .widget-area {
        display: none !important;
    }
}
/* =========================================================
   5. SINGLE POST (記事詳細)
========================================================= */
/* 修正：記事詳細の幅をサイト全体の最大幅（1180px）に統一 */
.post-entry-wrap {
    max-width: 840px;
    margin: 60px auto !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

.breadcrumbs { font-family: 'Oswald', 'Noto Sans JP', sans-serif; font-size: 0.75rem; color: #888; margin-bottom: 25px; letter-spacing: 0.05em; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.breadcrumbs a { color: #888; transition: color 0.3s; }
.breadcrumbs a:hover { color: #000; }
.breadcrumbs .sep { color: #ccc; }
.breadcrumbs .current { color: #222; font-weight: 500; }

.post-header { margin-bottom: 50px; }
.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 15px; margin-bottom: 20px; font-family: 'Oswald', sans-serif; font-size: 12px; }
.post-meta .date { color: #888; font-weight: 500; }
.read-time { color: #666; font-weight: 500; display: flex; align-items: center; gap: 5px; }
.post-title { font-family: 'Noto Serif JP', serif; font-size: clamp(1.8rem, 4vw, 2.5rem); margin: 0 0 30px; line-height: 1.5; font-weight: 600; }
.post-eyecatch { width: 100%; max-height: 65vh; object-fit: contain; background-color: var(--light-gray); margin-bottom: 40px; border: 1px solid var(--border); }

/* ---------------------------------------------------------
   目次（TOC）デザイン【完全修正版】
   --------------------------------------------------------- */
.toc-container {
    background: #fcfcfc;
    border: 2px solid #111;
    border-radius: 4px;
    padding: 25px 30px;
    margin-bottom: 50px;
    box-shadow: 4px 4px 0px #111;
}

.toc-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
    border-bottom: 2px solid #111;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.toc-title::before { content: '📝'; font-size: 1.2rem; }

/* 目次リストのリセットとナンバリング */
.toc-list {
    list-style: none !important; /* デフォルトの数字を消す */
    counter-reset: toc-counter; /* カウンター初期化 */
    padding-left: 0;
    margin: 0;
}

.toc-list li {
    position: relative;
    margin-bottom: 12px;
    line-height: 1.6;
    color: #888;
    font-weight: 600;
    list-style: none !important;
    background: none !important; /* 本文のリストスタイルを打ち消す */
    border: none !important;
    padding: 0 !important;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

/* 疑似要素で「1.」などを生成 */
.toc-list li::before {
    content: counter(toc-counter) ".";
    counter-increment: toc-counter;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    color: #111;
    min-width: 1.5em;
    flex-shrink: 0;
}

.toc-list a {
    color: #222;
    font-size: 0.95rem;
    transition: color 0.3s, transform 0.3s;
    display: inline-block;
    text-decoration: none;
}
.toc-list a:hover {
    color: var(--update-red);
    transform: translateX(5px);
    text-decoration: underline;
}

/* ---------------------------------------------------------
   本文コンテンツのデザイン
   --------------------------------------------------------- */
.post-content { line-height: 1.9; font-size: 1.05rem; color: #222; letter-spacing: 0.02em; }
.post-content > * { margin-bottom: 30px; }

/* 見出し */
.post-content h2 { font-family: 'Oswald', 'Noto Sans JP', sans-serif; font-size: 1.5rem; border-bottom: 2px solid #000; padding-bottom: 10px; margin: 60px 0 30px; font-weight: 700; scroll-margin-top: 100px; }
.post-content h3 { font-size: 1.25rem; margin: 50px 0 20px; border-left: 4px solid #000; padding-left: 15px; font-weight: 700; }
.post-content h4 { font-size: 1.15rem; margin: 50px 0 20px; border-bottom: 2px solid #000;
    font-weight: 700;
    padding-bottom: 10px; }
/* 画像・メディア */
.post-content img { max-width: 100%; height: auto; display: block; margin: 40px auto; border-radius: 4px; border: 1px solid #e5e5e5;}
div.yyi-rinker-contents img {
	margin-bottom: 0;
	margin-top:0px;
}
.post-content iframe[src^="https://www.youtube.com/embed/"],
.post-content iframe[src^="https://www.youtube-nocookie.com/embed/"],
.post-content iframe[src^="https://player.vimeo.com/video/"] { width: 100%; max-width: 100%; aspect-ratio: 16 / 9; height: auto; border: none; border-radius: 4px; margin: .5em 0; display: block; }

/* リンク・マーカー */
.post-content a { color: var(--update-red); text-decoration: underline; font-weight: 500; }
.post-content a:hover { opacity: 0.7; }
.post-content mark, .post-content .marker, .post-content .has-background { background: linear-gradient(transparent 60%, rgba(255, 222, 0, 0.7) 60%); font-weight: bold; padding: 0 4px; color: inherit; }

/* 引用 */
.post-content blockquote { background: var(--light-gray); border-left: 4px solid #111; padding: 20px; margin: 40px 0; color: #555; font-style: italic; }

/* キャプション */
.post-content figcaption { font-size: 0.75rem; color: #999; text-align: center; margin-top: 10px; letter-spacing: 0.05em; }


/* ---------------------------------------------------------
   リスト（箇条書き）のデザイン【リッチ版】
   ※目次(.toc-list)とRinker(.yyi-rinker-links)を除外して適用
   --------------------------------------------------------- */
.post-content ul:not(.toc-list):not(.yyi-rinker-links), 
.post-content ol:not(.toc-list):not(.yyi-rinker-links) { 
    padding: 25px 30px;        /* ボックス内の余白 */
    margin: 3em 0;             /* 上下の余白 */
    list-style: none;          /* デフォルトの点を消す */
    background: #f9f9f9;       /* 全体の背景色 */
    border: 1px solid #eee;    /* 薄い枠線 */
    border-left: 5px solid #111; /* 左側に太いアクセント（Nagi Rhythmカラー） */
    border-radius: 4px;        /* 角を少し丸く */
    box-shadow: 0 2px 5px rgba(0,0,0,0.03); /* ほんのり影をつけて浮かせる */
}
/* =========================================================
   【重要】過去記事のリスト内pタグの余白リセット
   ========================================================= */

/* リストの中にある pタグ の余白を消す */
.post-content ul:not(.toc-list):not(.yyi-rinker-links) li p,
.post-content ol:not(.toc-list):not(.yyi-rinker-links) li p {
    margin: 0 !important;   /* 上下の余白を強制削除 */
    padding: 0;             /* パディングも削除 */
    display: inline-block;  /* 必要に応じてインラインブロック化 */
}
/* リスト内の各項目 */
.post-content ul:not(.toc-list):not(.yyi-rinker-links) li,
.post-content ol:not(.toc-list):not(.yyi-rinker-links) li { 
    position: relative;
    padding: 10px 0 10px 22px; /* 上下は適度な余白、左はアイコン用 */
    margin-bottom: 0;          /* 項目間の隙間をなくす */
    line-height: 1.8;
    font-weight: 500;
    background: none;          /* 個別の背景を削除 */
    border-left: none;         /* 個別の太線を削除 */
    border-bottom: 1px dashed #ddd; /* 項目同士を破線で区切る */
}

/* 最後の項目だけ下の線を消す */
.post-content ul:not(.toc-list):not(.yyi-rinker-links) li:last-child {
    border-bottom: none;
}

/* 黒丸アイコン（位置調整済み） */
.post-content ul:not(.toc-list):not(.yyi-rinker-links) li::before { 
    content: '';
    position: absolute;
    left: 0;         /* 左端に寄せる */
    top: 1.2em;      /* 文頭に合わせる */
    width: 6px;
    height: 6px;
    background-color: #000;
    border-radius: 50%;
}

/* =========================================================
   TABLE STYLES (THE ARCHITECTURAL MINIMAL)
   ========================================================= */
.post-content table {
    width: 100%; border-collapse: collapse; margin: 4em 0; font-size: 0.95rem;
    border-top: 3px solid #111; border-bottom: 2px solid #111;
}
.post-content th {
    background: #fff; color: #111; font-family: 'Oswald', sans-serif; font-weight: 700;
    letter-spacing: 0.1em; padding: 20px; border-bottom: 1px solid #111; text-align: left; vertical-align: middle; text-transform: uppercase;
}
.post-content td { padding: 20px; border-bottom: 1px solid #eee; line-height: 1.7; vertical-align: top; color: #444; }
.post-content td:first-child { background: #f9f9f9; font-weight: 700; color: #111; width: 25%; }
.post-content tr { transition: background 0.2s ease; }
.post-content tr:hover td { background: #f4f4f4; }
@media (max-width: 600px) {
    .post-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; border-top: 2px solid #111; }
    .post-content td:first-child { width: auto; position: sticky; left: 0; z-index: 1; box-shadow: 2px 0 5px rgba(0,0,0,0.05); }
    .post-content th, .post-content td { padding: 15px; min-width: 140px; }
}

/* =========================================================
   INTERNAL LINKS (BLOG CARD) - REFINED DESIGN
   ========================================================= */

/* コンテナ：上下の余白と幅調整 */
.blogcard-container {
    margin: 3em 0;
    width: 100%;
}

/* リンク：カード全体のクリッカブル領域 */
.blogcard-link {
    text-decoration: none !important;
    display: block;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.blogcard-link:hover {
    transform: translateY(-4px);
    opacity: 1 !important; /* 透明度変化はオフにして影で表現 */
}

/* カード本体：枠線、背景、影 */
.blogcard-inner {
    display: flex;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    overflow: hidden; /* 角丸からはみ出さないように */
    box-shadow: 0 2px 5px rgba(0,0,0,0.03); /* ほんのり浮き上がらせる */
    height: 160px; /* PCでの高さを固定して整える */
    transition: border-color 0.3s, box-shadow 0.3s;
}

.blogcard-link:hover .blogcard-inner {
    box-shadow: 0 10px 25px rgba(0,0,0,0.08); /* ホバー時に影を濃く */
    border-color: #ccc;
}

/* サムネイル画像エリア */
.blogcard-thumb {
    width: 260px; /* 画像を大きく見せてリッチに */
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}

.blogcard-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.5s ease;
    border: none !important;
    margin: 0 !important;
}

/* ホバー時に画像をズーム */
.blogcard-link:hover .blogcard-thumb img {
    transform: scale(1.05);
}

/* テキスト情報エリア */
.blogcard-body {
    flex: 1;
    padding: 20px 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* 上下均等配置 */
    min-width: 0; /* フレックスはみ出し防止 */
}

/* タイトル */
.blogcard-title {
    font-family: "Noto Serif JP", serif;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 8px;
    color: #111;
    /* 2行で省略 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blogcard-link:hover .blogcard-title {
    text-decoration: underline; /* リンクっぽさを演出 */
}

/* 抜粋文 */
.blogcard-snippet {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: auto; /* 下部メタ情報を底に押しやる */
    /* 2行で省略 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* メタ情報（サイト名・日付） */
.blogcard-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-family: 'Oswald', sans-serif;
    font-size: 0.7rem;
    color: #999;
    letter-spacing: 0.05em;
    border-top: 1px dashed #eee;
    padding-top: 8px;
}

.blogcard-site {
    font-weight: 700;
    color: #333; /* サイト名は少し濃く */
}

/* ---------------------------------------------------------
   スマホ対応（縦積みレイアウト）
   --------------------------------------------------------- */
@media (max-width: 600px) {
    .blogcard-inner {
        height: auto; /* 高さを自動に */
        min-height: 110px;
    }

    .blogcard-thumb {
        width: 110px; /* スマホでは画像を小さく正方形に近く */
    }

    .blogcard-body {
        padding: 12px 15px;
        justify-content: center;
    }

    .blogcard-title {
        font-size: 0.95rem;
        margin-bottom: 4px;
        -webkit-line-clamp: 3; /* スマホなら3行まで許容 */
    }

    .blogcard-snippet {
        display: none; /* スマホでは抜粋を非表示にしてスッキリさせる */
    }

    .blogcard-meta {
        margin-top: 6px;
        padding-top: 0;
        border: none;
    }
    
    .blogcard-site {
        display: none; /* スマホではサイト名も消して日付だけにする */
    }
}

/* 関連記事 (READ NEXT) */
.related-posts { margin-top: 60px; padding-top: 50px; border-top: 2px solid #000; }
.related-header { text-align: center; margin-bottom: 30px; display: flex; justify-content: space-between; align-items: flex-end; }
.related-title { font-family: 'Oswald', sans-serif; font-size: 1.2rem; letter-spacing: 0.1em; margin: 0; }
.swipe-indicator { display: none; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.related-card { display: flex; flex-direction: column; transition: transform 0.3s; }
.related-card:hover { transform: translateY(-5px); opacity: 0.8; }
.related-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; margin-bottom: 12px; border: 1px solid var(--border); }
.related-card h4 { font-family: 'Noto Serif JP', serif; font-size: 0.95rem; line-height: 1.5; margin: 0; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

@media (max-width: 600px) {
    .related-header { text-align: left; }
    .swipe-indicator { display: flex; align-items: center; gap: 4px; color: #888; font-family: 'Oswald', sans-serif; font-size: 11px; letter-spacing: 0.05em; animation: swipe-bounce 1.5s infinite ease-in-out; }
    .swipe-indicator svg { width: 14px; height: 14px; }
    @keyframes swipe-bounce { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(5px); } }
    .related-grid { display: flex; flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; gap: 15px; padding-bottom: 20px; padding-right: 20px; scrollbar-width: none; }
    .related-grid::-webkit-scrollbar { display: none; }
    .related-card { flex: 0 0 82%; scroll-snap-align: center; gap: 10px; }
}

.post-footer { margin-top: 20px; padding-top: 40px; border-top: 1px solid var(--border); text-align: center; }
.back-btn { display: inline-block; padding: 15px 40px; border: 1px solid #000; font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 12px; letter-spacing: 0.1em; transition: all 0.3s; }
.back-btn:hover { background: #000; color: #fff; }


/* =========================================================
   6. ARCHIVE & SEARCH PAGES (一覧・検索)
========================================================= */
.page-header { background: #111; color: #fff; padding: 80px 20px; text-align: center; }
.page-header h1 { font-family: 'Oswald', sans-serif; font-size: clamp(2.5rem, 5vw, 4rem); margin: 0; letter-spacing: 0.05em; }
.page-header span { font-size: 13px; letter-spacing: 0.2em; opacity: 0.7; font-weight: 500; display: block; margin-top: 10px; }

.archive-container, .search-container { max-width: 1180px; margin: 60px auto; padding: 0 20px; }
.search-container { max-width: 800px; min-height: 50vh; }

.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 50px 30px; margin-bottom: 80px; }
.grid-card { display: flex; flex-direction: column; transition: transform 0.3s ease; }
.grid-card:hover { transform: translateY(-5px); }
.card-image-wrap { display: block; overflow: hidden; margin-bottom: 15px; border: 1px solid var(--border); }
.card-image-wrap img { width: 100%; aspect-ratio: 16/9; object-fit: cover; transition: transform 0.5s ease, opacity 0.3s; }
.grid-card:hover .card-image-wrap img { transform: scale(1.03); opacity: 0.9; }
.card-info .meta { font-family: 'Oswald', sans-serif; font-size: 11px; color: #888; letter-spacing: 0.05em; display: block; margin-bottom: 8px; }
.card-info h3 { font-family: 'Noto Serif JP', serif; font-size: 1.1rem; line-height: 1.4; margin: 0 0 10px; font-weight: 700; }
.card-info h3 a { text-decoration: none; }
.card-info h3 a:hover { color: var(--update-red); }

/* =========================================================
   DESIGN FIX: PAGINATION & BUTTONS
========================================================= */
.load-more-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 300px; /* 横長になりすぎないよう制限 */
    margin: 60px auto 0;
    padding: 15px 0;
    border: 1px solid #111;
    background-color: transparent !important; /* 強制的に透明に */
    color: #111;
    font-family: 'Oswald', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.load-more-btn:hover {
    background-color: #111 !important;
    color: #fff !important;
    transform: translateY(-2px);
}

.pagination {
    margin-top: 80px;
    margin-bottom: 80px; /* 下にも余白を追加 */
    padding-top: 0;
    border: none;
    display: flex;
    justify-content: center;
}

/* WordPressが出力するクラス .nav-links をターゲットにする */
.pagination .nav-links {
    display: flex;
    flex-wrap: wrap; /* スマホで折り返せるように */
    gap: 8px;
    align-items: center;
    justify-content: center;
}

/* "投稿ナビゲーション" という見出しを消す */
.pagination .screen-reader-text {
    display: none;
}

/* 数字・矢印のスタイル */
.pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 5px;
    border: 1px solid #e5e5e5;
    background: #fff;
    color: #111;
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

/* ホバー時 */
.pagination a.page-numbers:hover {
    border-color: #111;
    background-color: #111;
    color: #fff;
}

/* 現在のページ */
.pagination .page-numbers.current {
    border-color: #111;
    background-color: #111;
    color: #fff;
    cursor: default;
}

/* ドット (...) */
.pagination .page-numbers.dots {
    border: none;
    background: transparent;
}

@media (max-width: 900px) { .article-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
    .article-grid { grid-template-columns: 1fr; gap: 40px; }
    /* ページネーションのスマホ調整 */
    .pagination .nav-links { gap: 5px; }
    .pagination .page-numbers { min-width: 36px; height: 36px; font-size: 12px; }
}
@media (max-width: 767px) {
figure{
	margin-inline-start: 0px;
    margin-inline-end: 0px;
}
	div.yyi-rinker-contents div.yyi-rinker-box {
		display:block;
	}
	.post-content .yyi-rinker-image {
		width:auto;
		margin:0 auto!important;
	}
	div.yyi-rinker-contents div.yyi-rinker-info {
		width:auto;
	}
}

/* =========================================================
   7. PAGE: PROFILE & CONTACT (固定ページ)
========================================================= */
/* PROFILE */
.profile-container { max-width: 1000px; margin: 60px auto 100px; padding: 0 20px; display: grid; grid-template-columns: 2fr 1fr; gap: 60px; }
.profile-content section { margin-bottom: 50px; }
.en-title { font-family: 'Oswald', sans-serif; font-size: 1.5rem; letter-spacing: 0.05em; border-bottom: 2px solid #111; padding-bottom: 10px; margin-bottom: 25px; display: inline-block; }
.greeting { font-size: 1.1rem; margin-bottom: 20px; }
.profile-content p { line-height: 1.8; margin-bottom: 20px; color: #333; }
.favorites-list { list-style: none; padding: 0; }
.favorites-list li { margin-bottom: 15px; line-height: 1.6; padding-left: 15px; border-left: 3px solid #111; color: #333; }
.ja-motto { font-family: 'Noto Serif JP', serif; font-size: 1.4rem; font-weight: 700; margin-bottom: 20px; }

.profile-sidebar { display: flex; flex-direction: column; gap: 40px; }
.avatar-box { text-align: center; background: #f9f9f9; padding: 40px 20px; border: 1px solid var(--border); }
.avatar-img { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; margin-bottom: 20px; margin-left: auto; margin-right: auto; }
.avatar-name { font-family: 'Oswald', sans-serif; font-size: 1.5rem; margin: 0 0 5px; }
.avatar-job { font-size: 12px; color: #888; letter-spacing: 0.1em; margin: 0; }
.contact-box { text-align: center; padding: 40px 20px; border: 1px solid var(--border); }

@media (max-width: 768px) {
    .profile-container { grid-template-columns: 1fr; gap: 40px; }
    .profile-sidebar { order: -1; }
}

/* CONTACT */
.contact-container { max-width: 700px; margin: 80px auto; padding: 0 20px; }
.contact-intro { font-size: 0.95rem; line-height: 1.8; color: #555; text-align: center; margin-bottom: 50px; }
.contact-form { display: flex; flex-direction: column; gap: 30px; }
.form-group { display: flex; flex-direction: column; gap: 10px; }
.form-group label { font-family: 'Oswald', sans-serif; font-size: 14px; letter-spacing: 0.05em; font-weight: 700; }
.required { color: var(--update-red); }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea {
    width: 100%; padding: 15px 0; border: none; border-bottom: 2px solid #ddd;
    font-family: 'Noto Sans JP', sans-serif; font-size: 1rem; background: transparent;
    transition: border-color 0.3s; box-sizing: border-box; outline: none;
}
.contact-form input:focus, .contact-form textarea:focus { border-bottom-color: #111; }
.contact-form textarea { resize: vertical; min-height: 150px; }
.submit-btn {
    margin-top: 20px; padding: 20px; background: #111; color: #fff; border: 2px solid #111;
    font-family: 'Oswald', sans-serif; font-size: 16px; font-weight: 700; letter-spacing: 0.1em;
    cursor: pointer; transition: all 0.3s ease;
}
.submit-btn:hover { background: #fff; color: #111; }

/* =========================================================
   UX FIX: 全体クリック可能なカードへの対応
   ========================================================= */

/* リンク自体のスタイルリセット */
.card-link-wrap {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

.card-link-wrap:hover {
    opacity: 0.8; /* 全体を少し薄くする */
}

/* ホバー時の画像フィルター解除（親要素が変わったためセレクタを修正） */
/* トップページのリスト表示用 */
.card-link-wrap:hover .article-thumb,
.card-link-wrap:hover .grid-card img {
    filter: none; /* セピア解除 */
    transform: scale(1.02); /* わずかにズームさせてクリック感を演出 */
    transition: all 0.5s ease;
}

/* 以前のホバーエフェクトと衝突しないように調整 */
.article-thumb, .grid-card img {
    /* デフォルト状態 */
    filter: sepia(5%) saturate(80%) contrast(105%);
    transition: filter 0.5s ease, transform 0.5s ease;
}

/* タイトルリンクの色変化（ホバー時） */
.card-link-wrap:hover h3 {
    color: var(--update-red); /* アクセントカラーに変更 */
    transition: color 0.3s;
}

/* =========================================================
   AFFILIATE LINKS (RINKER / POCHIPP)
   ========================================================= */
.post-content .yyi-rinker-contents,
.post-content .pochipp-box {
    border: 1px solid var(--border) !important;
    padding: 25px !important;
    margin: 3em 0 !important;
    background: #fff !important;
    border-radius: 4px;
}

/* レイアウト調整 */
.post-content .yyi-rinker-box { display: flex; gap: 30px; align-items: center; }
.post-content .yyi-rinker-image { flex-shrink: 0; width: 120px !important; margin: 0 !important; }
.post-content .yyi-rinker-info { flex: 1; text-align: left !important; }
.post-content .yyi-rinker-title { font-family: "Noto Serif JP", serif !important; font-weight: 700 !important; font-size: 1.1rem !important; margin-bottom: 8px !important; line-height:24px;}
.post-content .yyi-rinker-title a { color: #111 !important; text-decoration: none !important; }

/* リストスタイルの強制リセット（余計な点を消す） */
ul.yyi-rinker-links,
.post-content ul.yyi-rinker-links {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    background: none !important;
}

/* 内部リスト項目のリセット */
ul.yyi-rinker-links li,
.yyi-rinker-links li {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}
/* 疑似要素（黒丸アイコン）も消す */
ul.yyi-rinker-links li::before,
.yyi-rinker-links li::before {
    display: none !important;
}

/* ボタンデザイン */
.post-content .yyi-rinker-link a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 10px 20px !important;
    font-size: .8rem !important;
    font-weight: 700 !important;
    border-radius: 4px !important;
    color: #fff !important;
    text-decoration: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* 影をつけてボタン感を出す */
    transition: opacity 0.3s;
}

.post-content .yyi-rinker-link a:hover {
    opacity: 0.8;
}

/* ★ここが重要：背景色を !important で強制的に復活させる */
.post-content .amazon-link a { 
    background-color: #111 !important; /* Nagi Rhythmらしく黒へ */
}
.post-content .rakuten-link a { 
    background-color: #bf0000 !important; /* 楽天レッド */
}
.post-content .yahoo-link a { 
    background-color: #f03 !important; /* Yahooレッド/ピンク */
}

/* もしKindleなど他のボタンがある場合の保険 */
.post-content .kindle-link a {
    background-color: #00749e !important;
}

/* =========================================================
   PAGE: PROFILE (MODERN REDESIGN)
   ========================================================= */

/* 共通コンテナサイズ定義 */
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 20px; }
.container-medium { max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.bg-light { background-color: var(--light-gray); }
.bg-black { background-color: #111; color: #fff; }

/* セクション共通見出し */
.section-label {
    font-family: 'Oswald', sans-serif;
    font-size: 12px;
    letter-spacing: 0.2em;
    color: #999;
    margin-bottom: 20px;
    display: block;
    font-weight: 700;
}
.section-heading {
    font-family: 'Noto Serif JP', serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    margin-bottom: 40px;
    line-height: 1.4;
}

/* 1. ヒーローセクション */
.profile-hero {
    background: #111;
    color: #fff;
    padding: 100px 20px 80px;
    text-align: center;
}
.profile-hero-title {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(3rem, 6vw, 5rem);
    letter-spacing: 0.05em;
    margin: 0;
    line-height: 1;
}
.profile-hero-sub {
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    letter-spacing: 0.3em;
    opacity: 0.7;
    margin-top: 15px;
}

/* 2. リードセクション */
.profile-lead-section {
    text-align: center;
    margin-top: -50px; /* ヒーローに少し重ねる */
}
.profile-avatar-wrap {
    width: 180px;
    height: 180px;
    margin: 0 auto 30px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid #fff; /* 白枠で強調 */
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.profile-avatar-large { width: 100%; height: 100%; object-fit: cover; }
.profile-name-large {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1;
}
.profile-role {
    font-size: 1rem;
    color: #888;
    font-weight: 500;
    letter-spacing: 0.1em;
    display: block;
    margin-top: 5px;
}
.profile-lead-text {
    font-size: 1.05rem;
    line-height: 1.9;
    color: #333;
}

/* 3. ABOUT ME セクション */
.profile-about-section { padding: 80px 20px; }
.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
    text-align: center;
}
.stats-item {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 4px;
}
.stats-num {
    display: block;
    font-family: 'Oswald', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 10px;
}
.stats-label {
    font-size: 11px;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 0.1em;
    color: #888;
    font-weight: 700;
}
.profile-text-block p {
    margin-bottom: 2em;
    line-height: 1.9;
    font-size: 1rem;
    color: #333;
}

/* 4. LIFESTYLE セクション */
.profile-lifestyle-section { padding: 100px 0; }
.lifestyle-intro {
    max-width: 800px;
    margin-bottom: 60px;
    line-height: 1.9;
    font-size: 1rem;
}
.lifestyle-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}
.lifestyle-card {
    background: #fff;
    padding: 35px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    transition: transform 0.3s;
}
.lifestyle-card:hover { transform: translateY(-5px); }
.card-icon { font-size: 3rem; margin-bottom: 20px; text-align:center;}
.lifestyle-card h4 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
	text-align:center;
    margin-bottom: 15px;
    letter-spacing: 0.05em;
}
.lifestyle-card p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #555;
}

/* 5. MOTTO セクション */
.profile-motto-section { padding: 100px 20px; text-align: center; }
.motto-jp {
    font-family: 'Noto Serif JP', serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 50px;
    line-height: 1.3;
}

/* 6. CONTACT セクション */
.profile-contact-section { padding: 120px 20px; }
.contact-heading-en {
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
}
.contact-text-jp {
    font-size: 1rem;
    line-height: 1.8;
    opacity: 0.8;
    margin-bottom: 40px;
}
.btn-white {
    display: inline-block;
    padding: 15px 50px;
    background: #fff;
    color: #111;
    font-family: 'Oswald', sans-serif;
    font-size: 13px;
    font-weight: 700;
    border: 2px solid #fff;
    transition: all 0.3s;
    text-align: center;
    letter-spacing: 0.1em;
    text-decoration: none;
}
.btn-white:hover {
    background: #111;
    color: #fff;
}

/* スマホ対応 */
@media (max-width: 768px) {
    .pc-only { display: none; }
    .profile-stats-grid { grid-template-columns: 1fr; gap: 15px; }
    .lifestyle-grid { grid-template-columns: 1fr; gap: 25px; }
    .profile-lead-section { margin-top: -30px; }
    .profile-avatar-wrap { width: 140px; height: 140px; }
}
/* 画像の上にグラデーションレイヤーを乗せる */
.featured-story::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%; /* 下半分だけ */
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    z-index: 1;
}
/* テキストをグラデーションより上に表示 */
.featured-story-text {
    z-index: 2;
    position: relative;
}
/* =========================================================
   DARK MODE SETTINGS (HIGH CONTRAST & MATTE BLACK)
   ========================================================= */

/* 変数定義：文字色を大幅に明るく修正 */
[data-theme="dark"] {
    --bg: #121212;           /* 背景：漆黒ではなく、目に優しいダークグレー */
    --text: #f5f5f5;         /* 文字：ほぼ白（視認性重視） */
    --sub-text: #b0b0b0;     /* サブ文字：明るめのグレー */
    --border: #444444;       /* 枠線：少し明るくして境界を明確に */
    --light-gray: #1e1e1e;   /* 薄い背景：メイン背景より少し明るく */
    --accent: #ffffff;       /* アクセント：純白 */
}

/* ---------------------------------------------------------
   共通要素の視認性アップ
   --------------------------------------------------------- */
/* 本文の文字色を強制的に明るく */
[data-theme="dark"] body,
[data-theme="dark"] .post-content,
[data-theme="dark"] p,
[data-theme="dark"] li {
    color: #e0e0e0;
}
[data-theme="dark"] .drawer-title,
[data-theme="dark"] .drawer-list li,
[data-theme="dark"] .drawer-list li a{
	color:#000;
}
/* リンク色：青系ではなく、白〜グレー系で統一感を持たせる */
[data-theme="dark"] a {
    color: #fff;
}
[data-theme="dark"] .post-content a {
    color: #fff;
    text-decoration-color: #888; /* 下線をグレーに */
}

/* ---------------------------------------------------------
   ヘッダー・フッター・ナビゲーション
   --------------------------------------------------------- */
[data-theme="dark"] header {
    background: rgba(18, 18, 18, 0.95);
    border-bottom-color: #333;
}
[data-theme="dark"] .logo {
    border-color: #fff;
    color: #fff;
}
[data-theme="dark"] .nav-link .en { color: #fff; }
[data-theme="dark"] .nav-link .ja { color: #bbb; }

/* フッターの文字も明るく */
[data-theme="dark"] .fat-footer,
[data-theme="dark"] .mobile-nav {
    background: #0f0f0f;
    color: #ccc;
    border-top-color: #333;
}
[data-theme="dark"] .footer-col h4 {
    color: #fff;
    border-bottom-color: #666;
}
[data-theme="dark"] .footer-links a {
    color: #ccc;
}
[data-theme="dark"] .nav-item { color: #888; }
[data-theme="dark"] .nav-item.active { color: #fff; }

/* ---------------------------------------------------------
   記事詳細（見出し・リスト・引用）
   --------------------------------------------------------- */
/* 見出し */
[data-theme="dark"] .post-content h2,
[data-theme="dark"] .post-content h4,
[data-theme="dark"] .post-content h5{
    color: #fff;
    border-bottom-color: #fff;
}
[data-theme="dark"] .post-content h3 {
    color: #fff;
    border-left-color: #fff;
}

/* リスト（箇条書き） */
[data-theme="dark"] .post-content ul:not(.toc-list):not(.yyi-rinker-links), 
[data-theme="dark"] .post-content ol:not(.toc-list):not(.yyi-rinker-links) {
    background: #1a1a1a;
    border: 1px solid #444; /* 枠線を明るく */
    border-left: 5px solid #fff;
}
[data-theme="dark"] .post-content ul:not(.toc-list):not(.yyi-rinker-links) li,
[data-theme="dark"] .post-content ol:not(.toc-list):not(.yyi-rinker-links) li {
    color: #ddd;
    border-bottom-color: #444; /* 区切り線を見えやすく */
}
[data-theme="dark"] .post-content ul:not(.toc-list):not(.yyi-rinker-links) li::before {
    background-color: #fff;
}

/* 引用 (Blockquote) */
[data-theme="dark"] .post-content blockquote {
    background: #1e1e1e;
    border-left-color: #fff;
    color: #ccc;
}

/* 目次 (TOC) */
[data-theme="dark"] .toc-container {
    background: #181818;
    border-color: #666;
    box-shadow: 4px 4px 0px #444;
}
[data-theme="dark"] .toc-title {
    color: #fff;
    border-bottom-color: #666;
}
[data-theme="dark"] .toc-list li::before {
    color: #fff;
}
[data-theme="dark"] .toc-list a {
    color: #ddd;
}

/* ---------------------------------------------------------
   カード・グリッド・プロフ
   --------------------------------------------------------- */
/* 記事一覧カード */
[data-theme="dark"] .article-card,
[data-theme="dark"] .grid-card,
[data-theme="dark"] .related-card {
    border-color: #333;
}
[data-theme="dark"] .card-content h3,
[data-theme="dark"] .card-info h3,
[data-theme="dark"] .related-card h4 {
    color: #fff;
}
[data-theme="dark"] .meta,
[data-theme="dark"] .excerpt {
    color: #aaa;
}

/* プロフィール */
[data-theme="dark"] .profile-strip {
    background: #1a1a1a;
    border-color: #444;
}
[data-theme="dark"] .profile-name,
[data-theme="dark"] .profile-role {
    color: #fff;
}
[data-theme="dark"] .profile-bio {
    color: #ccc;
}

/* プロフィールページ (Fixed Page) */
[data-theme="dark"] .stats-item,
[data-theme="dark"] .lifestyle-card,
[data-theme="dark"] .contact-box,
[data-theme="dark"] .avatar-box {
    background: #1a1a1a;
    border-color: #444;
}
[data-theme="dark"] .stats-num,
[data-theme="dark"] .lifestyle-card h4,
[data-theme="dark"] .motto-jp,
[data-theme="dark"] .contact-heading-en {
    color: #fff;
}
[data-theme="dark"] .profile-text-block p,
[data-theme="dark"] .lifestyle-card p {
    color: #ccc;
}

/* ---------------------------------------------------------
   ブログカード・Rinker
   --------------------------------------------------------- */
[data-theme="dark"] .blogcard-inner,
[data-theme="dark"] .post-content .yyi-rinker-contents,
[data-theme="dark"] .post-content .pochipp-box {
    background: #1a1a1a !important;
    border: 1px solid #444 !important;
}
[data-theme="dark"] .blogcard-title,
[data-theme="dark"] .post-content .yyi-rinker-title a {
    color: #fff !important;
}
[data-theme="dark"] .blogcard-snippet,
[data-theme="dark"] .blogcard-site {
    color: #aaa;
}

/* ---------------------------------------------------------
   画像調整（眩しさ対策）
   --------------------------------------------------------- */
[data-theme="dark"] img {
    opacity: 0.9; /* 少しだけ暗くする */
    transition: opacity 0.3s;
}
[data-theme="dark"] img:hover {
    opacity: 1;
}
/* =========================================================
   DARK MODE: BUTTONS & LINKS FIX
   ========================================================= */

/* 1. 黒背景のボタン（SEND LETTER / 送信ボタン等）を「白」に反転 */
[data-theme="dark"] .btn-black,
[data-theme="dark"] .submit-btn {
    background-color: #e0e0e0 !important; /* 真っ白すぎない白 */
    color: #111 !important; /* 文字は黒 */
    border-color: #e0e0e0 !important;
}
[data-theme="dark"] .btn-black:hover,
[data-theme="dark"] .submit-btn:hover {
    background-color: #fff !important; /* ホバーでさらに明るく */
    opacity: 0.9;
}

/* 2. 枠線のみのボタン（LOAD MORE / BACK TO HOME等）を「白枠・白文字」に */
[data-theme="dark"] .load-more-btn,
[data-theme="dark"] .back-btn {
    color: #fff !important;
    border-color: #fff !important;
}
[data-theme="dark"] .load-more-btn:hover,
[data-theme="dark"] .back-btn:hover {
    background-color: #fff !important; /* ホバー時は白背景 */
    color: #000 !important; /* 文字は黒 */
}

/* 3. ページネーション（1, 2, 3...） */
[data-theme="dark"] .pagination .page-numbers {
    background-color: #1a1a1a;
    color: #fff;
    border-color: #444;
}
[data-theme="dark"] .pagination .page-numbers.current,
[data-theme="dark"] .pagination a.page-numbers:hover {
    background-color: #fff;
    color: #000;
    border-color: #fff;
}

/* 4. テキストリンク（記事内） */
[data-theme="dark"] .post-content a {
    text-decoration: underline;
    text-decoration-color: #888; /* 下線はグレーで控えめに */
}
[data-theme="dark"] .post-content a:hover {
    color: #ccc !important;
    text-decoration-color: #fff;
}

/* 5. タグクラウド（サイドバー） */
[data-theme="dark"] .tag {
    border-color: #444;
    color: #ccc;
    background: #1a1a1a;
}
[data-theme="dark"] .tag:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
}
[data-theme="dark"] .tag-count {
    background: #333;
    color: #fff;
}
[data-theme="dark"] .tag:hover .tag-count {
    background: #000;
    color: #fff;
}
[data-theme="dark"] .profile-content a,
[data-theme="dark"] .footer-col a
[data-theme="dark"] .share-buttons a{
	color:#fff!important;
}
/* =========================================================
   READER CTA (ウェブメディア化用コンポーネント)
========================================================= */
.reader-cta-container {
    margin: 80px 0 40px;
    padding: 50px 40px;
    background: var(--light-gray);
    border: 2px solid #111;
    border-radius: 4px;
    text-align: center;
    box-shadow: 6px 6px 0px #111; /* Nagi Rhythmらしい影 */
}

.reader-cta-label {
    font-family: 'Oswald', sans-serif;
    font-size: 11px;
    letter-spacing: 0.2em;
    color: #888;
    margin-bottom: 15px;
    font-weight: 700;
}

.reader-cta-title {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.5rem !important;
    margin: 0 0 20px 0 !important;
    border: none !important; /* 既存の見出しスタイルをリセット */
    padding: 0 !important;
    font-weight: 700;
}

.reader-cta-text {
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 30px;
    color: #444;
}

.btn-cta-letter {
    display: inline-block;
    padding: 18px 40px;
    background: #111;
    color: #fff !important;
    font-family: 'Oswald', 'Noto Sans JP', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-decoration: none !important;
    transition: all 0.3s;
}

.btn-cta-letter:hover {
    background: #fff;
    color: #111 !important;
    box-shadow: inset 0 0 0 2px #111;
}

/* ---------------------------------------------------------
   DARK MODE 対応
--------------------------------------------------------- */
[data-theme="dark"] .reader-cta-container {
    background: #1a1a1a;
    border-color: #fff;
    box-shadow: 6px 6px 0px #fff;
}
[data-theme="dark"] .reader-cta-title {
    color: #fff;
}
[data-theme="dark"] .reader-cta-text {
    color: #ccc;
}
[data-theme="dark"] .btn-cta-letter {
    background: #fff;
    color: #111 !important;
}
[data-theme="dark"] .btn-cta-letter:hover {
    background: #111;
    color: #fff !important;
    box-shadow: inset 0 0 0 2px #fff;
}
[data-theme="dark"] .related-posts { 
	border-top: 2px solid #fff;
}
@media (max-width: 600px) {
    .reader-cta-container { padding: 40px 20px; margin-top: 60px; }
    .reader-cta-title { font-size: 1.25rem !important; }
}
/* =========================================================
   NAGI RHYTHM MEDIA CTA COMPONENT (v1.1 Corrected)
   Issues Fixed:
   - No right alignment on mobile (now centered/stacked)
   - Smaller margins on mobile (reduced space for ads)
   - Dark theme button inversion
========================================================= */

/* 1. Base Component (General Desktop)
   - A new, subtle full border is added to frame the content.
   ========================================================= */
.media-cta-component {
    margin: 80px 0 40px;
    background: linear-gradient(to right, rgba(230, 230, 230, 0.4), rgba(230, 230, 230, 0.8));
    border: 2px solid #111; /* Subtle full border for desktop */
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-sizing: border-box; /* Padding is inside width */
}

/* 2. Container (Heading & Paragraph)
   - Naturally left-aligned on desktop.
   ========================================================= */
.media-cta-container {
    max-width: 100%;
}

.media-cta-container h3 {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.6rem;
    margin: 0 0 15px 0;
    font-weight: 700;
    color: #111;
}

.media-cta-container p {
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 30px;
    color: #333;
}

/* 3. Buttons
   ========================================================= */
.media-cta-btns {
    display: flex;
    justify-content: flex-start; /* Stacked below text on desktop */
}

.media-cta-btns a {
    display: inline-block;
    padding: 15px 30px;
    background: #111;
    color: #fff;
    font-family: 'Oswald', 'Noto Sans JP', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-decoration: none;
    transition: background 0.3s, color 0.3s;
}

.media-cta-btns a:hover {
    background: #333;
}

/* 4. Mobile Layout (Fix: Alignment & Margins)
   - Elements are centered and stacked.
   - Smaller margins reduce the gap between the component and ads.
   ========================================================= */
@media (max-width: 600px) {
    .media-cta-component {
        /* Fix Alignment: centered and stacked naturally */
        flex-direction: column;
        align-items: center;
        text-align: center;
        
        /* Fix Margins: reduced gap for ads */
        margin: 60px 0 20px; /* Reduced from 80px 0 40px */
        padding: 40px 20px;
    }

    .media-cta-container {
        text-align: center;
    }

    .media-cta-btns {
        justify-content: center; /* Set to center */
    }
}

/* 5. Dark Theme (Fix: Button Inversion)
   ========================================================= */
[data-theme="dark"] .media-cta-component {
    background: linear-gradient(to right, rgba(17, 17, 17, 0.8), rgba(17, 17, 17, 0.9));
    border-color: #fff; /* White border */
}

[data-theme="dark"] .media-cta-container h3,
[data-theme="dark"] .media-cta-container p {
    color: #fff; /* White text for headings and paragraphs */
}

/* Fix: Button Inversion in dark theme */
[data-theme="dark"] .media-cta-btns a,
[data-theme="dark"] .reader-cta-btns a{
    background-color: #fff; /* White background */
    color: #111!important; /* Black text */
}

[data-theme="dark"] .media-cta-btns a:hover {
    background-color: #f1f1f1; /* Light gray on hover */
}
[data-theme="dark"] .post-navigation{
	border-top: 1px solid #fff;
    border-bottom: 1px solid #fff;
	color:#fff;
}
.theme-btn{
border:none;
}
/* =========================================
   Contact Form 7 ミニマルデザイン上書き
========================================= */

/* CF7が自動出力する不要なpタグの余白を無効化 */
.wpcf7-form p {
    margin: 0;
    padding: 0;
}

/* フォームグループの余白調整 */
.wpcf7-form .form-group {
    margin-bottom: 40px;
}

/* ラベルの装飾 */
.wpcf7-form label {
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #111;
    display: block;
    margin-bottom: 5px;
}

.wpcf7-form .required {
    color: #d9534f;
}

/* 入力欄のミニマル化（枠線を消して下線のみにする） */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea {
    width: 100%;
    padding: 10px 0;
    border: none;
    border-bottom: 1px solid #ccc;
    background: transparent;
    font-size: 16px;
    color: #111;
    outline: none;
    box-sizing: border-box;
    border-radius: 0; /* スマホブラウザ特有の丸みを消す */
    transition: border-color 0.3s;
}

/* フォーカス時（入力中）は下線を黒にする */
.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form textarea:focus {
    border-bottom: 1px solid #111;
}

/* テキストエリアの最低高さ */
.wpcf7-form textarea {
    min-height: 120px;
    resize: vertical; /* 縦方向のみリサイズ許可 */
}

/* 送信ボタンの装飾 */
.wpcf7-form .submit-btn {
    width: 100%;
    background: #111;
    color: #fff;
    padding: 18px 0;
    border: none;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: opacity 0.3s;
    margin-top: 10px;
    border-radius: 0;
}

.wpcf7-form .submit-btn:hover {
    opacity: 0.7;
}

/* CF7特有のローディングスピナーの位置調整 */
.wpcf7-spinner {
    display: block;
    margin: -10px auto 0;
}

.card-link-wrap {
    display: block;
    text-decoration: none;
    color: inherit;
}

.archive-desc {
    margin-top: 10px;
    font-size: 14px;
    opacity: 0.75;
}

.meta-cat {
    font-weight: 600;
}

.meta-updated {
    opacity: 0.6;
    font-size: 0.9em;
}
.sub-article {
    text-decoration: none;
    color: inherit;
}

.section-title-ja,
.widget-title-ja {
    font-size: 0.7em;
    opacity: 0.8;
    margin-left: 10px;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.meta-updated {
    opacity: 0.6;
    font-size: 0.9em;
    margin-left: 4px;
}

.profile-strip {
    margin-top: 60px;
    padding: 40px 0;
    border-top: 1px solid var(--border);
}

.profile-link {
    text-decoration: underline;
    color: #000;
    font-weight: bold;
}

.postbox-icon {
    font-size: 30px;
    display: block;
    margin-bottom: 10px;
}

.btn-black {
    display: block;
    text-decoration: none;
    padding: 12px 0;
    box-sizing: border-box;
}
