@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.3
*/

/************************************
** 老後の心配をしようじゃないか
** デザイン「放課後ゼミ」2026-10-14
** 紙の上に水彩がにじむ。目次は学生のノート。
** 色の正はこのファイル冒頭の :root。
** 広告（.ad-area / ins.adsbygoogle / .google-auto-placed）には一切スタイルを当てない。
************************************/

:root {
  --rg-paper: #F7F8F2;
  --rg-sheet: #FFFFFF;
  --rg-ink: #2E3A40;
  --rg-ink-soft: #5B676D;
  --rg-link: #3F6E55;
  --rg-sage: #7FAE86;
  --rg-honey: #E6B455;
  --rg-sky: #86AECB;
  --rg-wood: #C99C6E;
  --rg-rose: #E59A93;
  --rg-rule: #DDE3DA;
  --rg-hand: "Klee One", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  --paint: var(--rg-sage);
}

/* カテゴリごとの絵の具（ID: 2お金 5仕事 4住まい 3健康 6暮らし） */
.cat-label-2, .categoryid-2 { --paint: var(--rg-honey); }
.cat-label-5, .categoryid-5 { --paint: var(--rg-sky); }
.cat-label-4, .categoryid-4 { --paint: var(--rg-wood); }
.cat-label-3, .categoryid-3 { --paint: var(--rg-sage); }
.cat-label-6, .categoryid-6 { --paint: var(--rg-rose); }

/* ---------- 1. 紙と文字 ---------- */
body.body {
  background-color: var(--rg-paper);
  background-image: url("assets/paper.svg");
  color: var(--rg-ink);
}
/* リンク色は本文とサイドバーだけ（SNSボタン等の白文字を上書きしない） */
.entry-content a,
.sidebar a { color: var(--rg-link); }
.entry-content a:hover,
.sidebar a:hover { color: var(--rg-ink); }

.header-container,
.main,
.sidebar,
.footer { background-color: transparent; }

:focus-visible {
  outline: 2px solid var(--rg-link);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- 2. ヘッダー ---------- */
.header-container .header { background: none; }
.header-container .header-in { min-height: 0; padding: 22px 0 6px; }
.logo-header { padding: 0; margin: 0; }
.logo-header .site-name-text-link { position: relative; display: inline-block; padding: 0.2em 0.9em; }
.logo-header .site-name-text-link::before {
  content: "";
  position: absolute;
  inset: 14% -2% 4%;
  z-index: -1;
  background-color: var(--rg-honey);
  opacity: 0.45;
  -webkit-mask: url("assets/wash.svg") center / 100% 100% no-repeat;
  mask: url("assets/wash.svg") center / 100% 100% no-repeat;
}
.logo-header .site-name-text-link { isolation: isolate; }
.site-name-text {
  font-family: var(--rg-hand);
  font-weight: 600;
  font-size: 30px;
  letter-spacing: 0.04em;
  color: var(--rg-ink);
}
.tagline {
  font-family: var(--rg-hand);
  color: var(--rg-ink-soft);
  margin: 0.3em 1em 0.6em;
}

.navi { background-color: transparent; }
.navi-in > ul li { width: auto; height: 52px; }
.navi-in > ul > li > a { padding: 0 1.15em; isolation: isolate; }
.navi-in a {
  font-family: var(--rg-hand);
  font-weight: 600;
  font-size: 16px;
  color: var(--rg-ink);
}
.navi-in a:hover { background-color: transparent; color: var(--rg-ink); }
.navi-in > ul > li > a::after {
  content: "";
  position: absolute;
  left: 0.7em;
  right: 0.7em;
  bottom: 9px;
  height: 9px;
  z-index: -1;
  background-color: var(--paint);
  opacity: 0;
  -webkit-mask: url("assets/wash.svg") center / 100% 100% no-repeat;
  mask: url("assets/wash.svg") center / 100% 100% no-repeat;
  transition: opacity 0.2s ease;
}
.navi-in > ul > li > a:hover::after,
.navi-in > ul > li.current-menu-item > a::after,
.navi-in > ul > li.current-post-ancestor > a::after,
.navi-in > ul > li.current-menu-parent > a::after { opacity: 0.7; }
.navi-in > ul .sub-menu { background-color: var(--rg-sheet); box-shadow: 0 6px 18px rgba(46, 58, 64, 0.12); }

/* ---------- 3. トップのヒーロー（tmp-user/main-before.php） ---------- */
.rg-hero {
  max-width: 1256px;
  margin: 8px auto 0;
  padding: 0 16px;
}
.rg-hero__art {
  display: block;
  margin: 0 auto;
  max-width: 1180px;
}
.rg-hero__art img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1600 / 893;
}
.rg-hero__text {
  position: relative;
  max-width: 760px;
  margin: -64px auto 0;
  text-align: center;
}
.rg-hero__title {
  font-family: var(--rg-hand);
  font-weight: 600;
  font-size: clamp(28px, 4.4vw, 46px);
  line-height: 1.45;
  letter-spacing: 0.03em;
  margin: 0 0 0.5em;
  color: var(--rg-ink);
}
.rg-hero__lead {
  font-size: 16px;
  line-height: 2;
  color: var(--rg-ink-soft);
  margin: 0 auto;
  max-width: 34em;
}
.rg-shelf {
  max-width: 980px;
  margin: 36px auto 0;
  text-align: center;
}
.rg-shelf__title {
  font-family: var(--rg-hand);
  font-weight: 600;
  font-size: 18px;
  margin: 0 0 14px;
  color: var(--rg-ink);
}
.rg-shelf__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
}
.rg-swatch {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
  padding: 14px 26px 15px;
  font-family: var(--rg-hand);
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
}
.body .rg-swatch { color: var(--rg-ink); }
.rg-swatch::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--paint);
  opacity: 0.42;
  -webkit-mask: url("assets/dab.svg") center / 100% 100% no-repeat;
  mask: url("assets/dab.svg") center / 100% 100% no-repeat;
  transition: opacity 0.2s ease;
}
.rg-swatch:hover::before { opacity: 0.7; }
.rg-swatch__count { font-family: inherit; font-weight: 400; font-size: 13px; color: var(--rg-ink-soft); }

/* ヒーローの一回だけの動き：絵の具が紙に広がるように現れる */
@media (prefers-reduced-motion: no-preference) {
  .rg-hero__art img { animation: rg-bloom 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  @keyframes rg-bloom {
    from { opacity: 0; filter: blur(10px) saturate(0.6); transform: scale(0.985); }
    to { opacity: 1; filter: none; transform: none; }
  }
}

/* ---------- 4. レイアウト（メイン＋サイドバー） ---------- */
.content { margin-top: 28px; }
.content-in { flex-wrap: nowrap; gap: 20px; }
.main { min-width: 0; padding: 20px 24px 36px; border: 0; }
.sidebar { border: 0; padding: 20px 12px; }

/* ---------- 5. 記事一覧（カード） ---------- */
.front-top-page #list::before {
  content: "新しい記事";
  grid-column: 1 / -1;
  font-family: var(--rg-hand);
  font-weight: 600;
  font-size: 22px;
  color: var(--rg-ink);
  margin: 0 0 4px;
}
#list.ect-entry-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px 28px;
  align-items: start;
  grid-auto-flow: row dense;
}
/* カード以外（広告・見出しなど）は必ず全幅に逃がす */
#list.ect-entry-card > :not(.entry-card-wrap) { grid-column: 1 / -1; min-width: 0; }

#list .entry-card-wrap {
  padding: 0;
  margin: 0;
  min-width: 0;
  background: none;
  border: 0;
}
#list .entry-card-wrap:hover { background: none; }
#list .entry-card { display: block; }
#list .entry-card-thumb {
  float: none;
  width: 100%;
  margin: 0 0 14px;
  -webkit-mask: url("assets/edge.svg") center / 100% 100% no-repeat;
  mask: url("assets/edge.svg") center / 100% 100% no-repeat;
}
#list .entry-card-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
#list .entry-card-thumb .cat-label { display: none; }
#list .entry-card-content { margin: 0; padding: 0 4px; }
#list .entry-card-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.6;
  margin: 0 0 8px;
  color: var(--rg-ink);
}
#list .entry-card-wrap:hover .entry-card-title { text-decoration: underline; text-decoration-color: var(--paint, var(--rg-sage)); text-decoration-thickness: 2px; text-underline-offset: 5px; }
#list .entry-card-snippet {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.8;
  color: var(--rg-ink-soft);
  margin-bottom: 10px;
}
#list .entry-card-meta {
  position: static;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row-reverse;
  gap: 8px;
}
#list .e-card-info { font-size: 13px; color: var(--rg-ink-soft); }
#list .e-card-info .fa { display: none; }
#list .entry-card-categorys { display: block; }

/* カテゴリの色だまり（一覧・記事ヘッダー共通） */
.entry-category,
.cat-link {
  position: relative;
  isolation: isolate;
  display: inline-block;
  padding: 3px 13px 4px;
  font-family: var(--rg-hand);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.5;
  color: var(--rg-ink);
  background: none;
  border: 0;
  border-radius: 0;
}
.entry-category::before,
.cat-link::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--paint);
  opacity: 0.5;
  -webkit-mask: url("assets/dab.svg") center / 100% 100% no-repeat;
  mask: url("assets/dab.svg") center / 100% 100% no-repeat;
}
.body .cat-link { color: var(--rg-ink); }
.body .cat-link:hover { color: var(--rg-ink); }
.cat-link .fa { display: none; }

/* ページ送り */
.pagination-next-link {
  font-family: var(--rg-hand);
  font-weight: 600;
  background-color: var(--rg-sheet);
  border: 1.5px solid var(--rg-ink);
  border-radius: 999px;
  color: var(--rg-ink);
}
.pagination-next-link:hover { background-color: var(--rg-ink); color: var(--rg-paper); }
.page-numbers { border-color: var(--rg-rule); border-radius: 50%; background-color: var(--rg-sheet); }
.pagination .current { background-color: var(--rg-ink); color: var(--rg-paper); border-color: var(--rg-ink); }
.pagination a:hover { background-color: var(--rg-paper); }

/* ---------- 6. 記事ページ ---------- */
.single .main,
.page .main { background-color: var(--rg-sheet); border-radius: 4px; padding: 36px 44px 44px; }

.article .entry-title {
  font-family: var(--rg-hand);
  font-weight: 600;
  font-size: 30px;
  line-height: 1.55;
  letter-spacing: 0.02em;
  margin: 0.2em 0 0.6em;
  padding: 0;
  color: var(--rg-ink);
}
.date-tags { text-align: left; line-height: 1.6; color: var(--rg-ink-soft); font-size: 14px; margin-bottom: 1.4em; }
.eye-catch-wrap { margin-bottom: 1.6em; }
.eye-catch {
  -webkit-mask: url("assets/edge.svg") center / 100% 100% no-repeat;
  mask: url("assets/edge.svg") center / 100% 100% no-repeat;
}
.eye-catch img { display: block; }
.eye-catch .cat-label { display: none; }

.article .entry-content { font-size: 17px; line-height: 2; }
.article .entry-content > p { margin-bottom: 1.6em; }

.article h2 {
  position: relative;
  isolation: isolate;
  font-family: var(--rg-hand);
  font-weight: 600;
  font-size: 25px;
  line-height: 1.6;
  color: var(--rg-ink);
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0.55em 0.9em 0.6em;
  margin: 2.8em -0.4em 1.1em;
}
.article h2::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--paint);
  opacity: 0.42;
  -webkit-mask: url("assets/wash.svg") center / 100% 100% no-repeat;
  mask: url("assets/wash.svg") center / 100% 100% no-repeat;
}
.article h3 {
  position: relative;
  font-family: var(--rg-hand);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.6;
  color: var(--rg-ink);
  border: 0;
  border-bottom: 1.5px dashed var(--rg-rule);
  padding: 0.3em 0 0.4em 1.5em;
  margin: 2.2em 0 1em;
}
.article h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 1.05em;
  height: 0.8em;
  background-color: var(--paint);
  opacity: 0.75;
  -webkit-mask: url("assets/dab.svg") center / 100% 100% no-repeat;
  mask: url("assets/dab.svg") center / 100% 100% no-repeat;
}
.article h4 { font-family: var(--rg-hand); font-weight: 600; font-size: 18px; border: 0; padding: 0; margin: 1.8em 0 0.6em; }

.article .entry-content strong { background: linear-gradient(transparent 62%, rgba(230, 180, 85, 0.38) 62%); font-weight: 700; }

.article .wp-block-image img { border-radius: 4px; }

/* 目次：学生のノートの罫線 */
.article .toc {
  display: block;
  width: 100%;
  max-width: 640px;
  margin: 2.4em auto;
  padding: 8px 1.6em 16px 2.6em;
  border: 0;
  border-radius: 4px;
  font-size: 15px;
  line-height: 32px;
  background-color: #FDFDFA;
  background-image:
    linear-gradient(90deg, transparent 1.6em, rgba(229, 154, 147, 0.55) 1.6em, rgba(229, 154, 147, 0.55) calc(1.6em + 1px), transparent calc(1.6em + 1px)),
    repeating-linear-gradient(180deg, transparent 0 31px, rgba(134, 174, 203, 0.38) 31px 32px);
  background-position: 0 0, 0 8px;
  box-shadow: 0 1px 0 var(--rg-rule), 0 10px 24px -14px rgba(46, 58, 64, 0.35);
}
.article .toc-title {
  font-family: var(--rg-hand);
  font-weight: 600;
  font-size: 19px;
  line-height: 32px;
  text-align: left;
  padding: 0;
}
.article .toc-content,
.article .toc .toc-list,
.article .toc li { margin: 0; line-height: 32px; }
.article .toc a { color: var(--rg-ink); }
.article .toc a:hover { color: var(--rg-link); }
.article .toc .toc-list { padding-left: 1.2em; }

/* 表 */
.article .wp-block-table table { border-collapse: collapse; font-size: 15px; line-height: 1.7; background-color: var(--rg-sheet); }
.article .wp-block-table th,
.article .wp-block-table td { border: 1px solid var(--rg-rule); padding: 0.7em 0.9em; }
.article .wp-block-table thead th,
.article .wp-block-table tr:first-child th { background-color: color-mix(in srgb, var(--paint) 22%, #fff); font-weight: 700; color: var(--rg-ink); }
.article .wp-block-table tbody tr:nth-child(even) td { background-color: #FAFBF7; }
.article .wp-block-table thead { border-bottom: 0; }

/* 記事下（カテゴリ・タグ・SNS） */
.entry-categories-tags { margin-top: 2.4em; }
.tag-link {
  border: 1px solid var(--rg-rule);
  border-radius: 999px;
  background-color: var(--rg-paper);
  color: var(--rg-ink-soft);
  font-size: 13px;
  padding: 3px 12px;
}
.body .tag-link:hover { background-color: var(--rg-sheet); color: var(--rg-ink); }
.sns-share-message,
.sns-follow-message { font-family: var(--rg-hand); font-weight: 600; color: var(--rg-ink); }

/* 関連記事・前後記事 */
.related-entry-heading,
.comment-title { font-family: var(--rg-hand); font-weight: 600; font-size: 20px; background: none; border: 0; padding: 0; }
.related-entry-card-wrap.a-wrap,
.prev-post.a-wrap,
.next-post.a-wrap { border-radius: 4px; }
.related-entry-card-wrap.a-wrap:hover,
.pager-post-navi a.a-wrap:hover { background-color: var(--rg-paper); }

/* ---------- 7. サイドバー ---------- */
.sidebar h2,
.sidebar h3 {
  font-family: var(--rg-hand);
  font-weight: 600;
  font-size: 18px;
  color: var(--rg-ink);
  background: none;
  padding: 0 0 6px;
  margin: 8px 0 12px;
  border-bottom: 1.5px dashed var(--rg-rule);
  border-radius: 0;
}
.sidebar .widget { margin-bottom: 2.2em; }
.sidebar .wp-block-latest-posts__list li { padding: 0.55em 0; border-bottom: 1px solid var(--rg-rule); line-height: 1.6; font-size: 15px; }
.sidebar .wp-block-latest-posts__list a { color: var(--rg-ink); text-decoration: none; }
.sidebar .wp-block-latest-posts__list a:hover { color: var(--rg-link); text-decoration: underline; }
.sidebar .wp-block-search__input { border: 1.5px solid var(--rg-rule); border-radius: 999px; padding: 0.55em 1em; background-color: var(--rg-sheet); }
.sidebar .wp-block-search__button { border: 0; border-radius: 999px; background-color: var(--rg-ink); color: var(--rg-paper); font-family: var(--rg-hand); font-weight: 600; padding: 0.55em 1.2em; margin-left: 6px; }
.sidebar .wp-block-search__label { display: none; }

/* ---------- 8. フッター ---------- */
.footer {
  position: relative;
  margin-top: 64px;
  padding: 40px 0 16px;
  background-color: #EEF1E8;
}
.footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -26px;
  height: 46px;
  background-color: #EEF1E8;
  -webkit-mask: url("assets/wash.svg") center / 100% 100% no-repeat;
  mask: url("assets/wash.svg") center / 100% 100% no-repeat;
}
.footer-bottom-logo .site-name-text { font-family: var(--rg-hand); font-weight: 600; }
.navi-footer-in a { color: var(--rg-ink); }
.navi-footer-in a:hover { background-color: transparent; text-decoration: underline; }
.navi-footer-in > .menu-footer li,
.navi-footer-in > .menu-footer li:last-child { border-color: var(--rg-rule); }
.copyright { color: var(--rg-ink-soft); }

/************************************
** 既存：YouTube等の埋め込み動画を本文幅いっぱいに表示（Cocoon標準は最大640px左寄せ）
************************************/
.video-container,
.wp-block-embed .video-container {
  max-width: 100%;
}
.wp-block-embed__wrapper::before {
  content: none;
  padding-top: 0;
}

/************************************
** レスポンシブ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  .content-in { display: block; }
  .main { padding: 16px 20px 28px; }
  .sidebar { padding: 16px 20px; }
  .single .main,
  .page .main { padding: 28px 28px 36px; }
  .rg-hero__text { margin-top: -40px; }
}

/*834px以下*/
@media screen and (max-width: 834px){
  .header-container .header-in { padding: 16px 0 4px; }
  .site-name-text { font-size: 24px; }
  .rg-hero { padding: 0; }
  .rg-hero__text { margin-top: -18px; padding: 0 16px; }
  .rg-hero__lead { font-size: 15px; text-align: left; }
  .rg-shelf { margin-top: 26px; padding: 0 12px; }
  .article .entry-title { font-size: 25px; }
  .article h2 { font-size: 22px; margin-left: -0.3em; margin-right: -0.3em; }
  .article h3 { font-size: 19px; }
}

/*480px以下*/
@media screen and (max-width: 480px){
  .main { padding: 12px 16px 24px; }
  .single .main,
  .page .main { padding: 20px 16px 28px; border-radius: 0; }
  #list.ect-entry-card { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  #list .entry-card-title { font-size: 17px; }
  .rg-swatch { padding: 11px 18px 12px; font-size: 15px; }
  .rg-hero__title { font-size: 23px; }
  .navi-in > ul li { height: 40px; }
  .article .entry-title { font-size: 22px; }
  .article .entry-content { font-size: 16px; line-height: 1.95; }
  .article h2 { font-size: 20px; padding: 0.5em 0.7em; }
  .article h3 { font-size: 18px; }
  .article .toc { padding-left: 2.3em; padding-right: 1em; }
}
