/* style.css */
/* Google Fonts import */
@import url('https://fonts.googleapis.com/css2?family=Dela+Gothic+One&family=Hina+Mincho&family=Lexend+Deca:wght@100..900&family=Noto+Sans+JP:wght@100..900&family=Sawarabi+Mincho&display=swap');

/* 基本設定 */
body {
    background: #ffffff;
    color: #000000;
    font-family: 'Sawarabi Mincho', serif;
    font-size: 18px;
    line-height: 1.8;
    margin: 0;
    padding: 0;
    text-align: left;
}

/* コンテンツエリア */
#main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 40px;
}

/* 記事タイトル */
.entry-title,
.post-title,
h1.entry-title,
h1.post-title {
    font-family: 'Ryumin ExtraBold KL', serif;
    font-size: 18px;
    text-align: left;
    margin: 60px 0 30px 0;
    line-height: 1.6;
    font-weight: normal;
    letter-spacing: 0.05em;
}


/* 記号の向き */
.vertical-title ruby,
.vertical-title span,
.vertical-title strong {
    text-orientation: upright;
}

/* 角括弧・かぎ括弧 */
.vertical-title::before,
.vertical-title::after {
    text-orientation: upright;
}

/* ここが重要：text-combine を消す */
.vertical-title {
    text-combine-upright: none;
}

/* ページタイトル */
.page-title {
    font-family: 'Hina Mincho', serif;
    font-size: 22px;
    text-align: left;
    margin: 60px 0 40px 0;
    line-height: 1.6;
    font-weight: normal;
    letter-spacing: 0.05em;
}

/* 本文 */
.entry-content,
.post-content,
.page-content {
    font-family: 'Sawarabi Mincho', serif;
    font-size: 18px;
    text-align: left;
    line-height: 2.0;
    margin: 40px 0;
    letter-spacing: 0.02em;
}

/* 段落 */
.entry-content p,
.post-content p,
.page-content p {
    margin: 40px 0;
    text-align: left;
}

/* 見出し */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6,
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    
}

.entry-content h1,
.post-content h1 {
    font-size: 24px;
}

.entry-content h2,
.post-content h2 {
    font-size: 22px;
}

.entry-content h3,
.post-content h3 {
    font-size: 20px;
}

/* YouTube 埋め込みキャプション専用 */
figure.wp-block-embed figcaption.wp-element-caption {
    font-family: "MS Gothic", "ＭＳ ゴシック", monospace !important;
    font-size: 8px !important;
    color: #000 !important;
    text-align: center !important;
    margin-top: 6px !important;
    letter-spacing: 0.05em !important;
    font-weight: bold !important;
    line-height: 1.4 !important;
}

/* リンク */
a {
    color: #000000;
    text-decoration: underline;
    transition: all 0.3s ease;
}

a:hover {
    color: #333333;
    text-decoration: none;
}

.entry-content a,
.post-content a,
.page-content a {
    text-decoration: underline;
    color: #000000;
}

.entry-content a:hover,
.post-content a:hover,
.page-content a:hover {
    color: #333333;
    text-decoration: none;
}

/* リスト */
.entry-content ul,
.entry-content ol,
.post-content ul,
.post-content ol,
.page-content ul,
.page-content ol {
    text-align: left;
    margin: 40px 0;
    padding-left: 20px;
}

.entry-content li,
.post-content li,
.page-content li {
    margin: 15px 0;
    line-height: 1.8;
}

/* ブロッククオート */
] {
    font-family: 'Hina Mincho', serif;
    font-size: 20px;
    text-align: center;
    margin: 60px 40px;
    padding: 40px;
    line-height: 1.8;
    font-style: italic;
}

/* テーブル */
.entry-content table,
.post-content table,
.page-content table {
    margin: 40px auto;
    text-align: center;
    border-collapse: collapse;
    width: 90%;
}

.entry-content th,
.entry-content td,
.post-content th,
.post-content td,
.page-content th,
.page-content td {
    padding: 20px 15px;
    border: 1px solid #ddd;
    text-align: center;
}

/* コード */
.entry-content code,
.post-content code,
.page-content code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 16px;
}

.entry-content pre,
.post-content pre,
.page-content pre {
    background: #f5f5f5;
    padding: 30px;
    margin: 40px 0;
    text-align: left;
    overflow-x: auto;
    border-radius: 5px;
}

/* 区切り線 */
hr {
    border: none;
    height: 1px;
    background: #ddd;
    margin: 60px 0;
}

/* メタ情報 */
.post-meta,
.entry-meta {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 14px;
    text-align: center;
    margin: 30px 0;
    color: #666;
    line-height: 1.6;
}

/* ナビゲーション */
.post-navigation,
.posts-navigation {
    margin: 60px 0;
    text-align: center;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    max-width: 400px;
    margin: 0 auto;
}

.nav-previous,
.nav-next {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 16px;
}

/* ウィジェット */
.widget {
    margin: 60px 0;
    text-align: center;
}

.widget-title {
    font-family: 'Hina Mincho', serif;
    font-size: 20px;
    margin: 0 0 30px 0;
    text-align: center;
}

/* コメント */
.comments-area {
    margin: 60px 0;
    text-align: center;
}

.comment-list {
    text-align: left;
    margin: 40px 0;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    #main-content {
        padding: 40px 20px;
    }
    
    .entry-title,
    .post-title,
    h1.entry-title,
    h1.post-title,
    .page-title {
        font-size: 20px;
        margin: 40px 0 25px 0;
    }
    
    .entry-content,
    .post-content,
    .page-content {
        font-size: 16px;
        margin: 30px 0;
    }
    
    .entry-content p,
    .post-content p,
    .page-content p {
        margin: 30px 0;
    }
    
    .entry-content h1,
    .post-content h1 {
        font-size: 22px;
    }
    
    .entry-content h2,
    .post-content h2 {
        font-size: 20px;
    }
    
    .entry-content h3,
    .post-content h3 {
        font-size: 18px;
    }
    
    
    .entry-content ul,
    .entry-content ol,
    .post-content ul,
    .post-content ol,
    .page-content ul,
    .page-content ol {
        margin: 30px 0;
        padding-left: 15px;
    }
    
    hr {
        margin: 40px 0;
    }
}

@media (max-width: 480px) {
    #main-content {
        padding: 30px 15px;
    }
    
    .entry-title,
    .post-title,
    h1.entry-title,
    h1.post-title,
    .page-title {
        font-size: 18px;
        margin: 30px 0 20px 0;
    }
    
    .entry-content,
    .post-content,
    .page-content {
        font-size: 15px;
        margin: 25px 0;
    }
    
    .entry-content p,
    .post-content p,
    .page-content p {
        margin: 25px 0;
    }
    
    blockquote {
        font-size: 16px;
        margin: 30px 15px;
        padding: 20px 15px;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 20px;
    }
}

/* カスタムクラス */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.margin-large {
    margin: 60px 0;
}

.margin-medium {
    margin: 40px 0;
}

.margin-small {
    margin: 20px 0;
}

.tag-cloud-container a:hover {
    color: #555 !important;
    transform: translateY(-1px) !important;
}

/* タグごとのスタイルをリセット */
.tag-cloud-container a {
    border: 1px solid #333 !important;
    border-radius: 2px !important;
    background: white !important;
    padding: 3px 5px !important;
    font-size: 9px !important;
    line-height: 1.1 !important;
}
/* タグクラウドのスタイル */
.tag-cloud-container a {
    font-family: 'CustomFont', monospace !important;
    text-decoration: none !important;
    color: #000 !important;
    margin: 2px !important;
    display: inline-block !important;
    transition: all 0.2s ease !important;
}

/* タグクラウドコンテナのスクロールバー */
.tag-cloud-container::-webkit-scrollbar {
    width: 4px;
}

.tag-cloud-container::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 2px;
}

.tag-cloud-container::-webkit-scrollbar-thumb {
    background: #aaa;
    border-radius: 2px;
}

/* タグの間隔を調整 */
.menu-tag-cloud .tag-cloud-container a {
    margin: 2px !important;
    word-break: keep-all;
    white-space: nowrap;
}


/* カテゴリーヘッダーのレスポンシブ調整 */
@media (max-width: 768px) {
    .category-title {
        font-size: 2.5rem !important;
        padding: 0 15px !important;
    }
    
    .category-header > div > div:first-child,
    .category-header > div > div:last-child {
        font-size: 1.8rem !important;
    }
    
    .category-header > div > div:first-child {
        left: -20px !important;
    }
    
    .category-header > div > div:last-child {
        right: -20px !important;
    }
}

@media (max-width: 480px) {
    .category-title {
        font-size: 2rem !important;
        letter-spacing: 0.05em !important;
    }
    
    .category-header > div > div:first-child,
    .category-header > div > div:last-child {
        font-size: 1.5rem !important;
    }
    
    .category-header > div > div:first-child {
        left: -15px !important;
    }
    
    .category-header > div > div:last-child {
        right: -15px !important;
    }
    
    .category-description {
        font-size: 1rem !important;
        padding-top: 20px !important;
    }
}

/* アニメーション効果 */
@keyframes fadeInBrackets {
    0% {
        opacity: 0;
        transform: translateY(-50%) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
}

.category-header > div > div:first-child,
.category-header > div > div:last-child {
    animation: fadeInBrackets 0.8s ease-out forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

.category-header > div > div:first-child {
    animation-delay: 0.2s;
}

.category-header > div > div:last-child {
    animation-delay: 0.4s;
}

/* ランダム画像セクション全体 */
.random-image-section {
    margin: 80px 0;
    padding: 60px 20px;
    background: #f9f9f9;
    border-top: 2px solid black;
    border-bottom: 2px solid black;
    display: flex;
    justify-content: center;
}

/* ZINE 風の手描きフレーム */
.random-image-frame {
    position: relative;
    display: inline-block;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    transform: rotate(-2deg);
}

/* 手描きフレーム表現：黒のラフ線を CSS だけで作る */
.random-image-frame::before,
.random-image-frame::after {
    content: "";
    position: absolute;
    inset: -12px;
    border: 3px solid black;
    border-radius: 12px;
    pointer-events: none;
    mix-blend-mode: multiply;
}

/* ゆがみ & ラフさを出す（ちょっとズレる） */
.random-image-frame::after {
    inset: -8px;
    border-color: #000;
    transform: rotate(1.5deg);
    opacity: 0.7;
}

/* 画像本体 */
.random-image-frame img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

/* ブックイントロダクション */
.book-header {
  display: flex;
  gap: 3rem;
  max-width: 1100px;
  margin: 60px auto;
  padding: 0 20px;
}

.book-meta {
  flex: 2;
}

.book-cover {
  flex: 1;
  max-width: 300px;
}

.meta-row {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 0.8rem 0;
}

.meta-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.book-title {
  font-family: "Hina Mincho", serif;
  font-size: 2rem;
  margin-bottom: .6rem;
}

.book-subtitle {
  font-size: 1.3rem;
  opacity: 0.8;
  margin-bottom: 1rem;
}

.book-lead {
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 90%;
}

.book-body {
  font-family: "Sawarabi Mincho", serif;
  font-size: 18px;
  line-height: 2.0;
}

