@charset "UTF-8";

/* Google Fonts の読み込み */
@import url('https://fonts.googleapis.com/css2?family=Yusei+Magic&family=Caveat:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');
@import url('https://fonts.googleapis.com/css2?family=Epilogue:wght@400;600;700;800;900&family=Be+Vietnam+Pro:wght@400;500;700&display=swap');

/*!
Theme Name: Cocoon Child
Theme URI: https://wp-cocoon.com/
Template:   cocoon-master
Author: わいひら
Version:    1.1.3
*/

/************************************
** デザイン・システム変数（Stitch設計）
************************************/
:root {
  /* Fonts */
  --main-font: 'Yusei Magic', sans-serif;
  --handwriting-font: 'Yusei Magic', cursive;
  --caption-font: 'Caveat', cursive;
  /* 欧文用手書きフォント */
  --headline-font: 'Epilogue', sans-serif;
  --body-font: 'Be Vietnam Pro', sans-serif;

  /* Colors - Stitch "The Margins on the Back of a Flyer" */
  --desk-bg: #dbdad5;
  /* デスク（机）：Surface Dim */
  --paper-bg: #faf9f4;
  /* 紙の地色：Surface / Background */
  --paper-white: #ffffff;
  /* 真っさらな紙：Surface Container Lowest */
  --ink-graphite: #444444;
  /* 鉛筆の芯：Primary */
  --marker-yellow: #FDF3A7;
  /* 蛍光ペン：Secondary / Highlighter */
  --ink-red: #D32F2F;
  /* 赤ペン：Tertiary / Red Ink */
  --pencil-line: #c4c7c7;
  /* 補助線：Outline Variant */

  /* Layout - ゆらぎの設定 */
  --jitter-angle: 1.2deg;
  --content-max-width: 800px;
}

/************************************
** 子テーマ用のスタイルを書く
************************************/
html {
  background-color: var(--paper-bg);
  /* 画面全体を紙にする */
}

body {
  background-color: transparent;
  color: var(--ink-graphite);
  font-family: var(--main-font);
  line-height: 1.8;
  font-feature-settings: "palt";
  position: relative;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

#container {
  background-color: var(--paper-bg);
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  /* 微かな方眼 */
  background-size: 40px 40px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  box-shadow: none;
  /* 全画面なので影は不要 */
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/*
 * チラシの「裏抜け」演出。
 * コンテンツ部（#content）の疑似要素として配置することで、
 * ヘッダーには影響せず、コンテンツ背景のみに裏抜け感を出す。
 * ::before は左上・::after は右下に大きな鏡文字テキストを配置。
 */
#content::before {
  content: "SALE\A 30%\A OFF";
  white-space: pre;
  position: absolute;
  top: 3%;
  left: -2%;
  z-index: 0;
  opacity: 0.04;
  font-size: 9rem;
  font-weight: 900;
  line-height: 0.85;
  color: var(--ink-graphite);
  transform: rotate(-10deg) scaleX(-1);
  /* 鏡文字 */
  pointer-events: none;
  filter: blur(1px);
  font-family: 'Arial Black', sans-serif;
}

#content::after {
  content: "SPECIAL\A LIMITED\A OFFER";
  white-space: pre;
  position: absolute;
  bottom: 5%;
  right: -1%;
  z-index: 0;
  opacity: 0.04;
  font-size: 7rem;
  font-weight: 900;
  line-height: 0.9;
  color: var(--ink-graphite);
  transform: rotate(8deg) scaleX(-1);
  pointer-events: none;
  filter: blur(1px);
  font-family: 'Arial Black', sans-serif;
}

/* コンテンツが裏抜けテキストの上にくるようにz-indexを調整 */
#header,
#footer {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

#content {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
}

/* #main の中身がz-indexで裏抜けより前に出るよう設定 */
#main,
.sidebar {
  position: relative;
  z-index: 2;
}

/* 見出しのスタイル */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--main-font);
  color: var(--ink-graphite);
  position: relative;
}

/************************************
** ヘッダー装飾
************************************/
/* ロゴ部分の個別枠を消し、全体の横断線のみにする */
#header {
  border: none !important;
  box-shadow: none !important;
  /* clip-pathを適用した子要素の影を表示させるため、ここでドロップシャドウを設定 */
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12));
}

/*
 * ヘッダーの背景はデスク色（薄いグレー）でコンテンツ部と明確に区別。
 * 下端は「紙のちぎり目」を表現するため clip-path を使用。
 * 直線的な border ではなく、不規則な波線にすることでアナログ感を演出。
 */
.header-container {
  background: var(--desk-bg) !important;
  padding: 0.5em 0 1.5em !important;
  /* 上下余白を縮小してコンパクトに */
  margin-bottom: 0 !important;
  /* 
   * 不規則なちぎり目（波線）のクリップパス。
   * 下端を上下に細かく変動させることで、手でちぎったような波打ちを表現。
   */
  clip-path: polygon(0% 0%, 100% 0%, 100% 88%,
      98% 92%, 96% 87%, 94% 91%, 91% 86%, 88% 92%, 85% 87%, 82% 91%, 79% 86%, 76% 92%, 73% 87%, 70% 91%, 67% 86%,
      64% 92%, 61% 87%, 58% 91%, 55% 86%, 52% 92%, 49% 87%, 46% 91%, 43% 86%, 40% 92%, 37% 87%, 34% 91%, 31% 86%,
      28% 92%, 25% 87%, 22% 91%, 19% 86%, 16% 92%, 13% 87%, 10% 91%, 7% 86%, 4% 92%, 2% 87%, 0% 91%);
  border-bottom: none !important;
}

/*
 * コンテンツエリアは紙の白（#faf9f4）。
 * ヘッダーのグレーからコンテンツの白への明確な色変化で境目を表現。
 */
#content {
  background-color: transparent !important;
  padding-top: 4em;
  padding-bottom: 6em;
}

.header-in,
.navi-in,
.footer-in,
.content-in {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 40px !important;
  box-sizing: border-box;
}

.header-in {
  border: none !important;
  box-shadow: none !important;
}


.site-name-text a {
  font-size: 1.8rem !important;
  font-weight: 700;
  text-decoration: none !important;
  /* タイトルの下線を消去 */
  color: var(--ink-graphite) !important;
  border: none !important;
}


/* ヘッダーメニュー（ナビゲーション）の装飾 */
.navi-in a {
  font-family: var(--main-font) !important;
  color: var(--ink-graphite) !important;
  font-size: 1.1rem;
  text-decoration: none;
  padding: 0.5em 1em;
  transition: all 0.2s ease;
}

.navi-in a:hover {
  background-color: var(--marker-yellow) !important;
  border-radius: 5px;
}

/* Cocoon標準のメニュー背景などをリセット */
#navi,
.menu-header {
  background: transparent !important;
  border: none !important;
}


/************************************
** フッター装飾（sample/top.html 再現）
************************************/
#footer {
  background-color: transparent !important;
  color: #999 !important;
  padding: 4em 20px !important;
  margin-top: 5em !important;
  border-top: 1px solid #eee !important;
  text-align: center;
  font-family: var(--caption-font), var(--main-font) !important;
  font-style: italic;
  font-size: 0.8rem;
  width: 100% !important;
  clip-path: none !important;
}

#footer .footer-in {
  display: flex;
  flex-direction: row;
  /* 横並び */
  flex-wrap: wrap;
  /* モバイルでは折り返し */
  align-items: center;
  justify-content: center;
  max-width: 800px !important;
  margin: 0 auto !important;
  gap: 2em;
  /* ロゴとコピーライトの間隔 */
  float: none !important;
}

/* コピーライトとブログ名の個別調整：重なりを物理的に排除 */
.footer-bottom,
.copyright,
.source-org,
#footer .footer-in div,
#footer .footer-in span {
  position: static !important;
  /* 絶対配置を解除 */
  display: inline-block !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  text-align: center !important;
  white-space: nowrap;
  transform: none !important;
  /* 回転なども一旦リセット */
}

@media screen and (max-width: 480px) {
  #footer .footer-in {
    flex-direction: column;
    gap: 0.5em;
  }
}

#footer a {
  color: #999 !important;
  text-decoration: underline !important;
  text-decoration-style: wavy !important;
  text-decoration-color: #ddd !important;
  transition: all 0.3s ease;
}

#footer a:hover {
  color: var(--ink-red) !important;
  text-decoration-color: var(--ink-red) !important;
}

.footer-bottom {
  font-weight: 700;
  margin-bottom: 0.5em;
}

/************************************
** レイアウト：1カラム化（サイドバー非表示）
************************************/
#sidebar {
  display: none !important;
}

#main {
  width: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
  background-color: transparent !important;
  /* 背景を透明にして下の紙色と裏抜けを見せる */
  border: none !important;
}

/* 記事一覧を2列グリッドにする */
.list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 48px 64px;
  /* デザインサンプルに合わせて間隔を拡大 */
  align-items: start;
}

@media screen and (max-width: 800px) {
  .list {
    grid-template-columns: 1fr;
    /* スマホでは1列 */
  }
}

/************************************
** サイドバー・ウィジェット（将来用：現在は非表示）
************************************/
.sidebar .widget {
  background-color: var(--paper-white);
  border: 1px solid var(--pencil-line);
  padding: 1.5em;
  margin-bottom: 2em;
  box-shadow: 3px 3px 0 var(--pencil-line);
  transform: rotate(0.5deg);
}

.sidebar .widget:nth-child(even) {
  transform: rotate(-0.5deg);
  background-color: var(--marker-yellow);
  /* 偶数は付箋風（イエロー） */
  border-color: #fde68a;
  opacity: 0.9;
}

.widget-title {
  font-size: 1.2rem;
  border-bottom: 1px dashed var(--ink-graphite);
  margin-bottom: 1em;
  padding-bottom: 0.5em;
}

/************************************
** 記事一覧カード（Stitch設計再現）
************************************/
/*
 * カードは「紙の束から1枚取り出した」ような表現。
 * clip-pathによるちぎり目は廃止し、box-shadowで「紙が浮いている」効果に変更。
 * 微妙な回転（ゆらぎ）でアナログ感を演出。
 * overflow: hidden でサムネイル画像がカード内に収まるよう設定。
 */
.entry-card-wrap {
  margin-bottom: 2em;
}


.entry-card {
  border: 2px solid var(--ink-graphite) !important;
  background-color: var(--paper-white) !important;
  /* sample/top.html の hand-drawn-border 再現：不均一な角丸 */
  border-radius: 255px 15px 225px 15px/15px 225px 15px 255px !important;
  clip-path: none !important;
  /* ちぎり線を廃止 */

  box-shadow: 4px 4px 15px rgba(0, 0, 0, 0.08) !important;
  transform: rotate(-1.2deg);
  transition: all 0.3s ease;
  position: relative;
  overflow: visible !important;
  /* 装飾（ピン等）をはみ出させるため */
}

/* カードの背景バリエーション（sample/top.html の再現） */
.entry-card-wrap:nth-child(2n) .entry-card {
  background-color: #efeee9 !important;
  /* surface-container */
  transform: rotate(1.5deg);
  box-shadow: 6px 6px 20px rgba(0, 0, 0, 0.06) !important;
}

.entry-card-wrap:nth-child(3n) .entry-card {
  background-color: #f5f4ef !important;
  /* surface-container-low */
  transform: rotate(-0.8deg);
  box-shadow: 5px 5px 18px rgba(0, 0, 0, 0.07) !important;
}

.entry-card-wrap:nth-child(4n) .entry-card {
  background-color: #f1f1f1 !important;
  /* stone-100 相当 */
  transform: rotate(0.9deg);
}

/* ホバー時：少し浮き上がり、回転を戻す */
.entry-card-wrap:hover .entry-card {
  transform: rotate(0deg) scale(1.02);
  box-shadow: 8px 12px 25px rgba(0, 0, 0, 0.12) !important;
  z-index: 10;
}

/* 装飾：特定のカードにピンやアイコンを追加（現在は非表示）
.entry-card-wrap:nth-child(2n) .entry-card::before {
  content: "push_pin";
  font-family: 'Material Symbols Outlined';
  position: absolute;
  top: -10px;
  right: 10px;
  font-size: 1.2rem;
  color: var(--pencil-line);
  background: rgba(255,255,255,0.5);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transform: rotate(15deg);
}

.entry-card-wrap:nth-child(3n) .entry-card::after {
  content: "edit_note";
  font-family: 'Material Symbols Outlined';
  position: absolute;
  top: 15px;
  left: 15px;
  font-size: 1rem;
  color: var(--pencil-line);
  z-index: 2;
}
*/

/*
 * カードのサムネイル画像部分：
 * Stitchデザインでは右カードに写真あり・左カードに写真なし（テキストのみ）の
 * 2パターンが混在。画像がある場合は上部を全幅で表示する。
 */
.entry-card-thumb {
  overflow: visible !important;
  /* カテゴリーラベルをはみ出して表示させるため */
  margin: 0 !important;
  max-height: 200px;
}

.entry-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.entry-card-wrap:hover .entry-card-thumb img {
  transform: scale(1.04);
}

/* 
 * NoImageエリアの非表示化：
 * エリア自体を消すと中のカテゴリーラベルも消えるため、画像のみを隠す
 */
.no-image img,
.entry-card-thumb img[src*="no-image"],
.entry-card-thumb img[src*="noimage"] {
  display: none !important;
}

/* 画像がない場合でも thumb エリアは維持（ラベル表示のため）し、画像のみ消去 */
.entry-card:not(:has(img)) .entry-card-thumb img,
.entry-card:has(.no-image) .entry-card-thumb img {
  display: none !important;
}

.entry-card:not(:has(img)) .entry-card-content,
.entry-card:has(.no-image) .entry-card-content {
  margin-left: 0 !important;
  width: 100% !important;
  padding-top: 2.5em !important;
  /* ラベル用のスペースを確保 */
}

.entry-card:not(:has(img)),
.entry-card:has(.no-image) {
  display: block !important;
}

/*
 * カードのテキスト部分：
 * ヘッダー部（タグ・日付）、タイトル、抜粋文の余白調整
 */
/*
 * カードのテキスト部分：
 * ヘッダー部（タグ・日付）、タイトル、抜粋文の余白調整
 */
.entry-card-content {
  padding: 1.5em !important;
  /* 下部余白を標準サイズに調整 */
}

/* 記事タイトル */
.entry-card-title {
  font-size: 1.3rem !important;
  /* 少し大きく */
  font-family: var(--main-font) !important;
  color: var(--ink-graphite) !important;
  line-height: 1.4 !important;
  margin-bottom: 0.8em !important;
  font-weight: 700;
}

/* 抜粋テキスト */
.entry-card-excerpt p,
.entry-excerpt {
  font-size: 0.85rem !important;
  color: #666 !important;
  line-height: 1.7 !important;
}

/* カテゴリータグ：蛍光ペンで塗ったような表現（付箋風） */
.cat-label,
.entry-card-category,
.cat-link {
  position: absolute !important;
  top: 12px !important;
  left: 12px !important;
  z-index: 30 !important;
  /* 他の要素より確実に手前に */
  background-color: var(--marker-yellow) !important;
  border: none !important;
  border-radius: 2px !important;
  font-size: 0.75rem !important;
  padding: 3px 10px !important;
  font-family: var(--main-font) !important;
  font-weight: 700;
  transform: rotate(-2deg);
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* ラベル内の文字色を強制指定 */
.cat-label,
.cat-label a,
.entry-card-category,
.entry-card-category a,
.cat-link,
.cat-link a {
  color: var(--ink-graphite) !important;
  text-decoration: none !important;
}

/* ホバー時に少し揺れる演出 */
.entry-card-wrap:hover .cat-label {
  transform: rotate(0deg) scale(1.1);
  transition: all 0.3s ease;
}

/* 続きを読む：破線の下線スタイル（sample/top.html 再現） */
.entry-card-read-more {
  display: flex;
  justify-content: flex-end;
  margin-top: 1em;
}

.entry-card-read-more a {
  font-family: var(--caption-font) !important;
  font-size: 1.1rem !important;
  color: var(--ink-graphite) !important;
  text-decoration: none !important;
  border-bottom: 2px dashed var(--pencil-line) !important;
  transition: all 0.2s ease;
}

.entry-card-read-more a:hover {
  color: var(--ink-red) !important;
  border-bottom-color: var(--ink-red) !important;
}


/************************************
** ボタン・共通パーツ
************************************/
/* 手書きで丸を囲ったようなボタン */
.btn,
.wp-block-button__link {
  background-color: transparent !important;
  color: var(--ink-graphite) !important;
  border: 2px solid var(--ink-graphite) !important;
  border-radius: 255px 15px 225px 15px/15px 225px 15px 255px !important;
  /* 不均一な角丸 */
  padding: 0.5em 2em !important;
  font-family: var(--main-font) !important;
  transition: all 0.2s ease;
}

.btn:hover,
.wp-block-button__link:hover {
  background-color: var(--marker-yellow) !important;
  transform: scale(1.05) rotate(-1deg);
}

/* 検索フォームなどの入力欄 */
input[type="text"],
input[type="search"],
textarea {
  border: none !important;
  border-bottom: 2px solid var(--pencil-line) !important;
  background-color: transparent !important;
  border-radius: 0 !important;
}

input[type="text"]:focus,
input[type="search"]:focus,
textarea:focus {
  border-bottom-color: var(--ink-graphite) !important;
  outline: none;
}

/************************************
** レスポンシブデザイン
************************************/
@media screen and (max-width: 1023px) {
  .entry-card-wrap {
    transform: none !important;
    /* モバイルでは回転を無効化して読みやすく */
  }
}

/************************************
** 投稿詳細・固定ページ（Single & Page）
************************************/

/* 記事全体のコンテナ：紙の質感とゆらぎ */
.single #main article.article,
.page #main article.article {
  background-color: transparent !important;
  /* 背景は疑似要素で描画 */
  padding: 4rem 3.5rem !important;
  margin-top: 1rem !important;
  margin-bottom: 4rem !important;
  position: relative;
  transform: rotate(-0.5deg);
  border: none !important;
  transition: transform 0.3s ease;
  overflow: visible !important;
  /* ちぎり目の形に合わせて影をつけるため drop-shadow を使用 */
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.08));
}

/* 記事の背景（ちぎり目・紙の色） */
.single #main article.article::before,
.page #main article.article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--paper-white);
  z-index: -1;
  /* sample/detail.html の torn-top 再現 */
  clip-path: polygon(0% 2%, 5% 1%, 10% 3%, 15% 0%, 20% 2%, 25% 0%, 30% 2%, 35% 1%, 40% 3%, 45% 0%, 50% 2%, 55% 0%, 60% 2%, 65% 1%, 70% 3%, 75% 0%, 80% 2%, 85% 0%, 90% 2%, 95% 1%, 100% 2%, 100% 100%, 0% 100%);
}

/* スマホ表示の調整 */
@media screen and (max-width: 800px) {
  .single #main article.article,
  .page #main article.article {
    padding: 3rem 1.5rem 2rem !important;
    transform: none !important;
    clip-path: none !important;
    margin-top: 0 !important;
    border-top: 1px solid #eee !important;
  }
}

/* 記事ヘッダー：タイトルと日付 */
.single .article-header,
.page .article-header {
  margin-bottom: 2.5rem !important;
  position: relative;
}

.single .entry-title,
.page .entry-title {
  font-family: var(--headline-font) !important;
  font-size: 2.8rem !important;
  font-weight: 800 !important;
  color: var(--ink-graphite) !important;
  line-height: 1.15 !important;
  margin: 1.5rem 0 1rem !important;
  border: none !important;
  padding: 0 !important;
  letter-spacing: -0.02em;
}

.single .post-date,
.single .post-update,
.page .post-date,
.page .post-update {
  font-family: var(--caption-font) !important;
  font-size: 1.4rem !important;
  color: var(--ink-red) !important;
  font-style: italic;
  display: inline-block;
  margin-right: 1em;
}

/* 鉛筆風の仕切り線（タイトルの下） */
.single .article-header::after,
.page .article-header::after {
  content: "";
  display: block;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(46, 46, 46, 0.2) 20%, rgba(46, 46, 46, 0.2) 80%, transparent);
  margin-top: 2.5rem;
}

/* 記事本文：読みやすさを重視したフォントと行間 */
.single .entry-content,
.page .entry-content {
  font-family: var(--body-font) !important;
  font-size: 1.15rem !important;
  line-height: 1.9 !important;
  color: #333 !important;
}

.single .entry-content p,
.page .entry-content p {
  margin-bottom: 1.8rem !important;
}

/* 引用：手書き風で強調 */
.single .entry-content blockquote,
.page .entry-content blockquote {
  border-left: 5px solid #fef3c7 !important;
  /* yellow-200 */
  padding: 1rem 0 1rem 2rem !important;
  margin: 3rem 0 !important;
  font-family: var(--caption-font) !important;
  font-size: 1.8rem !important;
  font-style: italic;
  color: #4b5563 !important;
  /* stone-600相当 */
  transform: rotate(0.8deg);
  background: transparent !important;
}

/* カテゴリラベル：付箋風の配置調整 */
.single .entry-categories,
.page .entry-categories {
  position: absolute;
  top: 15px;
  left: -10px;
  z-index: 10;
}

.single .cat-link,
.page .cat-link {
  /* .cat-link は既に共通スタイルで付箋風になっているため、位置のみ微調整 */
  position: relative !important;
  top: 0 !important;
  left: 0 !important;
  font-size: 0.9rem !important;
  padding: 6px 16px !important;
  box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.12) !important;
  display: inline-block !important;
}

/* 記事末尾の余白 */
.single footer.article-footer,
.page footer.article-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px dashed #e5e7eb;
}
/************************************
** アーカイブページ（一覧ページ）
************************************/
.archive-title {
  font-family: var(--main-font);
  font-size: 1.5rem;
  color: var(--ink-graphite);
  margin-bottom: 2rem;
  padding: 0.2em 0.8em;
  display: inline-block;
  background: var(--marker-yellow);
  transform: rotate(-1.2deg);
  box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.05);
  border-radius: 2px;
}

.archive-title .archive-label {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-right: 0.5em;
}


/************************************
** アーカイブページ専用スタイル (Archive Page Customization)
************************************/

/* 2カラムレイアウト (Flexbox) */
.archive-flex-layout {
  display: flex;
  flex-direction: row;
  gap: 4rem;
  align-items: flex-start;
  margin-top: 2rem;
}

.archive-main-content {
  flex: 1;
  min-width: 0;
}

.archive-sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 100px;
}

@media screen and (max-width: 1023px) {
  .archive-flex-layout {
    flex-direction: column;
    gap: 3rem;
  }
  .archive-sidebar {
    width: 100%;
    position: static;
  }
}

/* 月別セクション */
.archive-month-section {
  margin-bottom: 6rem;
  position: relative;
}

.archive-month-section:not(:first-of-type)::before {
  content: "";
  position: absolute;
  top: -3rem;
  left: 0;
  width: 100%;
  height: 2px;
  background-image: linear-gradient(to right, var(--pencil-line) 33%, rgba(255, 255, 255, 0) 0%);
  background-position: bottom;
  background-size: 10px 1px;
  background-repeat: repeat-x;
}

.archive-month-header {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.archive-month-title {
  font-family: var(--headline-font) !important;
  font-size: 2.8rem !important;
  font-weight: 800 !important;
  color: var(--ink-graphite);
  margin: 0 !important;
  transform: rotate(-1deg);
  display: inline-block;
}

.archive-month-count {
  font-family: var(--caption-font);
  font-size: 1.2rem;
  color: #999;
  font-style: italic;
}

/* 落書き風の下線 (SVG) */
.scribble-underline {
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='6' viewBox='0 0 100 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4.5C15.5 1.5 35 1.5 50 3C65 4.5 85.5 5 99 2' stroke='%23444' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: bottom;
  background-size: 100% 8px;
  padding-bottom: 8px;
}

/* アーカイブグリッド */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 3rem;
  align-items: start;
}

@media screen and (max-width: 600px) {
  .archive-grid {
    grid-template-columns: 1fr;
  }
}

/* 記事カード (Archive Card) */
.archive-card {
  position: relative;
  transition: all 0.3s ease;
}

.archive-card-inner {
  background-color: var(--paper-white);
  border: 2px solid var(--ink-graphite);
  padding: 2rem;
  box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.05);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* カードごとのランダムなゆらぎ */
.archive-card:nth-child(3n+1) .archive-card-inner { transform: rotate(1.2deg); }
.archive-card:nth-child(3n+2) .archive-card-inner { transform: rotate(-0.8deg); background-color: #fcfcf9; }
.archive-card:nth-child(3n+3) .archive-card-inner { transform: rotate(0.5deg); background-color: #f9f9f5; }

.archive-card:hover .archive-card-inner {
  transform: rotate(0deg) translateY(-5px);
  box-shadow: 12px 12px 0px rgba(0, 0, 0, 0.08);
  z-index: 10;
}

/* マスキングテープ (Washi Tape) */
.washi-tape {
  display: inline-block;
  padding: 4px 15px;
  font-family: var(--caption-font) !important;
  font-size: 11px;
  font-weight: 700;
  color: #fff !important;
  text-decoration: none !important;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
  mix-blend-mode: multiply;
  clip-path: polygon(2% 10%, 0% 0%, 2% 20%, 0% 30%, 2% 40%, 0% 50%, 2% 60%, 0% 70%, 2% 80%, 0% 90%, 2% 100%, 98% 100%, 100% 90%, 98% 80%, 100% 70%, 98% 60%, 100% 50%, 98% 40%, 100% 30%, 98% 20%, 100% 10%, 98% 0%, 2% 0%);
  transition: transform 0.2s ease;
  z-index: 5;
}

.bg-red { background-color: rgba(244, 63, 94, 0.8); transform: rotate(-2deg); }
.bg-blue { background-color: rgba(14, 165, 233, 0.8); transform: rotate(1.5deg); }
.bg-green { background-color: rgba(132, 204, 22, 0.8); transform: rotate(2deg); }
.bg-yellow { background-color: rgba(234, 179, 8, 0.8); transform: rotate(-1deg); }
.bg-purple { background-color: rgba(139, 92, 246, 0.8); transform: rotate(-3deg); }

.archive-card-tags {
  position: absolute;
  top: -15px;
  right: 15px;
  display: flex;
  gap: 5px;
  z-index: 20;
}

.archive-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.archive-card-date {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.8rem;
  color: #999;
}

.archive-card-cat {
  background-color: var(--marker-yellow);
  color: var(--ink-graphite);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  text-transform: uppercase;
  transform: rotate(-2deg);
}

.archive-card-title {
  margin: 0 0 1.2rem 0 !important;
  line-height: 1.3 !important;
}

.archive-card-title a {
  font-family: var(--headline-font) !important;
  font-size: 1.4rem !important;
  font-weight: 700 !important;
  color: var(--ink-graphite);
  text-decoration: none;
}

.archive-card-title a:hover {
  color: var(--ink-red);
}

.archive-card-thumb {
  margin: 0 0 1.5rem 0;
  overflow: hidden;
  filter: grayscale(0.5) contrast(1.1);
  border: 1px solid var(--pencil-line);
}

.archive-card-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

.archive-card-excerpt {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.archive-card-footer {
  text-align: right;
}

.read-more-link {
  font-family: var(--caption-font);
  font-size: 1.1rem;
  color: var(--ink-graphite);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px dashed var(--pencil-line);
}

.read-more-link:hover {
  color: var(--ink-red);
  border-bottom-color: var(--ink-red);
}

/* サイドバーウィジェット */
.archive-sidebar-widget {
  margin-bottom: 3rem;
}

.sidebar-widget-title {
  font-family: var(--headline-font) !important;
  font-size: 0.9rem !important;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #999;
  border-bottom: 1px solid var(--pencil-line);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem !important;
}

.sidebar-sticky-note {
  background-color: #fef9c3;
  padding: 1.5rem;
  transform: rotate(2deg);
  box-shadow: 3px 5px 15px rgba(0, 0, 0, 0.05);
  position: relative;
}

.sidebar-sticky-note::before {
  content: "push_pin";
  font-family: 'Material Symbols Outlined';
  position: absolute;
  top: -15px;
  right: -10px;
  font-size: 2rem;
  color: #ddd;
  transform: rotate(-15deg);
}

.search-inner {
  background-color: rgba(255, 255, 255, 0.4);
  padding: 0.5rem;
  display: flex;
  align-items: center;
}

.search-field {
  border: none !important;
  background: transparent !important;
  font-size: 0.9rem;
  width: 100%;
}

.search-icon {
  color: #999;
  font-size: 1.2rem;
}

.archive-index-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-end;
}

.archive-tab-item {
  display: block;
  width: 100%;
  padding: 0.8rem 1.2rem;
  font-family: var(--headline-font);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--ink-graphite);
  text-decoration: none;
  text-align: right;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.archive-tab-item:nth-child(odd) { transform: rotate(-1deg); }
.archive-tab-item:nth-child(even) { transform: rotate(1.5deg); }

.archive-tab-item:hover {
  transform: rotate(0deg) translateX(-5px);
  z-index: 5;
}

.archive-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.sidebar-decoration-note {
  padding: 1.5rem;
  background-color: #f5f2eb;
  border: 2px dashed #e5e0d3;
  margin-top: 4rem;
  transform: rotate(-1deg);
  text-align: center;
  color: #999;
  font-size: 0.9rem;
}

.page-template-page-archive #main {
  padding: 0 !important;
}

@media screen and (max-width: 600px) {
  .archive-card-tags {
    position: relative;
    top: 0;
    right: 0;
    margin-bottom: 1rem;
  }
}



/************************************
** アーカイブページ：Ajaxフィルタ・クロステープ演出（Stitchデザイン準拠）
************************************/
.filter-link {
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
  display: inline-block;
}

/* 選択状態：共通のテープ演出用変数 */
:root {
  --tape-color: rgba(235, 87, 87, 0.6); /* コーラルレッド系・半透明 */
}

/* タグの選択状態：両端を別のテープで留める演出（ユーザー提供画像準拠） */
.washi-tape.filter-link.is-active {
  transform: scale(1.05) rotate(-1deg);
  box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
  z-index: 10;
}

.washi-tape.filter-link.is-active::before,
.washi-tape.filter-link.is-active::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 28px;
  background-color: rgba(0, 0, 0, 0.2); /* 重なりで色が濃くなる表現 */
  z-index: 20;
  pointer-events: none;
  mix-blend-mode: multiply;
  /* テープの端をギザギザにする（簡易版） */
  clip-path: polygon(0% 10%, 100% 0%, 100% 90%, 0% 100%);
}

.washi-tape.filter-link.is-active::before {
  top: -8px;
  left: -4px;
  transform: rotate(-35deg);
}

.washi-tape.filter-link.is-active::after {
  bottom: -8px;
  right: -4px;
  transform: rotate(-35deg);
}

/* カテゴリタブの選択状態：サンプルの精巧なデザインを再現 */
.archive-tab-item.filter-link.is-active {
  background-color: var(--tab-bg) !important; /* 元の色を維持 */
  background-image: none !important;
  color: #1c1917 !important;
  padding: 0.8rem 1.2rem !important;
  padding-left: 28px !important;
  border-left: none !important; 
  border: none !important;
  box-shadow: 2px 4px 8px rgba(0,0,0,0.1) !important;
  transform: translateX(10px) rotate(-2deg) !important;
  position: relative;
  z-index: 100;
  min-height: 52px;
  /* 左上を切り抜く */
  clip-path: polygon(0% 32px, 32px 0%, 100% 0%, 100% 100%, 0% 100%) !important;
}

/* 本体の青い帯（切り欠きの下から始まる） */
.archive-tab-item.filter-link.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  top: 32px; /* 切り欠きの高さに合わせる */
  width: 12px;
  background-color: #3b82f6 !important; /* blue-500 */
  z-index: 10;
  transform: none !important;
}

/* めくれた角全体のコンテナ */
.tab-item-curl {
  display: none; /* 通常時は非表示 */
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  pointer-events: none;
  z-index: 20;
}

.archive-tab-item.is-active .tab-item-curl {
  display: block; /* 選択時のみ表示 */
  filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.1));
}

/* めくれた紙の裏側（本体の色と連動） */
.curl-paper {
  width: 100%;
  height: 100%;
  /* 少し明るめの色から元の色へのグラデーション */
  background: linear-gradient(135deg, #f3f4f6 0%, var(--tab-bg) 100%);
  clip-path: polygon(0% 100%, 100% 0%, 0% 0%);
}

/* めくれた角にある青い帯（裏面） */
.curl-line {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 12px;
  width: 100%;
  background-color: rgba(96, 165, 250, 0.8); /* blue-400 opacity-80 */
  clip-path: polygon(0% 100%, 100% 0%, 100% 100%);
}

/* 以前の::afterをクリア */
.archive-tab-item.filter-link.is-active::after {
  content: none !important;
}

/* ホバー時の微調整 */
.filter-link:hover {
  filter: brightness(0.95);
  transform: scale(1.02);
}

.no-posts-message {
  padding: 3em;
  text-align: center;
  font-family: var(--main-font);
  color: var(--pencil-line);
  font-style: italic;
  background: var(--paper-white);
  border: 1px dashed var(--pencil-line);
  border-radius: 10px;
  margin: 2em 0;
}

/************************************
** About Page 特定レイアウト
************************************/

/* Aboutページ全体のコンテナ */
.about-page-content {
  position: relative;
  overflow: hidden;
  padding-top: 2rem;
  padding-bottom: 8rem;
  min-height: 80vh;
}

/* 背景の巨大な透かし文字（鏡文字・回転） */
.about-bg-watermark {
  position: absolute;
  top: 15%;
  left: 5%;
  font-size: clamp(6rem, 15vw, 12rem);
  font-weight: 900;
  color: var(--ink-graphite);
  opacity: 0.05;
  white-space: pre;
  line-height: 0.8;
  transform: rotate(-12deg) scaleX(-1);
  pointer-events: none;
  z-index: 0;
  font-family: 'Arial Black', sans-serif;
  letter-spacing: -0.05em;
}

.about-layout {
  position: relative;
  z-index: 1;
  max-width: 900px !important;
}

/* ヘッダー部分：Title & Subtitle */
.about-page-header {
  margin-bottom: 3rem;
  padding-left: 20px;
}

.about-title {
  font-family: var(--headline-font) !important;
  font-size: 3.5rem !important;
  font-weight: 900 !important;
  color: var(--ink-graphite);
  margin: 0 !important;
  line-height: 1;
}

.about-subtitle {
  font-family: var(--caption-font) !important;
  font-size: 1.5rem !important;
  color: var(--ink-red);
  font-style: italic;
  margin-top: 0.5rem !important;
}

/* メインの紙の束コンテナ（全体を回転） */
.about-paper-container {
  position: relative;
  margin: 0 auto;
  transform: rotate(-1.5deg);
  max-width: 800px;
}

/* メインの紙シート */
.about-paper-sheet {
  background-color: var(--paper-white);
  padding: 4rem 4rem 5rem !important;
  box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 2;
  border: 1px solid rgba(0,0,0,0.05);
  /* 手書き風のわずかな歪み */
  border-radius: 2px 5px 3px 8px / 4px 2px 6px 3px;
}

/* 装飾：付箋（右上） */
.about-sticky-note {
  position: absolute;
  top: -20px;
  right: -30px;
  background-color: var(--marker-yellow);
  padding: 1.5rem;
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.1);
  transform: rotate(4deg);
  z-index: 10;
  text-align: center;
}

.about-sticky-note p {
  font-family: var(--caption-font) !important;
  font-size: 1.4rem !important;
  color: var(--ink-graphite);
  line-height: 1.2;
  margin: 0 !important;
}

/* 装飾：ペーパークリップ（左下） */
.about-decoration-clip {
  position: absolute;
  bottom: -15px;
  left: -20px;
  z-index: 20;
  transform: rotate(-15deg);
}

.about-decoration-clip .material-symbols-outlined {
  font-size: 4rem;
  color: var(--pencil-line);
  filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.2));
}

/* 本文内のスタイル調整 */
.about-entry-content {
  font-family: var(--body-font) !important;
  font-size: 1.1rem !important;
  line-height: 1.9 !important;
  color: #333;
}

.about-entry-content p {
  margin-bottom: 2rem !important;
}

/* レスポンシブ調整 */
@media screen and (max-width: 800px) {
  .about-bg-watermark {
    font-size: 5rem;
    top: 10%;
  }
  .about-title {
    font-size: 2.5rem !important;
  }
  .about-paper-sheet {
    padding: 3rem 1.5rem !important;
  }
  .about-paper-container {
    transform: none;
    padding: 0 10px;
  }
  .about-sticky-note {
    width: 120px;
    height: 120px;
    right: 10px;
    top: -40px;
    padding: 0.5rem;
  }
  .about-sticky-note p {
    font-size: 1.1rem !important;
  }
}
