@charset "UTF-8";

/*!
Theme Name: Cocoon Child for AIの調べもノート
Description: shirabemonote.ushiblo.com（AIの調べもノート）用の Cocoon 子テーマ。昭和レトロ、コーヒー牛乳の配色
Theme URI: https://shirabemonote.ushiblo.com/
Author: uc4696
Template:   cocoon-master
Version:    2.0.0
*/

/* スキンは使わない（Cocoon の素の見た目の上に、これだけで組む）。
   2026-11-07 に昭和レトロへ作り直した（docs/design.md）。前半は元の組み方のまま変数だけ差し替え、見本に合わせた指定は末尾の「レトロ」にまとめた。
   正本は teams-sdm リポジトリの sites/ai/wp/theme/cocoon-child-ai/。 */

:root {
  --ai-main:   #6B4526; /* こげ茶（サイト全体のメイン） */
  --ai-dark:   #6B4526;
  --ai-accent: #EDBB78; /* コーヒー牛乳のクリーム（差し色） */
  --ai-accent-pale: #F8E7C8;
  --ai-bg:     #F5E8D0; /* 紙 */
  --ai-line:   #D9C7A6;
  --ai-text:   #33261A; /* 墨（2026-11-07 にこげ茶寄りへ。元は #17140F） */
  --ai-sub:    #6f6455;
  --ai-page:   #F5E8D0;
  --ai-card:   #FFFDF6;
  --ai-ink:    #33261A;
  --ai-kuro:   #C2601A;
  --ai-font-head: 'Zen Kaku Gothic New', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  --ai-font-big:  'Dela Gothic One', 'Zen Kaku Gothic New', sans-serif;
}

/* 全体
==============================================================================*/

body {
  background-color: var(--ai-page);
  color: var(--ai-text);
}
a {
  color: #2f5fb3;
}
.main,
.sidebar {
  border: none;
  border-radius: 0;
}

/* ヘッダー
==============================================================================*/

/* マーク（正方形）とサイト名を横に並べる。サイト名は functions.php の ai_header_logo_with_name
   Cocoon依存: .logo-header .site-name-text-link（ロゴのリンク）、.header-in（中央寄せ） */
.header {
  background-color: #fff;
}
.header-in {
  min-height: 0;
  padding: 28px 16px 22px;
}
.logo-header {
  padding: 0;
}
.logo-header .site-name-text-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}
.logo-header .site-logo-image {
  width: 72px;
  height: 72px;
}
/* Cocoon がロゴの中の span を display: block などにするので、ロゴのリンクから指定して勝たせる */
.logo-header .site-name-text-link .ai-site-name {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  color: var(--ai-dark);
  font-family: var(--ai-font-head);
  line-height: 1.35;
  text-align: left;
}
.logo-header .ai-site-name .ai-site-name-main {
  display: block;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: .02em;
}
.logo-header .ai-site-name .ai-site-name-sub {
  display: block;
  margin-top: 6px;
  padding: 2px 10px;
  background-color: var(--ai-dark);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .14em;
}
.ai-site-name-sub::before {
  display: inline-block;
  width: .6em;
  height: .6em;
  margin-right: .6em;
  background-color: var(--ai-accent);
  vertical-align: .05em;
  content: "";
}
@media (max-width: 834px) {
  .header-in { padding: 16px 12px 14px; }
  .logo-header .site-name-text-link { gap: 10px; }
  .logo-header .site-logo-image { width: 48px; height: 48px; }
  .logo-header .ai-site-name .ai-site-name-main { font-size: 17px; }
  .logo-header .ai-site-name .ai-site-name-sub { margin-top: 4px; font-size: 11px; }
}

/* ヘッダーの下の帯 : ロゴと同じ図形を横に繰り返す（images/band.svg） */
.header-container {
  box-shadow: none;
}
.header-container::after {
  display: block;
  height: 12px;
  background: url(images/band.svg) 0 0 / 96px 12px repeat-x;
  content: "";
}

/* グローバルメニュー : Cocoon がキーカラー（濃い藍）で塗る帯。hover と今いるページは下にからしの線
   Cocoon依存: #navi の背景はテーマの設定 site_key_color、.navi-in a .item-description は項目の「説明」 */
.navi-in a {
  color: #fff;
  font-family: var(--ai-font-head);
  font-size: 14px;
  font-weight: 500;
}
.navi-in a:hover {
  background-color: rgba(255, 255, 255, .08);
  box-shadow: inset 0 -3px 0 var(--ai-accent);
}
.navi-in > ul > li.current-menu-item > a {
  box-shadow: inset 0 -3px 0 var(--ai-accent);
}
.navi-in .item-description {
  color: #aeb6cc;
}

/* パンくず */
.breadcrumb {
  color: var(--ai-sub);
}

/* 記事
==============================================================================*/

.article h1,
.entry-title {
  color: var(--ai-text);
  font-family: var(--ai-font-head);
  font-weight: 700;
  line-height: 1.5;
}

.article h2 {
  margin-top: 6rem;
  margin-bottom: 1.5rem;
}
.article h3 {
  margin-top: 4.5rem;
  margin-bottom: 1.25rem;
}
.article h4,
.article h5,
.article h6 {
  margin-top: 3rem;
  margin-bottom: 1rem;
}
.article h2 + h3,
.article h2 + h4,
.article h3 + h4 {
  margin-top: 1.5rem;
}

@media (max-width: 480px) {
  .article .entry-title {
    margin: .5em 0 1em;
    padding: 0;
    font-size: 20px;
  }
}

.article .entry-content {
  font-size: 16px;
}
.article p {
  margin-bottom: 2em;
}

/* 見出しは3段とも左に図形を置く。h2＝正方形、h3＝円、h4＝三角 */
.article .entry-content h2,
.article .entry-content h3,
.article .entry-content h4 {
  position: relative;
  border: none;
  border-radius: 0;
  font-family: var(--ai-font-head);
  font-weight: 700;
  line-height: 1.5;
}

/* H2 : 濃い藍の面。左端にからしの正方形 */
.article .entry-content h2 {
  padding: 14px 18px 14px 50px;
  background: var(--ai-dark);
  color: #fff;
  font-size: 23px;
}
.article .entry-content h2::before {
  position: absolute;
  top: 50%;
  left: 18px;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  background: var(--ai-accent);
  content: "";
}

/* H3 : 下に藍の線。左にからしの円 */
.article .entry-content h3 {
  padding: 4px 4px 10px 30px;
  background: none;
  box-shadow: inset 0 -2px 0 var(--ai-line);
  color: var(--ai-text);
  font-size: 20px;
}
.article .entry-content h3::before {
  position: absolute;
  top: .55em;
  left: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ai-accent);
  content: "";
}
.article .entry-content h3::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 4em;
  height: 2px;
  background: var(--ai-dark);
  content: "";
}

/* H4 : 左に藍の三角 */
.article .entry-content h4 {
  padding: 2px 0 2px 26px;
  background: none;
  color: var(--ai-text);
  font-size: 18px;
}
.article .entry-content h4::before {
  position: absolute;
  top: .5em;
  left: 2px;
  width: 0;
  height: 0;
  border-right: 7px solid transparent;
  border-bottom: 13px solid var(--ai-main);
  border-left: 7px solid transparent;
  content: "";
}

@media (max-width: 768px) {
  .article .entry-content { font-size: 15px; }
  .article h2 { margin-top: 4.5rem; }
  .article h3 { margin-top: 3.5rem; }
  .article .entry-content h2 { padding: 12px 14px 12px 40px; font-size: 19px; }
  .article .entry-content h2::before { left: 14px; width: 12px; height: 12px; margin-top: -6px; }
  .article .entry-content h3 { font-size: 17px; }
  .article .entry-content h4 { font-size: 16px; }
}

/* 箇条書き : 点を小さな正方形に */
.article .entry-content ul:not([class*="is-style"]) > li::marker {
  color: var(--ai-main);
  content: "■  ";
  font-size: .7em;
}

/* 画像 : 記事の図は白地なので、細い線で囲む */
.article .entry-content .wp-block-image img {
  border: 1px solid var(--ai-line);
  border-radius: 0;
  box-shadow: none;
}
.article .entry-content .wp-block-image figcaption {
  color: var(--ai-sub);
  font-size: 13px;
}
.eye-catch img {
  border-radius: 0;
}

/* 引用 : 知恵袋の質問の言い換えなどに使う。左にからしの太線 */
.article .entry-content blockquote {
  padding: 16px 20px;
  border: none;
  border-left: 6px solid var(--ai-accent);
  border-radius: 0;
  background-color: var(--ai-accent-pale);
}
.article .entry-content blockquote::before,
.article .entry-content blockquote::after {
  content: none;
}

/* 強調 : からしの下線マーカー */
.article .entry-content strong {
  background: linear-gradient(transparent 62%, var(--ai-accent-pale) 62%);
}

/* コード */
.article .entry-content .wp-block-code {
  border: none;
  border-left: 4px solid var(--ai-main);
  border-radius: 0;
  background-color: var(--ai-bg);
  font-size: 14px;
  line-height: 1.6;
}

/* 表 */
.article .entry-content .wp-block-table table {
  border: none;
  font-size: 14px;
  line-height: 1.6;
}
.article .entry-content .wp-block-table th,
.article .entry-content .wp-block-table td {
  padding: .6em .8em;
  border: none;
  border-bottom: 1px solid var(--ai-line);
  font-size: inherit;
}
.article .entry-content .wp-block-table th {
  background-color: var(--ai-dark);
  color: #fff;
  font-weight: 700;
}
.article .entry-content .wp-block-table tbody tr:nth-child(even) td {
  background-color: #f8f9fc;
}
.article .entry-content .scrollable-table td {
  min-width: 4em;
  white-space: normal;
}

/* 目次 : 上に藍の太線 */
.toc {
  border: none;
  border-top: 4px solid var(--ai-dark);
  border-radius: 0;
  background-color: #f8f9fc;
}
.toc-title {
  color: var(--ai-text);
  font-family: var(--ai-font-head);
  font-weight: 700;
}
.toc-content {
  border-top: 1px solid var(--ai-line);
}

/* くろさんの吹き出し（src/Blocks.php の balloon。冒頭・合いの手・「くろさんのひとこと」の3か所）
   Cocoon の吹き出しブロック（speech-wrap）の見た目を、角丸なし・細い藍の線・淡い藍の面にする。アイコンは円（sbis-cb）のまま。
   Cocoon依存: .speech-balloon の ::before（線の三角）と ::after（面の三角）で尻尾を描く */
.article .entry-content .ai-kurosan {
  --cocoon-custom-background-color: var(--ai-bg);
  --cocoon-custom-border-color: var(--ai-main);
  --cocoon-custom-text-color: var(--ai-text);
  align-items: flex-start;
  margin-bottom: 1.8em;
}
.article .entry-content .ai-kurosan .speech-person {
  width: 64px;
  min-width: 64px;
}
.article .entry-content .ai-kurosan .speech-icon-image {
  border-color: var(--ai-line);
}
.article .entry-content .ai-kurosan .speech-name {
  color: var(--ai-sub);
  font-size: 12px;
}
.article .entry-content .ai-kurosan .speech-balloon {
  height: auto;
  padding: 12px 16px;
  border-radius: 0;
}

/* 記事の末尾の「AI が書いた」旨（src/Pipeline.php が本文の最後に入れる小さな段落） */
.article .entry-content > p.has-small-font-size:last-child {
  padding: 12px 16px 12px 40px;
  background: var(--ai-bg) url(images/logo.svg) 12px 14px / 16px 16px no-repeat;
  color: #4a5370;
  font-size: 13px;
}

/* カテゴリー・タグ */
.cat-link {
  border-radius: 0;
  background-color: var(--ai-dark);
}
.cat-link:hover {
  background-color: var(--ai-main);
  color: #fff;
}
.tag-link {
  border-color: var(--ai-main);
  border-radius: 0;
  color: var(--ai-main);
}
.tag-link:hover {
  background-color: var(--ai-bg);
  color: var(--ai-main);
}

/* 前後の記事・関連記事 */
.pager-post-navi a {
  border-color: var(--ai-line);
}
.related-entry-card-title {
  color: var(--ai-text);
}

/* 一覧・カード
==============================================================================*/

/* カード : 白い面に細い線。hover で下にからしの線
   Cocoon依存: .entry-card-wrap（.a-wrap）、.cat-label（サムネの左上のカテゴリー名） */
.list .a-wrap,
.related-entry-card-wrap {
  border: 1px solid var(--ai-line);
  border-radius: 0;
  background-color: #fff;
  transition: box-shadow .2s ease;
}
.list .a-wrap:hover,
.related-entry-card-wrap:hover {
  background-color: #fff;
  box-shadow: inset 0 -4px 0 var(--ai-accent);
}
.a-wrap:hover {
  background-color: var(--ai-bg);
}
.list .entry-card-title {
  color: var(--ai-text);
  font-family: var(--ai-font-head);
  font-weight: 700;
  line-height: 1.5;
}
.list .entry-card-snippet {
  color: var(--ai-sub);
  line-height: 1.6;
}
.cat-label {
  top: 0;
  left: 0;
  padding: 2px 8px;
  border: none;
  background-color: var(--ai-dark);
  color: #fff;
}
.card-thumb img {
  border-radius: 0;
}

/* 一覧の見出し（トップの「新着記事」・関連記事など） : 左に3つの図形（■●▲）
   Cocoon依存: .list-title（トップのカテゴリーごとの一覧）・.related-entry-heading・.archive-title */
.list-title,
.related-entry-heading,
.comment-title,
.archive-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.25em;
  padding: 0 0 8px;
  border: none;
  border-bottom: 2px solid var(--ai-dark);
  background: none;
  color: var(--ai-text);
  font-family: var(--ai-font-head);
  font-size: 20px;
  font-weight: 700;
  text-align: left;
}
.list-title::before,
.related-entry-heading::before,
.comment-title::before,
.archive-title::before {
  flex: none;
  width: 44px;
  height: 12px;
  background:
    linear-gradient(var(--ai-dark), var(--ai-dark)) 0 0 / 12px 12px no-repeat,
    radial-gradient(circle at 6px 6px, var(--ai-accent) 5.5px, transparent 6px) 16px 0 / 12px 12px no-repeat,
    conic-gradient(from 150deg at 50% 0, var(--ai-main) 60deg, transparent 0) 32px 0 / 12px 12px no-repeat;
  content: "";
}
.list-title-in {
  padding: 0;
  border: none;
}

/* ページ送り・「もっと見る」 */
.page-numbers,
.pagination-next-link,
.pager-links a span,
.list-more-button {
  border-radius: 0;
}
a.page-numbers,
.pagination-next-link,
.pager-links a span {
  border: none;
  background-color: var(--ai-dark);
  color: #fff;
}
a.page-numbers:hover,
.pagination-next-link:hover,
.pager-links a:hover span {
  background-color: var(--ai-main);
  color: #fff;
}
.page-numbers.current {
  background-color: var(--ai-accent);
  color: var(--ai-dark);
}
.list-more-button {
  border: 2px solid var(--ai-dark);
  color: var(--ai-dark);
  font-weight: 700;
}
.list-more-button:hover {
  background-color: var(--ai-dark);
  color: #fff;
}

/* サイドバー
==============================================================================*/

.sidebar {
  background-color: transparent;
}
.sidebar .widget {
  margin-bottom: 28px;
  padding: 16px;
  background-color: #fff;
}
.sidebar h2,
.sidebar h3 {
  position: relative;
  margin: 0 0 1em;
  padding: 0 0 0 20px;
  border: none;
  background: none;
  color: var(--ai-text);
  font-family: var(--ai-font-head);
  font-size: 16px;
  font-weight: 700;
}
.sidebar h2::before,
.sidebar h3::before {
  position: absolute;
  top: .3em;
  left: 0;
  width: 12px;
  height: 12px;
  background-color: var(--ai-accent);
  content: "";
}
.widget-entry-card {
  font-size: 14px;
  line-height: 1.5;
}
.widget-entry-cards .a-wrap {
  border-bottom: 1px solid var(--ai-bg);
}
.widget_categories ul li a:hover,
.widget_archive ul li a:hover,
.widget_nav_menu ul li a:hover {
  background-color: var(--ai-bg);
}
.search-box .search-edit {
  border: 2px solid var(--ai-line);
  border-radius: 0;
}
.search-box .search-edit:focus {
  border-color: var(--ai-main);
}

/* 「このサイトについて」の箱（wp/setup/site.php で入れるウィジェット） */
.ai-about-box {
  font-size: 14px;
  line-height: 1.75;
}
.ai-about-box p {
  margin: 0 0 .7em;
}
.ai-about-box p:last-child {
  margin-bottom: 0;
}
.ai-about-box a {
  font-weight: 700;
}
/* 箇条書き（読むときの注意）: 文の左端を段落とそろえ、印は見出しと同じからしの正方形を小さくしたもの */
.ai-about-box ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ai-about-box li {
  position: relative;
  margin: 0 0 .6em;
  padding-left: 1.1em;
}
.ai-about-box li:last-child {
  margin-bottom: 0;
}
.ai-about-box li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .6em;
  width: 6px;
  height: 6px;
  background: #f2b632;
}

/* 広告
==============================================================================*/

/* 広告の枠 : 線で囲んだ「置き場所」。広告は AdSense のユニット3つ（wp/setup/site.php の広告ウィジェット）で、自動広告は使わない。
   広告そのもの（ins）の大きさ・位置には手を入れない（AdSense のポリシーで、切り取り・重ね・隠し表示はできない）
   Cocoon依存: tmp/ad.php の .ad-area > .ad-label + .ad-wrap。記事中は最初の h2 の前のウィジェット（.widget_common_ad）と [ad]（.ad-box） */
.ad-area {
  margin: 3rem 0;
  padding: .5rem 12px 12px;
  border: 1px solid var(--ai-line);
  border-radius: 0;
  background-color: #f8f9fc;
}
.ad-area .ad-label {
  margin-bottom: .5rem;
  color: #7c86a3;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: .15em;
}
/* トップの一覧の広告は、本文幅いっぱいにせずレクタングル（最大336px）に */
.widget-index-middle .ad-area,
.widget-index-bottom .ad-area {
  max-width: 360px;
  margin-right: auto;
  margin-left: auto;
}
.sidebar .ad-area {
  margin: 0;
  border: none;
  background: none;
}
.article .entry-content .widget_common_ad + h2,
.article .entry-content .ad-box + h2 {
  margin-top: 3rem;
}
/* 広告が来なかった枠は、ラベルだけの空箱にせず枠ごと消す */
.ad-area:has(ins.adsbygoogle[data-ad-status="unfilled"]),
.sidebar .widget:has(ins.adsbygoogle[data-ad-status="unfilled"]) {
  display: none;
}

/* Amazon アソシエイトの枠「くろさんがおすすめする商品」（functions.php の ai_kuro_picks。中身は kuro-picks.json）
   本文（.entry-content）の外に出るので、見出しは記事の h2 と同じ見た目をここで付け直す */
.ai-picks {
  margin: 4rem 0 2rem;
}
.article .ai-picks-title {
  position: relative;
  margin: 0 0 1.5rem;
  padding: 14px 18px 14px 50px;
  border: none;
  border-radius: 0;
  background: var(--ai-dark);
  color: #fff;
  font-family: var(--ai-font-head);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
}
.article .ai-picks-title::before {
  position: absolute;
  top: 50%;
  left: 18px;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  background: var(--ai-accent);
  content: "";
}
.article .ai-picks p {
  margin-bottom: 1em;
}
.ai-picks-list {
  display: grid;
  gap: 12px;
  margin-bottom: 1.5em;
}
/* 商品 : 白い面に細い線、左にからしの太線。hidden の商品は JS（ai_kuro_picks_script）が入れ替える */
.ai-pick {
  padding: 14px 16px;
  border: 1px solid var(--ai-line);
  border-left: 4px solid var(--ai-accent);
  background-color: #fff;
}
.ai-pick[hidden] {
  display: none;
}
.article .ai-pick .ai-pick-name {
  display: flex;
  gap: 8px;
  margin-bottom: .4em;
  font-family: var(--ai-font-head);
  font-weight: 700;
  line-height: 1.5;
}
.ai-pick-name a {
  color: var(--ai-text);
  text-decoration: none;
}
.ai-pick-name a:hover {
  text-decoration: underline;
}
.article .ai-pick .ai-pick-text {
  color: var(--ai-sub);
  font-size: 14px;
  line-height: 1.7;
}
.ai-pick-button {
  display: inline-block;
  padding: 5px 16px;
  background-color: var(--ai-dark);
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  text-decoration: none;
  transition: background-color .2s;
}
.ai-pick-button:hover {
  background-color: var(--ai-main);
  color: #fff;
}
.article .ai-picks .ai-picks-disclosure {
  color: var(--ai-sub);
  font-size: 12px;
}

/* フッター
==============================================================================*/

.footer {
  background-color: var(--ai-dark);
}
.footer::before {
  display: block;
  height: 12px;
  background: url(images/band.svg) 0 0 / 96px 12px repeat-x;
  content: "";
}
#footer,
#footer a,
.navi-footer-in a {
  color: #e7eaf3;
}
.navi-footer-in a:hover {
  background-color: rgba(255, 255, 255, .08);
  color: #fff !important;
}
.navi-footer-in > .menu-footer li {
  border-left-color: rgba(231, 234, 243, .25);
}
#footer .copyright {
  color: #aeb6cc;
}
#footer .footer-widgets {
  border-bottom: 1px solid rgba(231, 234, 243, .2);
}
#footer .footer-title {
  border: none;
  background: none;
  color: #fff;
}

/* スマホ
==============================================================================*/

.mobile-menu-buttons {
  background-color: var(--ai-dark);
}
.mobile-menu-buttons .menu-caption,
.mobile-menu-buttons .menu-icon {
  color: #fff;
}
.mobile-menu-buttons .menu-button:hover {
  background-color: var(--ai-main);
}
.navi-menu-content {
  background-color: var(--ai-dark);
}
.navi-menu-content .menu-drawer a {
  border-bottom: 1px solid rgba(255, 255, 255, .15);
  color: #fff;
}
.navi-menu-content .menu-drawer a:hover {
  background-color: var(--ai-main);
}
.go-to-top-button {
  border-radius: 0;
  background-color: var(--ai-dark);
  color: var(--ai-accent);
}
.go-to-top-button:hover {
  background-color: var(--ai-main);
}

/* レトロ（2026-11-07。docs/design.md の見本に合わせる。前半の指定より後に書いて勝たせる）
==============================================================================*/

body {
  background-color: var(--ai-page);
  color: var(--ai-ink);
  font-family: var(--ai-font-head);
}
a { color: var(--ai-main); }
a:hover { color: var(--ai-ink); }

/* ヘッダー：マークとサイト名、メニュー。下に墨の太線 */
.header,
.header-container { background-color: var(--ai-page); }
.header-container { border-bottom: 3px solid var(--ai-ink); }
.header-container::after { content: none; }
.logo-header .site-logo-image { width: 56px; height: 56px; }
.logo-header .site-name-text-link .ai-site-name { color: var(--ai-ink); }
.logo-header .ai-site-name .ai-site-name-main { font-size: 22px; font-weight: 900; }
#navi, .navi { background-color: var(--ai-page); }
.navi-in a {
  color: var(--ai-ink);
  font-weight: 700;
}
.navi-in > ul > li > a { border: 2px solid var(--ai-ink); margin: 4px; min-height: 44px; }
.navi-in > ul > li:last-child > a { background: var(--ai-main); border-color: var(--ai-main); color: var(--ai-page); }
.navi-in a:hover { background-color: var(--ai-accent-pale); box-shadow: none; }
.navi-in > ul > li.current-menu-item > a { box-shadow: none; }
.navi-in .item-description { display: none; }
@media (max-width: 834px) {
  .logo-header .site-logo-image { width: 44px; height: 44px; }
  .logo-header .ai-site-name .ai-site-name-main { font-size: 18px; }
}

/* 本文の箱：カードの白に墨の線 */
.main {
  background: var(--ai-card);
  border: 3px solid var(--ai-ink);
}
.article .entry-title { font-weight: 900; }

/* 見出し：h2 は上に墨の二重線、h3 は左にこげ茶の太線 */
.article .entry-content h2 {
  padding: 16px 0 0;
  background: none;
  border-top: 6px double var(--ai-ink);
  color: var(--ai-ink);
  font-size: 26px;
  font-weight: 900;
}
.article .entry-content h2::before { content: none; }
.article .entry-content h3 {
  padding: 2px 0 2px 14px;
  box-shadow: none;
  border-left: 6px solid var(--ai-main);
  font-weight: 900;
}
.article .entry-content h3::before,
.article .entry-content h3::after { content: none; }
.article .entry-content h4::before { border-bottom-color: var(--ai-main); }
@media (max-width: 768px) {
  .article .entry-content h2 { padding: 12px 0 0; font-size: 21px; }
}
.article .entry-content strong { background: linear-gradient(transparent 62%, var(--ai-accent) 62%); }
.article .entry-content .wp-block-table th { background-color: var(--ai-main); color: var(--ai-card); }
.article .entry-content .wp-block-table tbody tr:nth-child(even) td { background-color: #FBF4E6; }
.toc { border-top-color: var(--ai-ink); background-color: #FBF4E6; }

/* くろさんの吹き出し：フルーツ牛乳の太線。メインの色は小さい文字には使わない（docs/design.md） */
.article .entry-content .ai-kurosan {
  --cocoon-custom-background-color: var(--ai-card);
  --cocoon-custom-border-color: var(--ai-kuro);
  --cocoon-custom-text-color: var(--ai-ink);
}
.article .entry-content .ai-kurosan .speech-balloon { border-width: 3px; }
.article .entry-content .ai-kurosan .speech-icon-image { border-color: var(--ai-kuro); }
.article .entry-content > p.has-small-font-size:last-child { background-color: var(--ai-bg); color: var(--ai-sub); }

/* カテゴリ・書き手のラベル（functions.php の ai_labels）。カテゴリは紙の地にアイコン、書き手は左に色の太線とごく薄い地 */
.ai-labels { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; font-weight: 700; line-height: 1.5; color: var(--ai-ink); }
.ai-label { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; }
.ai-label svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ai-label-cat { background: var(--ai-bg); }
.ai-label-writer { background: var(--ai-w-pale, #FBEDE3); border-left: 6px solid var(--ai-w-main, var(--ai-kuro)); }
.ai-single-labels { margin: -0.5em 0 1.5em; }
.ai-single-labels .ai-labels { font-size: 13px; }

/* 一覧のカード */
.list .a-wrap,
.related-entry-card-wrap { border: 2px solid var(--ai-ink); background-color: var(--ai-card); }
.list .a-wrap:hover,
.related-entry-card-wrap:hover { box-shadow: inset 0 -4px 0 var(--ai-accent); }
.cat-label { background-color: var(--ai-main); color: var(--ai-card); }
.list-title, .related-entry-heading, .comment-title, .archive-title { border-bottom-color: var(--ai-ink); font-weight: 900; }
.list-title::before, .related-entry-heading::before, .comment-title::before, .archive-title::before { content: none; }

/* フッター */
.footer { background-color: var(--ai-ink); color: var(--ai-page); }
.footer a { color: var(--ai-accent); }

/* トップ（front-page.php）
------------------------------------------------------------------------------*/
.home .main { background: none; border: none; padding: 0; }
.ai-front { color: var(--ai-ink); font-size: 16px; line-height: 1.7; }
.ai-front a { color: var(--ai-ink); text-decoration: none; }
.ai-front a:hover { color: var(--ai-main); }

.ai-hero { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; padding: 24px 0 40px; }
.ai-hero-text { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.ai-hero-kicker { margin: 0; font-weight: 900; color: var(--ai-main); letter-spacing: .1em; }
.ai-hero-title { margin: 0; font-family: var(--ai-font-big); font-weight: 400; font-size: clamp(36px, 5.6vw, 64px); line-height: 1.3; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.ai-hero-mark { background: var(--ai-main); color: var(--ai-page); padding: 4px 16px 8px; }
.ai-hero-lead { margin: 8px 0 0; font-size: 18px; max-width: 34.3em; }

.ai-card { background: var(--ai-card); border: 2px solid var(--ai-ink); display: flex; flex-direction: column; }
.ai-card-hero { flex: 1 1 380px; min-width: 0; border-width: 3px; }
.ai-card-thumb { display: block; aspect-ratio: 16 / 9; background: #E6D5B8; border-bottom: 2px solid var(--ai-ink); overflow: hidden; }
.ai-card-hero .ai-card-thumb { border-bottom-width: 3px; }
.ai-card-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ai-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ai-card-kicker { font-weight: 900; font-size: 13px; color: var(--ai-main); }
.ai-card-title { font-weight: 900; font-size: 18px; line-height: 1.5; }
.ai-card-hero .ai-card-title { font-size: 22px; line-height: 1.45; }
.ai-card .ai-labels { margin-top: auto; }

/* 幅いっぱいの帯（曜日・書き手）。Cocoon の .wrap の外まで広げる */
.ai-band { margin: 0 calc(50% - 50vw); }
.ai-band-in { max-width: 1200px; margin: 0 auto; padding: 32px 16px 28px; }
.ai-band-title { margin: 0 0 20px; font-weight: 900; font-size: 26px; border: none; padding: 0; background: none; }
.ai-week { background: var(--ai-main); color: var(--ai-card); }
.ai-week .ai-band-title { color: var(--ai-card); }
.ai-week-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 12px; }
.ai-front .ai-day { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--ai-card); text-align: center; }
.ai-front .ai-day:hover { color: var(--ai-accent); }
.ai-bottle { position: relative; width: 112px; height: 112px; background: var(--ai-card); border: 4px solid var(--ai-ink); box-sizing: border-box; display: block; }
.ai-day.is-today .ai-bottle { background: var(--ai-accent); border-color: var(--ai-accent); }
.ai-bottle svg { display: block; width: 100%; height: 100%; }
.ai-today { position: absolute; left: -4px; top: -14px; z-index: 1; background: var(--ai-ink); color: var(--ai-page); font-weight: 900; font-size: 13px; line-height: 1; padding: 5px 8px; }
.ai-day-char { position: absolute; left: 55%; top: 68%; transform: translate(-50%, -50%) rotate(-14deg); color: var(--ai-ink); font-family: var(--ai-font-big); font-size: 26px; line-height: 1; }
.ai-day-name { font-weight: 700; font-size: 14px; line-height: 1.4; }

.ai-latest { padding: 40px 0; }
.ai-section-title { margin: 0 0 20px; font-weight: 900; font-size: 26px; border: none; padding: 0; background: none; color: var(--ai-ink); }
.ai-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }

.ai-writers { background: var(--ai-ink); color: var(--ai-page); }
.ai-writers .ai-band-title { color: var(--ai-page); }
.ai-writer-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.ai-writer { background: var(--ai-card); color: var(--ai-ink); border-top: 10px solid var(--ai-w-main); padding: 16px; display: flex; gap: 12px; align-items: center; }
.ai-writer strong { font-size: 18px; }
.ai-writer-note { font-size: 14px; }
/* 公開の担当の時刻のバッジ（右上。色の帯にかかる） */
.ai-writer { position: relative; }
.ai-writer-slot { position: absolute; top: -5px; right: 12px; transform: translateY(-50%); background: var(--ai-ink); color: var(--ai-page); border: 2px solid var(--ai-w-main); padding: 2px 10px; font-family: var(--ai-font-head); font-weight: 900; font-size: 13px; line-height: 1.4; letter-spacing: .06em; white-space: nowrap; }
.ai-avatar { width: 64px; height: 64px; flex: none; background: var(--ai-w-accent); border: 2px dashed var(--ai-ink); box-sizing: border-box; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; text-align: center; line-height: 1.3; }
.ai-band-note { margin: 24px 0 0; font-size: 14px; }
@media (max-width: 480px) {
  .ai-hero { gap: 24px; padding-top: 8px; }
  .ai-card-grid { grid-template-columns: 1fr; }
  .ai-bottle { width: 96px; height: 96px; }
}

/* Cocoon がキーカラーで塗るヘッダーとメニューの帯を、紙の色に戻す（Cocoon の色の指定は head の中に後から出るので、id で勝たせる） */
#header-container,
#header-container .header,
#header-container .navi,
#navi,
#navi .navi-in > ul { background-color: var(--ai-page); }
#navi .navi-in > ul > li > a { color: var(--ai-ink); background: transparent; }
#navi .navi-in > ul > li:last-child > a { background: var(--ai-main); border-color: var(--ai-main); color: var(--ai-page); }
#navi .navi-in > ul > li > a:hover { background: var(--ai-accent-pale); color: var(--ai-ink); }
/* 全幅の帯（.ai-band）で横にはみ出さないように */
html, body { overflow-x: clip; }
@media (max-width: 1023px) {
  .home .main { padding: 0 16px; }
}
/* フッター：墨の地。前のデザインの図形の帯は出さない */
#footer, .footer { background-color: var(--ai-ink); }
.footer::before { content: none; }
#footer, #footer a { color: var(--ai-page); }

/* 2026-11-07 夜の直し（ユーザーの確認から）
------------------------------------------------------------------------------*/
/* アイコン（Tabler Icons。functions.php の ai_icon） */
.ai-icon { display: inline-block; width: 1em; height: 1em; flex: none; vertical-align: -0.12em; }
.ai-band-title, .ai-section-title, .ai-hero-kicker { display: flex; align-items: center; gap: 10px; }
.ai-band-title .ai-icon, .ai-section-title .ai-icon { width: 1.1em; height: 1.1em; }
.ai-label .ai-icon { width: 14px; height: 14px; }
a.ai-label { text-decoration: none; color: var(--ai-ink); }
a.ai-label:hover { box-shadow: inset 0 -2px 0 var(--ai-main); color: var(--ai-ink); }
.widget_categories .ai-cat-icon { width: 1.1em; height: 1.1em; margin-right: 8px; color: var(--ai-main); }

/* トップ：ブロックの中身の幅を 1 つにそろえる（帯の中も外も 1200px、左右 16px） */
.home .main { padding: 0; }
.ai-in { max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: 16px; padding-right: 16px; box-sizing: border-box; }
@media (max-width: 1023px) {
  .home .main { padding: 0; }
}

/* ヘッダー：マークの右にサイト名 */
#header .logo-header .site-name-text-link { display: inline-flex; flex-direction: row; align-items: center; gap: 12px; }
#header .logo-header .site-name-text-link .ai-site-name { text-align: left; }

/* メニュー：ボタンの間をあけて、線が重なって太く見えないように */
#navi .navi-in > ul { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
#navi .navi-in > ul > li { margin: 0; }
#navi .navi-in > ul > li > a { margin: 0; padding: 0 20px; }

/* 2026-11-07 夜の直し（2 回目）
------------------------------------------------------------------------------*/
/* サイト名：マーク（56px）の高さに収まる 2 行。色はマークと同じこげ茶 */
#header .logo-header .site-name-text-link .ai-site-name { height: 56px; justify-content: space-between; color: var(--ai-main); line-height: 1; }
#header .logo-header .ai-site-name .ai-site-name-main,
#header .logo-header .ai-site-name .ai-site-name-sub { display: block; margin: 0; padding: 0; background: none; color: var(--ai-main); font-weight: 900; letter-spacing: .04em; }
#header .logo-header .ai-site-name .ai-site-name-main { font-size: 25px; }
#header .logo-header .ai-site-name .ai-site-name-sub { font-size: 25px; letter-spacing: .1em; }
#header .ai-site-name-sub::before { content: none; }
@media (max-width: 834px) {
  #header .logo-header .site-name-text-link .ai-site-name { height: 44px; }
  #header .logo-header .ai-site-name .ai-site-name-main,
  #header .logo-header .ai-site-name .ai-site-name-sub { font-size: 19px; }
}

/* 枠の太さを 4px にそろえる（記事のカード、曜日のびん、記事の箱） */
.ai-card, .ai-card-hero { border-width: 4px; }
.ai-card-thumb, .ai-card-hero .ai-card-thumb { border-bottom-width: 4px; }
.ai-bottle { border-width: 4px; }
.main { border-width: 4px; }

/* 幅を 1 つにそろえる：ヘッダー・パンくず・本文・フッター・トップの帯の中身を、すべて 1200px（左右 16px）に */
.wrap { width: auto; max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: 16px; padding-right: 16px; box-sizing: border-box; }
.wrap .wrap { max-width: none; padding-left: 0; padding-right: 0; }
#header .logo-header { padding: 0; }
#header-container-in { justify-content: space-between; }
@media (min-width: 1024px) {
  #content-in { display: flex; gap: 24px; align-items: flex-start; }
  #content-in > #main { flex: 1 1 auto; width: auto; min-width: 0; margin: 0; }
  #content-in > #sidebar { flex: 0 0 320px; width: 320px; margin: 0; }
}
/* トップはブロックごとに .ai-in で幅を持つので、外側の .wrap は幅だけ渡す */
.home #content-in { max-width: none; padding-left: 0; padding-right: 0; display: block; }
@media (min-width: 1024px) {
  #content-in { flex-wrap: nowrap; }
  #content-in > #main { flex: 1 1 0; }
}
/* パンくずの白い帯も中身の幅（1168px）に */
.breadcrumb.wrap { max-width: 1168px; padding-left: 16px; padding-right: 16px; }

/* 2026-11-07 夜の直し（3 回目）
------------------------------------------------------------------------------*/
/* サイト名：全角の 2 行（ＡＩの調べも／ＮＯＴＥ）を、等幅の BIZ UDGothic で */
#header .logo-header .ai-site-name .ai-site-name-main,
#header .logo-header .ai-site-name .ai-site-name-sub { font-family: 'BIZ UDGothic', var(--ai-font-head); font-weight: 700; font-size: 24px; letter-spacing: 0; }
@media (max-width: 834px) {
  #header .logo-header .ai-site-name .ai-site-name-main,
  #header .logo-header .ai-site-name .ai-site-name-sub { font-size: 18px; }
}
/* ロゴはどの幅でも、中身の左端（本文と同じ）に付ける。Cocoon は幅が狭いと中央に寄せる */
#header .header-in, #header .logo-header { text-align: left; margin-left: 0; margin-right: auto; }
#header .logo-header .site-name-text-link { justify-content: flex-start; }
@media (max-width: 1023px) {
  #header-container-in { display: block; }
  #header, #header .header-in { width: 100%; }
}

/* 枠を 8px にそろえる（記事のカード、曜日のびん、メニューのボタン、記事の箱） */
.ai-card, .ai-card-hero { border-width: 8px; }
.ai-card-thumb, .ai-card-hero .ai-card-thumb { border-bottom-width: 8px; }
.ai-bottle { border-width: 8px; }
.ai-today { left: -8px; top: -18px; }
.main { border-width: 8px; }
#navi .navi-in > ul > li > a { border-width: 8px; }

/* サイドバー：左右の余白はなし、ウィジェットの間だけ縦にあける */
#sidebar { padding: 0; background: none; }
#sidebar .widget,
#sidebar .ad-area { margin: 0 0 24px; }
#sidebar .widget { padding: 20px; background: var(--ai-card); border: none; box-sizing: border-box; }
/* 新着記事：サムネは 4 割、文字は 6 割 */
#sidebar .new-entry-card { display: flex; gap: 12px; align-items: flex-start; }
#sidebar .new-entry-card-thumb { flex: 0 0 40%; width: 40%; margin: 0; }
#sidebar .new-entry-card-content { flex: 1 1 auto; margin: 0; font-size: 14px; line-height: 1.6; }

/* お知らせ（mu-plugin の [ai_notices]） */
.ai-notices { list-style: none; margin: 0; padding: 0; }
.ai-notices li { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 8px 0; border-bottom: 1px dashed var(--ai-line); }
.ai-notices time { flex: none; font-weight: 700; color: var(--ai-main); font-size: 13px; }
.ai-notices a { color: var(--ai-ink); }
.ai-notices-more { margin: 8px 0 0; font-size: 13px; text-align: right; }
.ai-notices-front { padding-bottom: 40px; }
.ai-notices-front .ai-notices li { padding: 12px 0; font-size: 16px; }
/* メニューのボタン：枠が太いぶん、幅を文字に合わせて広げる */
#navi .navi-in > ul > li { width: auto; flex: none; }
#navi .navi-in > ul > li > a { width: auto; min-width: 160px; padding: 0 24px; white-space: nowrap; box-sizing: border-box; }
/* スマホは右上の MENU があるので、ヘッダーのメニューのボタンは出さない。タブレットはロゴの右に並べる */
@media (max-width: 1023px) {
  #header-container-in { display: flex; align-items: center; }
  #header, #header .header-in { width: auto; }
}
@media (max-width: 834px) {
  #header-container-in { display: block; }
  #navi { display: none; }
}
@media (min-width: 835px) and (max-width: 1023px) {
  #header-container-in { display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: space-between; align-items: center; }
  #header { flex: none; }
  #navi { flex: 1 1 auto; }
  #navi .navi-in > ul > li > a { min-width: 0; padding: 0 14px; }
}

/* 2026-11-07 夜の直し（4 回目）
------------------------------------------------------------------------------*/
/* ロゴ：Cocoon がリンクに付ける左の余白をなくし、中身の左端にぴったり付ける */
#header .logo-header .site-name-text-link { padding: 0; margin: 0; }
/* サイドバーの新着記事：文字を小さくし、3 行を超えたら「…」 */
#sidebar .new-entry-card-content { font-size: 13px; line-height: 1.55; }
#sidebar .new-entry-card-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; font-size: 13px; }
/* サイドバーのお知らせ：ほかのウィジェット（14px、行の高さ 1.75）に合わせる */
#sidebar .ai-notices li { padding: 6px 0; font-size: 14px; line-height: 1.75; }
#sidebar .ai-notices a { font-size: 14px; line-height: 1.75; }
#sidebar .ai-notices time { font-size: 12px; }
#sidebar .ai-notices-more, #sidebar .ai-notices-more a { font-size: 12px; }
/* サイドバーの文字を 14px にそろえる（カテゴリー・アーカイブ・検索も） */
#sidebar .widget_categories li a { font-size: 14px; line-height: 1.75; padding: 6px 0; }
#sidebar .widget_archive select,
#sidebar .search-edit { font-size: 14px; }
#sidebar .widget_archive select { padding: 8px 10px; }
/* サイドバーの SNS：文を 14px に、ボタンの下の余白を詰める */
#sidebar .sns-follow-message { font-size: 14px; line-height: 1.75; margin-bottom: 8px; }
#sidebar .sns-follow-buttons { margin-bottom: 0; }
/* サイドバーの SNS のボタン：4 つを横 1 行に */
#sidebar .sns-follow-buttons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
#sidebar .sns-follow-buttons a { width: auto; margin: 0; }
#sidebar .sns-follow-message { text-align: left; }
/* サイドバーの新着記事：項目の間の線はなし。間は 16px あける */
#sidebar .widget-entry-card-link { border: none; margin: 0 0 16px; padding: 0; }
#sidebar .widget-entry-card-link:last-child { margin-bottom: 0; }

/* 一覧（カテゴリ・書き手・タグ・日付）：archive.php（2026-11-08）
   頭にカテゴリの牛乳びん／書き手のカード、記事はトップと同じカード、記事がないときの案内
------------------------------------------------------------------------------*/
.ai-archive-head { display: flex; gap: 20px; align-items: center; padding: 0 0 20px; margin: 0 0 24px; border-bottom: 4px double var(--ai-ink); }
.ai-archive-head .ai-bottle { flex: none; }
.ai-archive-head-text { min-width: 0; }
.ai-archive-kicker { margin: 0 0 4px; font-weight: 700; font-size: 14px; color: var(--ai-main); }
.ai-archive-title { margin: 0; padding: 0; border: none; background: none; font-weight: 900; font-size: 28px; line-height: 1.35; color: var(--ai-ink); display: flex; align-items: center; gap: 8px; }
.ai-archive-title .ai-icon { width: 28px; height: 28px; flex: none; color: var(--ai-main); }
.ai-archive-desc { margin: 8px 0 0; font-size: 15px; line-height: 1.7; }
.ai-archive-count { margin: 6px 0 0; font-size: 13px; font-weight: 700; color: var(--ai-sub); }
/* 書き手：左にその AI の色の太線、アバターの枠を大きめに */
.ai-archive-writer { border-left: 10px solid var(--ai-w-main); padding-left: 16px; }
.ai-archive-writer .ai-avatar { width: 96px; height: 96px; font-size: 13px; }
.ai-archive-writer .ai-archive-title .ai-icon { color: var(--ai-w-main); }
.ai-archive .ai-card-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.ai-archive .ai-card-title { font-size: 17px; }
/* 記事がないとき（Cocoon の NOT FOUND の代わり） */
.ai-archive-empty { padding: 28px 20px; border: 4px dashed var(--ai-line); text-align: center; }
.ai-archive-empty p { margin: 0 0 8px; }
.ai-archive-empty-title { font-weight: 900; font-size: 20px; display: flex; justify-content: center; align-items: center; gap: 8px; }
.ai-archive-empty-title .ai-icon { width: 24px; height: 24px; color: var(--ai-main); }
.ai-archive-empty-link { display: inline-block; margin-top: 8px; padding: 10px 18px; background: var(--ai-main); color: var(--ai-page); font-weight: 700; text-decoration: none; }
.ai-archive-empty-link:hover { color: var(--ai-page); opacity: .9; }
@media (max-width: 600px) {
  .ai-archive-head { gap: 14px; }
  .ai-archive-head .ai-bottle { width: 80px; height: 80px; border-width: 6px; }
  .ai-archive-head .ai-day-char { font-size: 20px; }
  .ai-archive-title { font-size: 22px; }
  .ai-archive-writer .ai-avatar { width: 72px; height: 72px; }
}
/* カードはトップと同じく下線なし（Cocoon の本文のリンクの下線を消す） */
.ai-archive .ai-card, .ai-archive .ai-card:hover { text-decoration: none; color: var(--ai-ink); }
