/*
Theme Name: Nagi Rhythm v2
Description: Astro-inspired high performance minimalist theme.
Author: Nagi
Version: 1.2.0
*/

/* =========================================================
   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.2rem; margin: 8px 0 10px; line-height: 1.4; 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; }


/* =========================================================
   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-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-type: decimal; padding-left: 20px; margin: 0; }
.toc-list li { margin-bottom: 12px; line-height: 1.6; color: #888; font-weight: 600; }
.toc-list a { color: #222; font-size: 0.95rem; transition: color 0.3s, transform 0.3s; display: inline-block; }
.toc-list a:hover { color: var(--update-red); transform: translateX(5px); }

/* 本文デザイン */
.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 img { max-width: 100%; height: auto; display: block; margin: 40px auto; border-radius: 4px; }
.post-content a { color: var(--update-red); text-decoration: underline; font-weight: 500; }
.post-content a:hover { opacity: 0.7; }
.post-content iframe { width: 100%; max-width: 100%; aspect-ratio: 16 / 9; height: auto; border: none; border-radius: 4px; margin: 2.5em 0; display: block; }
.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; }

/* Cocoon移管用：引用デザイン補正 */
.post-content blockquote { 
    background: var(--light-gray); 
    border-left: 4px solid #111; 
    padding: 20px; 
    margin: 40px 0; 
    color: #555; 
    font-style: italic; 
}

/* Cocoon移管用：リストデザイン補正 */
.post-content ul, 
.post-content ol { 
    padding-left: 1.5em; 
    margin: 2em 0; 
}
.post-content li { 
    position: relative; 
    margin-bottom: 0.8em; 
    line-height: 1.8; 
    font-weight: 500; 
}
.post-content ul li::before { 
    content: ''; 
    position: absolute; 
    left: -1em; 
    top: 0.7em; 
    width: 6px; 
    height: 6px; 
    background-color: #000; 
    border-radius: 50%; 
}

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

/* =========================================================
   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;
}

/* ★斬新なポイント：1列目（項目名）を「インデックス」として強調 */
.post-content td:first-child {
    background: #f9f9f9; /* 1列目だけ薄いグレーを敷く */
    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: 80px; 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 { color: #111; 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);
}

/* 2. ページネーション（数字）のスタイリッシュ化 */
/* WordPressが出力する ul.page-numbers 構造に対応 */
.pagination {
    margin-top: 80px;
    padding-top: 0;
    border: none;
    display: flex;
    justify-content: center;
}

.pagination ul {
    display: flex;
    gap: 8px; /* 間隔を少し詰めてソリッドに */
    padding: 0;
    margin: 0;
    list-style: none;
    align-items: center;
}

/* 数字・矢印の共通スタイル */
.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;
}

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

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

/* 省略リーダー（...） */
.page-numbers.dots {
    border: none;
    background: transparent;
    min-width: auto;
}

/* PREV / NEXT の文字スタイル */
.page-numbers.prev, 
.page-numbers.next {
    font-weight: 700;
    padding: 0 15px;
    letter-spacing: 0.05em;
}

@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 ul { gap: 5px; flex-wrap: wrap; justify-content: center; }
    .page-numbers { min-width: 36px; height: 36px; font-size: 12px; }
}


/* =========================================================
   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 !important; 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; }
.post-content .yyi-rinker-title a { color: #111 !important; text-decoration: none !important; }

/* ボタン類をミニマルに */
.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; }
.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;
}

.post-content .amazon-link a { background: #111 !important; } /* Nagi Rhythmらしく黒へ */
.post-content .rakuten-link a { background: #bf0000 !important; }
.post-content .yahoo-link a { background: #f03 !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; /* ヒーローに少し重ねる */
    padding-bottom: 80px;
}
.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; }
.lifestyle-card h4 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    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; }
}