@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
*/

/* ==============================
   知っとく。共通デザイン
   ============================== */
:root {
  --st-navy: #173B57;
  --st-navy-deep: #102B41;
  --st-teal: #2BB7A9;
  --st-teal-dark: #168D82;
  --st-teal-soft: #E8F8F5;
  --st-bg: #F5F8FA;
  --st-surface: #FFFFFF;
  --st-text: #263746;
  --st-muted: #687784;
  --st-border: #DDE7EE;
  --st-shadow: 0 10px 30px rgba(23, 59, 87, 0.08);
  --st-shadow-hover: 0 16px 38px rgba(23, 59, 87, 0.13);
  --st-radius-lg: 22px;
  --st-radius-md: 16px;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--st-bg);
  color: var(--st-text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  letter-spacing: .01em;
}

a {
  text-underline-offset: .18em;
}

.wrap {
  max-width: 1180px;
}

/* ヘッダー */
.header-container {
  background: rgba(255,255,255,.98);
  border-bottom: 1px solid var(--st-border);
}

.header-container-in {
  box-shadow: none;
}

#header-in {
  padding-top: 13px;
  padding-bottom: 13px;
}

.logo-header img,
.header-site-logo-image {
  width: auto;
  max-height: 58px;
}

.navi {
  background: var(--st-surface);
  border-top: 1px solid #EEF3F6;
}

.navi-in > ul {
  display: flex;
  justify-content: center;
  gap: 7px;
}

.navi-in > ul > li > a {
  color: var(--st-navy);
  font-weight: 700;
  border-radius: 999px;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.navi-in > ul > li > a:hover,
.navi-in > ul > li.current-menu-item > a,
.navi-in > ul > li.current-menu-ancestor > a {
  background: var(--st-teal-soft);
  color: var(--st-teal-dark);
  transform: translateY(-1px);
}

/* サイト全体の外枠 */
#content {
  margin-top: 30px;
}

.content-in {
  gap: 30px;
}

.main {
  background: var(--st-surface);
  border: 1px solid rgba(221,231,238,.95);
  border-radius: var(--st-radius-lg);
  box-shadow: var(--st-shadow);
  padding: clamp(25px, 3vw, 44px);
}

.sidebar .widget {
  background: var(--st-surface);
  border: 1px solid var(--st-border);
  border-radius: var(--st-radius-md);
  box-shadow: 0 7px 22px rgba(23,59,87,.06);
  padding: 20px;
  margin-bottom: 22px;
}

.sidebar .widget-title,
.sidebar .widget-sidebar-title {
  color: var(--st-navy);
  font-size: 1.05rem;
  border: 0;
  padding: 0 0 12px;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--st-teal-soft);
}

/* ボタン・カード */
.wp-block-button__link,
.search-submit,
button,
input[type="submit"] {
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.wp-block-button__link:hover,
.search-submit:hover,
button:hover,
input[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(23,59,87,.12);
}

.entry-content .wp-block-group.has-background.has-border-color {
  border-color: var(--st-border) !important;
  box-shadow: 0 8px 24px rgba(23,59,87,.055);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.entry-content .wp-block-group.has-background.has-border-color:hover {
  transform: translateY(-2px);
  box-shadow: var(--st-shadow-hover);
  border-color: #C9DCE7 !important;
}

/* ==============================
   トップページ
   ============================== */
body.home #content {
  margin-top: 24px;
}

body.home #content-in {
  display: block;
  max-width: 1180px;
}

body.home #main {
  width: 100%;
  max-width: none;
  padding: clamp(28px, 4vw, 56px);
}

body.home #sidebar {
  display: none;
}

body.home .article-header,
body.home .article-footer {
  display: none;
}

body.home .entry-content > .wp-block-group {
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-top: 10px !important;
}

body.home .entry-content h2 {
  color: var(--st-navy) !important;
  letter-spacing: .02em;
  line-height: 1.4;
}

body.home .entry-content > .wp-block-group > h2:first-child {
  font-size: clamp(1.85rem, 4vw, 2.65rem) !important;
  margin-top: 0;
  margin-bottom: 10px;
}

body.home .entry-content > .wp-block-group > h2:first-child + p {
  font-size: 1.03rem;
  line-height: 1.9;
}

/* 検索 */
body.home .wp-block-search {
  max-width: 760px;
  margin: 0 auto;
}

body.home .wp-block-search__inside-wrapper {
  background: #fff;
  border: 2px solid #CFDDE6 !important;
  border-radius: 18px;
  padding: 7px;
  box-shadow: 0 10px 28px rgba(23,59,87,.08);
  transition: border-color .2s ease, box-shadow .2s ease;
}

body.home .wp-block-search__inside-wrapper:focus-within {
  border-color: var(--st-teal) !important;
  box-shadow: 0 12px 30px rgba(43,183,169,.14);
}

body.home .wp-block-search__input {
  border: 0 !important;
  box-shadow: none !important;
  min-height: 50px;
  font-size: 1rem;
  padding-left: 16px;
}

body.home .wp-block-search__button {
  border-radius: 12px;
  border: 0;
  background: var(--st-navy);
  color: #fff;
  min-width: 52px;
}

/* カテゴリカード */
body.home .wp-block-columns {
  gap: 18px;
  align-items: stretch;
}

body.home .wp-block-column {
  display: flex;
}

body.home .wp-block-column > .wp-block-group {
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

body.home .wp-block-column > .wp-block-group h3 {
  margin-top: 0;
  font-size: 1.3rem;
}

body.home .wp-block-column > .wp-block-group .wp-block-buttons {
  margin-top: auto;
  padding-top: 10px;
}

body.home .wp-block-column > .wp-block-group .wp-block-button__link {
  background: var(--st-navy) !important;
  border-radius: 11px !important;
  font-weight: 700;
  padding: .72em 1.18em;
}

body.home .wp-block-column > .wp-block-group .wp-block-button__link:hover {
  background: var(--st-teal) !important;
}

/* 困りごと・おすすめ一覧 */
body.home .entry-content h2 + ul.wp-block-list {
  list-style: none;
  padding-left: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
}

body.home .entry-content h2 + ul.wp-block-list > li {
  margin: 0;
  background: #FBFDFE;
  border: 1px solid var(--st-border);
  border-radius: 14px;
  padding: 15px 17px;
  line-height: 1.8;
  transition: border-color .2s ease, background-color .2s ease;
}

body.home .entry-content h2 + ul.wp-block-list > li:hover {
  border-color: #C7DDE7;
  background: #F7FBFC;
}

body.home .entry-content h2 + ul.wp-block-list > li > strong {
  color: var(--st-navy);
}

body.home .entry-content h2 + ul.wp-block-list a {
  color: #176B78;
  font-weight: 650;
  text-decoration-thickness: 1px;
}

/* 新着記事 */
body.home .wp-block-latest-posts.is-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 16px;
  margin: 0;
}

body.home .wp-block-latest-posts.is-grid > li {
  width: auto;
  margin: 0;
  background: #fff;
  border: 1px solid var(--st-border);
  border-radius: 15px;
  padding: 18px;
  box-shadow: 0 6px 18px rgba(23,59,87,.05);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

body.home .wp-block-latest-posts.is-grid > li:hover {
  transform: translateY(-3px);
  border-color: #C8DCE6;
  box-shadow: 0 12px 28px rgba(23,59,87,.10);
}

body.home .wp-block-latest-posts__post-title {
  color: var(--st-navy);
  font-weight: 750;
  line-height: 1.6;
  text-decoration: none;
}

body.home .wp-block-latest-posts__post-date {
  margin-top: 12px;
  color: var(--st-muted);
  font-size: .82rem;
}

/* ==============================
   記事・固定ページ
   ============================== */
body.single .entry-title,
body.page:not(.home) .entry-title,
body.archive .archive-title {
  color: var(--st-navy);
  line-height: 1.45;
}

body.single .entry-content,
body.page:not(.home) .entry-content {
  color: var(--st-text);
}

body.single .entry-content h2,
body.page:not(.home) .entry-content h2 {
  color: var(--st-navy);
  border-left-color: var(--st-teal);
}

body.single .entry-content h3,
body.page:not(.home) .entry-content h3 {
  color: var(--st-navy-deep);
}

body.single .toc,
body.page:not(.home) .toc {
  border-color: var(--st-border);
  border-radius: 14px;
  background: #FAFCFD;
}

.popular-entry-card-link {
  border-radius: 12px;
  transition: background-color .2s ease, transform .2s ease;
}

.popular-entry-card-link:hover {
  background: #F7FAFC;
  transform: translateX(2px);
}

/* フッター */
.footer {
  margin-top: 48px;
}

.footer-bottom {
  color: #71808D;
}

/* ==============================
   タブレット
   ============================== */
@media screen and (max-width: 1023px) {
  #content {
    margin-top: 20px;
  }

  .main {
    border-radius: 18px;
  }

  body.home .wp-block-latest-posts.is-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

/* ==============================
   スマホ
   ============================== */
@media screen and (max-width: 834px) {
  body {
    background: #fff;
  }

  #header-in {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .logo-header img,
  .header-site-logo-image {
    max-height: 46px;
  }

  #content {
    margin-top: 10px;
  }

  .main {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 20px 16px;
  }

  body.home #main {
    padding: 22px 16px 36px;
  }

  body.home .wp-block-columns {
    gap: 14px;
  }

  body.home .entry-content h2 + ul.wp-block-list {
    grid-template-columns: 1fr;
  }

  body.home .wp-block-latest-posts.is-grid {
    grid-template-columns: 1fr;
  }

  .sidebar .widget {
    border-radius: 14px;
  }
}

@media screen and (max-width: 480px) {
  body.home .entry-content > .wp-block-group > h2:first-child {
    font-size: 1.65rem !important;
  }

  body.home .wp-block-search__inside-wrapper {
    border-radius: 14px;
  }

  body.home .wp-block-column > .wp-block-group {
    padding: 20px !important;
  }
}

/* ==============================
   第2弾：メディアとしての仕上げ
   ============================== */

@media screen and (min-width: 835px) {
  #header-container {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: saturate(140%) blur(10px);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
  }
}

body.home .entry-content h2:not(.has-text-align-center) {
  position: relative;
  padding-left: 18px !important;
  margin-top: 46px;
  margin-bottom: 20px;
}

body.home .entry-content h2:not(.has-text-align-center)::before {
  content: "";
  position: absolute;
  left: 0;
  top: .16em;
  width: 5px;
  height: 1.15em;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--st-teal), var(--st-navy));
}

body.home .wp-block-columns .wp-block-column > .wp-block-group {
  position: relative;
  overflow: hidden;
}

body.home .wp-block-columns .wp-block-column > .wp-block-group::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--st-teal), var(--st-navy));
}

body.home .wp-block-columns .wp-block-column > .wp-block-group p {
  line-height: 1.8;
}

.breadcrumb {
  color: var(--st-muted);
  font-size: .84rem;
  margin-bottom: 14px;
}

.breadcrumb a {
  color: #557083;
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--st-teal-dark);
}

body.single .article-header {
  margin-bottom: 28px;
}

body.single .entry-title {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 800;
  letter-spacing: .01em;
  margin-bottom: 16px;
}

body.single .date-tags {
  color: var(--st-muted);
  font-size: .85rem;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

body.single .date-tags > span {
  background: #F6F9FB;
  border: 1px solid var(--st-border);
  border-radius: 999px;
  padding: 5px 9px;
}

body.single .eye-catch {
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(23,59,87,.10);
}

body.single .eye-catch img {
  display: block;
  width: 100%;
}

body.single .cat-label {
  border-radius: 999px;
  padding: 6px 11px;
  background: var(--st-navy);
  color: #fff;
  font-weight: 700;
}

body.single .entry-content {
  line-height: 2;
}

body.single .entry-content > p,
body.single .entry-content > ul,
body.single .entry-content > ol {
  margin-bottom: 1.35em;
}

body.single .entry-content h2 {
  margin-top: 2.6em;
  margin-bottom: 1em;
  padding: .8em 1em .8em 1.05em;
  border-left: 5px solid var(--st-teal);
  border-radius: 0 12px 12px 0;
  background: linear-gradient(90deg, #F0FAF8 0%, #F8FBFC 70%, #FFFFFF 100%);
  box-shadow: none;
}

body.single .entry-content h3 {
  margin-top: 2em;
  margin-bottom: .8em;
  padding-bottom: .45em;
  border-bottom: 2px solid var(--st-border);
}

body.single .entry-content h4 {
  color: var(--st-navy);
  margin-top: 1.7em;
}

body.single .toc {
  margin: 34px auto;
  padding: 20px 22px;
  border: 1px solid var(--st-border);
  border-radius: 16px;
  background: #F9FCFD;
  box-shadow: 0 6px 20px rgba(23,59,87,.05);
}

body.single .toc-title {
  color: var(--st-navy);
  font-weight: 800;
  letter-spacing: .04em;
}

body.single .toc-list a {
  color: #35576E;
  text-decoration: none;
}

body.single .toc-list a:hover {
  color: var(--st-teal-dark);
}

body.single .wp-block-table {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--st-border);
}

body.single .wp-block-table table {
  margin: 0;
}

body.single .wp-block-table th {
  background: var(--st-navy);
  color: #fff;
  font-weight: 700;
}

body.single .wp-block-table th,
body.single .wp-block-table td {
  padding: 13px 14px;
  border-color: var(--st-border);
}

body.single .wp-block-table tbody tr:nth-child(even) {
  background: #F8FBFC;
}

body.single .block-box {
  border-radius: 14px;
  border-color: #BFE7E1;
  background: #F1FAF8;
  padding: 18px 20px;
}

.related-entries {
  margin-top: 44px;
}

.related-entry-heading {
  color: var(--st-navy);
  font-size: 1.3rem;
  border-bottom: 2px solid var(--st-teal-soft);
  padding-bottom: 10px;
}

.related-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
}

.related-entry-card-wrap {
  border: 1px solid var(--st-border) !important;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  transition: transform .2s ease, box-shadow .2s ease;
}

.related-entry-card-wrap:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(23,59,87,.09);
}

body.archive #main {
  padding-top: 34px;
}

body.archive .archive-title {
  font-size: clamp(1.65rem, 3vw, 2.1rem);
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--st-teal-soft);
}

body.archive #list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 18px;
}

body.archive .entry-card-wrap {
  margin: 0;
  border: 1px solid var(--st-border);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 18px rgba(23,59,87,.05);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

body.archive .entry-card-wrap:hover {
  transform: translateY(-3px);
  border-color: #C8DCE6;
  box-shadow: 0 12px 28px rgba(23,59,87,.10);
}

body.archive .entry-card {
  display: block;
}

body.archive .entry-card-thumb {
  width: 100%;
  max-width: none;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

body.archive .entry-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.archive .entry-card-content {
  padding: 16px 17px 17px;
}

body.archive .entry-card-title {
  color: var(--st-navy);
  font-size: 1.02rem;
  line-height: 1.65;
  margin-bottom: 9px;
}

body.archive .entry-card-snippet {
  color: var(--st-muted);
  font-size: .86rem;
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.archive .entry-card-meta {
  margin-top: 12px;
}

.sidebar .popular-entry-card-link {
  padding: 8px;
  margin: 0 -6px 5px;
}

.sidebar .popular-entry-card-thumb {
  border-radius: 10px;
  overflow: hidden;
}

.sidebar .popular-entry-card-title {
  color: var(--st-navy);
  line-height: 1.55;
}

#block-5 h2 {
  font-size: 0;
}

#block-5 h2::after {
  content: "月別アーカイブ";
  font-size: 1.05rem;
}

#footer {
  background: var(--st-navy-deep);
  color: rgba(255,255,255,.82);
  border-top: 0;
  padding-top: 34px;
}

#footer .footer-in {
  max-width: 1180px;
}

#footer .footer-site-logo-image {
  filter: brightness(0) invert(1);
  opacity: .95;
  max-height: 48px;
  width: auto;
}

#footer .navi-footer a {
  color: rgba(255,255,255,.82);
  text-decoration: none;
}

#footer .navi-footer a:hover {
  color: #fff;
}

#footer .copyright {
  color: rgba(255,255,255,.58);
  font-size: .8rem;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(43,183,169,.38);
  outline-offset: 3px;
}

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

@media screen and (max-width: 834px) {
  #header-container {
    position: static;
  }

  body.single .entry-title {
    font-size: 1.65rem;
  }

  body.single .eye-catch {
    border-radius: 14px;
  }

  body.single .entry-content h2 {
    padding: .72em .8em;
    margin-top: 2.2em;
  }

  .related-list {
    grid-template-columns: 1fr;
  }

  #footer {
    margin-top: 28px;
  }

  #footer .footer-bottom {
    text-align: center;
  }
}

@media screen and (max-width: 480px) {
  body.archive .entry-card-content {
    padding: 14px 15px 16px;
  }

  body.single .toc {
    padding: 16px;
    border-radius: 13px;
  }

  body.single .wp-block-table th,
  body.single .wp-block-table td {
    padding: 10px 11px;
    font-size: .9rem;
  }
}

/* ==============================
   第3弾：ブランド感・スマホUI強化
   ============================== */

/* トップのファーストビュー */
body.home .entry-content > .wp-block-group:first-child {
  position: relative;
  overflow: hidden;
  padding-top: 44px !important;
  padding-bottom: 44px !important;
  border: 1px solid #DCEAEF;
  border-radius: 24px;
  background:
    radial-gradient(circle at 8% 15%, rgba(43,183,169,.13), transparent 28%),
    radial-gradient(circle at 92% 0%, rgba(23,59,87,.08), transparent 28%),
    linear-gradient(180deg, #FFFFFF 0%, #F8FCFD 100%);
  box-shadow: 0 12px 34px rgba(23,59,87,.065);
}

body.home .entry-content > .wp-block-group:first-child::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -100px;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(43,183,169,.14);
  border-radius: 50%;
  box-shadow:
    0 0 0 24px rgba(43,183,169,.035),
    0 0 0 52px rgba(23,59,87,.025);
  pointer-events: none;
}

body.home .entry-content > .wp-block-group:first-child > * {
  position: relative;
  z-index: 1;
}

body.home .entry-content > .wp-block-group:first-child > h2:first-child {
  font-weight: 850;
  letter-spacing: .01em;
}

body.home .entry-content > .wp-block-group:first-child > h2:first-child::after {
  content: "「知っておけばよかった」を減らす。";
  display: block;
  margin-top: 12px;
  color: var(--st-teal-dark);
  font-size: .43em;
  font-weight: 750;
  letter-spacing: .06em;
}

/* 検索欄をさらに主役へ */
body.home .wp-block-search__inside-wrapper {
  min-height: 66px;
}

body.home .wp-block-search__button {
  width: 54px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.home .wp-block-search__button svg {
  width: 23px;
  height: 23px;
}

/* 5カテゴリを色で識別 */
body.home .wp-block-group:has(a[href*="/category/health/"]) {
  --cat-accent: #42A87A;
  --cat-soft: #ECF8F1;
}

body.home .wp-block-group:has(a[href*="/category/money/"]) {
  --cat-accent: #D39A29;
  --cat-soft: #FFF8E8;
}

body.home .wp-block-group:has(a[href*="/category/work/"]) {
  --cat-accent: #5478C9;
  --cat-soft: #EFF4FF;
}

body.home .wp-block-group:has(a[href*="/category/life/"]) {
  --cat-accent: #D7775F;
  --cat-soft: #FFF1ED;
}

body.home .wp-block-group:has(a[href*="/category/digital/"]) {
  --cat-accent: #6D63C7;
  --cat-soft: #F2F0FF;
}

body.home .wp-block-column > .wp-block-group:has(a[href*="/category/"])::before {
  background: var(--cat-accent);
}

body.home .wp-block-column > .wp-block-group:has(a[href*="/category/"]) h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.home .wp-block-column > .wp-block-group:has(a[href*="/category/"]) h3::before {
  content: "";
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border-radius: 50%;
  background: var(--cat-accent);
  box-shadow: 0 0 0 5px var(--cat-soft);
}

body.home .wp-block-column > .wp-block-group:has(a[href*="/category/"]) .wp-block-button__link {
  background: var(--cat-accent) !important;
  box-shadow: 0 5px 14px color-mix(in srgb, var(--cat-accent) 22%, transparent);
}

body.home .wp-block-column > .wp-block-group:has(a[href*="/category/"]):hover {
  background:
    linear-gradient(180deg, #FFFFFF 0%, var(--cat-soft) 180%);
}

/* トップのセクション間隔 */
body.home .entry-content .wp-block-spacer {
  max-height: 38px;
}

body.home .entry-content h2.has-text-align-center:not(:first-child) {
  margin-top: 42px;
}

body.home .entry-content h2 + p.has-text-align-center {
  line-height: 1.8;
}

/* 困りごとカードをタップしやすく */
body.home .entry-content h2 + ul.wp-block-list > li {
  min-height: 82px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  align-content: center;
  column-gap: 4px;
}

body.home .entry-content h2 + ul.wp-block-list > li > strong {
  width: 100%;
  display: block;
  margin-bottom: 3px;
}

/* 新着記事に見出し感を追加 */
body.home .wp-block-latest-posts.is-grid > li {
  position: relative;
  padding-top: 22px;
}

body.home .wp-block-latest-posts.is-grid > li::before {
  content: "NEW";
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 8px;
  color: var(--st-teal-dark);
  background: var(--st-teal-soft);
  border-radius: 999px;
  font-size: .69rem;
  font-weight: 800;
  letter-spacing: .08em;
}

/* トップ最下部の紹介カード */
body.home .entry-content > .wp-block-group:first-child > .wp-block-group:last-child {
  border-radius: 18px !important;
}

/* カテゴリ一覧のカテゴリラベル */
body.archive .entry-card-categorys .entry-category,
body.archive .entry-card-thumb .cat-label {
  border-radius: 999px;
  padding: 4px 9px;
  font-size: .73rem;
  font-weight: 700;
}

/* 記事内リンク */
body.single .entry-content a {
  color: #176D78;
  text-decoration-color: rgba(23,109,120,.35);
  text-decoration-thickness: 1px;
  transition: color .18s ease, text-decoration-color .18s ease;
}

body.single .entry-content a:hover {
  color: var(--st-teal-dark);
  text-decoration-color: var(--st-teal-dark);
}

/* 記事末尾タグを整理 */
body.single .entry-categories-tags {
  margin-top: 38px;
  padding-top: 20px;
  border-top: 1px solid var(--st-border);
}

body.single .entry-categories-tags a {
  display: inline-flex;
  align-items: center;
  margin: 4px 5px 4px 0;
  padding: 6px 10px;
  border: 1px solid var(--st-border);
  border-radius: 999px;
  background: #FAFCFD;
  color: #526B7A;
  font-size: .78rem;
  text-decoration: none;
}

/* サイドバーの人気記事順位を見やすく */
.sidebar .popular-entry-card-link::before {
  border-radius: 8px 0 8px 0;
}

.sidebar .popular-entry-card-link + .popular-entry-card-link {
  border-top: 1px solid #EEF3F5;
}

/* フッター */
#footer .footer-bottom {
  display: flex;
  align-items: center;
  gap: 36px;
  padding-top: 24px;
  padding-bottom: 28px;
}

#footer .footer-bottom-logo {
  flex: 0 0 auto;
}

#footer .footer-bottom-content {
  flex: 1;
}

#footer .menu-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-bottom: 10px;
}

#footer .menu-footer li {
  margin: 0;
}

#footer .menu-footer a {
  font-size: .86rem;
}

/* スマホ下部ナビ */
@media screen and (max-width: 834px) {
  .mobile-footer-menu-buttons {
    min-height: 64px;
    padding: 5px 6px max(5px, env(safe-area-inset-bottom));
    background: rgba(255,255,255,.96);
    border-top: 1px solid var(--st-border);
    box-shadow: 0 -8px 24px rgba(23,59,87,.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .mobile-footer-menu-buttons .menu-button {
    margin: 0;
  }

  .mobile-footer-menu-buttons .menu-button-in {
    color: #536A79;
    border-radius: 12px;
    padding: 6px 3px;
    transition: color .18s ease, background-color .18s ease;
  }

  .mobile-footer-menu-buttons .menu-button-in:hover,
  .mobile-footer-menu-buttons .menu-open:hover {
    background: var(--st-teal-soft);
    color: var(--st-teal-dark);
  }

  .mobile-footer-menu-buttons .menu-icon {
    font-size: 18px;
  }

  .mobile-footer-menu-buttons .menu-caption {
    margin-top: 2px;
    font-size: 10px;
    font-weight: 700;
  }

  .navi-menu-content,
  .sidebar-menu-content {
    background: #F7FAFC;
  }

  .menu-drawer {
    padding: 20px 16px 80px;
  }

  .menu-drawer > li {
    margin-bottom: 8px;
  }

  .menu-drawer > li > a {
    display: block;
    padding: 13px 15px;
    border: 1px solid var(--st-border);
    border-radius: 13px;
    background: #fff;
    color: var(--st-navy);
    font-weight: 700;
    text-decoration: none;
  }

  #search-menu-content {
    padding: 18px;
    background: rgba(16,43,65,.96);
  }

  #search-menu-content .search-box {
    max-width: 620px;
    margin: auto;
  }

  #search-menu-content .search-edit {
    min-height: 48px;
    border-radius: 12px 0 0 12px;
  }

  #search-menu-content .search-submit {
    width: 52px;
    border-radius: 0 12px 12px 0;
    background: var(--st-teal);
    color: #fff;
  }

  body.home .entry-content > .wp-block-group:first-child {
    padding: 30px 18px !important;
    border-radius: 19px;
  }

  body.home .entry-content > .wp-block-group:first-child::after {
    right: -130px;
    bottom: -140px;
  }

  #footer .footer-bottom {
    display: block;
    padding-bottom: 82px;
  }

  #footer .footer-bottom-logo {
    margin-bottom: 18px;
  }

  #footer .menu-footer {
    justify-content: center;
    gap: 8px 14px;
  }
}

@media screen and (max-width: 480px) {
  body.home .entry-content > .wp-block-group:first-child > h2:first-child::after {
    font-size: .48em;
    line-height: 1.55;
  }

  body.home .wp-block-search__inside-wrapper {
    min-height: 60px;
  }

  body.home .entry-content h2 + ul.wp-block-list > li {
    min-height: 0;
  }
}

/* ==============================
   第4弾：検索・404・カテゴリ統一
   ============================== */

/* カテゴリ色をサイト全体で統一 */
.cat-label-71,
.entry-category.cat-label-71 {
  background: #42A87A !important;
  color: #fff !important;
}

.cat-label-72,
.entry-category.cat-label-72 {
  background: #D39A29 !important;
  color: #fff !important;
}

.cat-label-73,
.entry-category.cat-label-73 {
  background: #5478C9 !important;
  color: #fff !important;
}

.cat-label-74,
.entry-category.cat-label-74 {
  background: #D7775F !important;
  color: #fff !important;
}

.cat-label-75,
.entry-category.cat-label-75 {
  background: #6D63C7 !important;
  color: #fff !important;
}

/* アイキャッチ未設定でもブランドカードに見せる */
.entry-card-thumb {
  position: relative;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.32), transparent 28%),
    linear-gradient(135deg, #EAF4F6 0%, #DCECF0 100%);
}

.category-health-post .entry-card-thumb {
  background: linear-gradient(135deg, #ECF8F1 0%, #DDF1E6 100%);
}

.category-money-post .entry-card-thumb {
  background: linear-gradient(135deg, #FFF8E8 0%, #F7EBCB 100%);
}

.category-work-post .entry-card-thumb {
  background: linear-gradient(135deg, #EFF4FF 0%, #E0E9FB 100%);
}

.category-life-post .entry-card-thumb {
  background: linear-gradient(135deg, #FFF1ED 0%, #F8DDD5 100%);
}

.category-digital-post .entry-card-thumb {
  background: linear-gradient(135deg, #F2F0FF 0%, #E4E1FA 100%);
}

.entry-card-thumb .no-image {
  opacity: 0;
}

.entry-card-thumb:has(.no-image)::before {
  content: "知っとく。";
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%,-50%);
  color: var(--st-navy);
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  font-weight: 850;
  letter-spacing: .04em;
  white-space: nowrap;
}

.entry-card-thumb:has(.no-image)::after {
  content: "知っておけばよかったを減らす";
  position: absolute;
  left: 50%;
  top: 61%;
  transform: translateX(-50%);
  color: rgba(23,59,87,.58);
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
}

/* 検索結果 */
body.search #main {
  padding-top: 34px;
}

body.search .archive-title {
  color: var(--st-navy);
  font-size: clamp(1.55rem, 3vw, 2rem);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--st-teal-soft);
}

body.search #main > .search-box {
  display: flex;
  max-width: 720px;
  margin: 0 0 28px;
  background: #fff;
  border: 2px solid #D5E2E9;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 7px 20px rgba(23,59,87,.06);
}

body.search #main > .search-box:focus-within {
  border-color: var(--st-teal);
  box-shadow: 0 9px 24px rgba(43,183,169,.12);
}

body.search #main > .search-box .search-edit {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  border: 0;
  padding: 0 15px;
  box-shadow: none;
}

body.search #main > .search-box .search-submit {
  width: 54px;
  min-height: 52px;
  border: 0;
  background: var(--st-navy);
  color: #fff;
}

body.search #list {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 18px;
}

body.search .entry-card-wrap {
  margin: 0;
  border: 1px solid var(--st-border);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 18px rgba(23,59,87,.05);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

body.search .entry-card-wrap:hover {
  transform: translateY(-3px);
  border-color: #C8DCE6;
  box-shadow: 0 12px 28px rgba(23,59,87,.10);
}

body.search .entry-card {
  display: block;
}

body.search .entry-card-thumb {
  width: 100%;
  max-width: none;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

body.search .entry-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.search .entry-card-content {
  padding: 16px 17px 17px;
}

body.search .entry-card-title {
  color: var(--st-navy);
  font-size: 1.02rem;
  line-height: 1.65;
}

body.search .entry-card-snippet {
  color: var(--st-muted);
  font-size: .86rem;
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 404ページ */
body.error404 #content-in {
  display: block;
  max-width: 900px;
}

body.error404 #sidebar {
  display: none;
}

body.error404 #main {
  width: 100%;
  max-width: none;
  min-height: 520px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 60px 28px;
  overflow: hidden;
  position: relative;
}

body.error404 #main::before {
  content: "404";
  position: absolute;
  top: 16px;
  right: 24px;
  color: rgba(43,183,169,.07);
  font-size: clamp(7rem, 20vw, 14rem);
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

body.error404 .article {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

body.error404 .entry-title {
  color: var(--st-navy);
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  margin-bottom: 14px;
}

body.error404 .entry-title::after {
  content: "ページが見つかりません";
  display: block;
  margin-top: 10px;
  color: var(--st-teal-dark);
  font-size: .48em;
  font-weight: 750;
  letter-spacing: .05em;
}

body.error404 img.not-found {
  display: none;
}

body.error404 .article p {
  color: var(--st-muted);
  line-height: 1.9;
  font-size: 1rem;
}

body.error404 .article p::after {
  content: "上のメニューか検索から、知りたいことを探してみてください。";
  display: block;
  margin-top: 8px;
  color: #425D70;
  font-weight: 650;
}

/* ページネーション */
.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 34px;
}

.pagination a,
.pagination span {
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--st-border);
  border-radius: 10px;
  background: #fff;
  color: var(--st-navy);
  text-decoration: none;
  font-weight: 700;
}

.pagination .current,
.pagination a:hover {
  background: var(--st-navy);
  border-color: var(--st-navy);
  color: #fff;
}

/* フッターにブランドメッセージ */
#footer .footer-bottom-logo::after {
  content: "「知っておけばよかった」を減らす。";
  display: block;
  margin-top: 8px;
  color: rgba(255,255,255,.62);
  font-size: .76rem;
  letter-spacing: .04em;
}

/* 長いページでも戻りやすく */
.go-to-top {
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(23,59,87,.13);
  overflow: hidden;
}

.go-to-top a {
  background: var(--st-navy);
  color: #fff;
}

.go-to-top a:hover {
  background: var(--st-teal-dark);
}

/* スマホの余白とカード密度 */
@media screen and (max-width: 1023px) {
  body.search #list {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 834px) {
  body.archive #main,
  body.search #main {
    padding-left: 14px;
    padding-right: 14px;
  }

  body.archive .entry-card-wrap,
  body.search .entry-card-wrap {
    border-radius: 14px;
  }

  body.archive .entry-card-snippet,
  body.search .entry-card-snippet {
    -webkit-line-clamp: 2;
  }

  body.error404 #main {
    min-height: 430px;
    padding: 48px 20px 92px;
  }

  body.error404 #main::before {
    top: 24px;
    right: -10px;
  }
}

@media screen and (max-width: 480px) {
  body.archive .archive-title,
  body.search .archive-title {
    font-size: 1.45rem;
  }

  .entry-card-thumb:has(.no-image)::after {
    font-size: .6rem;
  }

  body.search #main > .search-box {
    margin-bottom: 20px;
  }

  body.error404 .entry-title {
    font-size: 1.65rem;
  }
}

/* ==============================
   最終磨き：密度・可読性・操作感
   ============================== */

::selection {
  background: rgba(43,183,169,.22);
  color: var(--st-navy-deep);
}

/* 一覧カードの高さと情報量を揃える */
body.archive .entry-card-wrap,
body.search .entry-card-wrap {
  height: 100%;
}

body.archive .entry-card,
body.search .entry-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

body.archive .entry-card-content,
body.search .entry-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

body.archive .entry-card-title,
body.search .entry-card-title {
  min-height: 3.3em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.archive .entry-card-snippet,
body.search .entry-card-snippet {
  margin-bottom: 12px;
}

body.archive .entry-card-meta,
body.search .entry-card-meta {
  margin-top: auto;
}

/* 画像はホバーしても暴れない */
.entry-card-thumb img,
.related-entry-card-thumb img,
.popular-entry-card-thumb img {
  transition: transform .28s ease;
}

@media (hover: hover) and (pointer: fine) {
  body.archive .entry-card-wrap:hover .entry-card-thumb img:not(.no-image),
  body.search .entry-card-wrap:hover .entry-card-thumb img:not(.no-image),
  .related-entry-card-wrap:hover img {
    transform: scale(1.025);
  }
}

/* 本文のタイポグラフィ */
body.single .entry-content p {
  line-height: 2;
}

body.single .entry-content li {
  margin-bottom: .35em;
}

body.single .entry-content strong {
  color: #183A50;
}

body.single .entry-content blockquote {
  margin: 1.8em 0;
  padding: 18px 20px 18px 22px;
  border-left: 4px solid var(--st-teal);
  border-radius: 0 12px 12px 0;
  background: #F7FBFC;
  color: #425D70;
}

body.single .entry-content hr {
  border: 0;
  border-top: 1px solid var(--st-border);
  margin: 2.5em 0;
}

/* 目次の行間 */
body.single .toc-list li {
  margin: .42em 0;
}

body.single .toc-list a {
  line-height: 1.65;
}

/* サイドバーの視線ノイズを抑える */
.sidebar .widget ul {
  margin-bottom: 0;
}

.sidebar .widget li:last-child {
  margin-bottom: 0;
}

/* ヘッダーナビのクリック領域 */
.navi-in > ul > li > a {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 17px;
  padding-right: 17px;
}

/* フッターの区切り */
#footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
}

/* フォーム文字サイズを16px以上にしてiOS自動ズームを防ぐ */
input[type="text"],
input[type="search"],
input[type="email"],
input[type="url"],
textarea,
select {
  font-size: 16px;
}

/* スマホでは空のサイドバーボタンを消して4ボタンに整理 */
@media screen and (max-width: 834px) {
  .mobile-footer-menu-buttons .sidebar-menu-button {
    display: none;
  }

  .mobile-footer-menu-buttons .menu-button {
    width: 25%;
  }

  body.home .wp-block-column > .wp-block-group {
    min-height: auto;
  }

  body.home .wp-block-column > .wp-block-group .wp-block-button__link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  body.single .entry-content {
    font-size: 1rem;
  }

  body.single .entry-content h2 {
    font-size: 1.35rem;
    line-height: 1.55;
  }

  body.single .entry-content h3 {
    font-size: 1.17rem;
    line-height: 1.55;
  }

  body.archive .entry-card-title,
  body.search .entry-card-title {
    min-height: 0;
  }
}

/* 小画面で横スクロール事故を防ぐ */
@media screen and (max-width: 480px) {
  body.home .wp-block-search__input {
    padding-left: 12px;
  }

  body.single .entry-content .wp-block-table {
    margin-left: 0;
    margin-right: 0;
  }

  #footer .menu-footer a {
    line-height: 1.7;
  }
}

/* 動きを減らしたい端末設定を尊重 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==============================
   公開前最終補正
   ============================== */

/* 白文字とのコントラストをWCAG AA相当に寄せる */
body.home .wp-block-group:has(a[href*="/category/health/"]) {
  --cat-accent: #2F7D5B;
}

body.home .wp-block-group:has(a[href*="/category/money/"]) {
  --cat-accent: #986A08;
}

body.home .wp-block-group:has(a[href*="/category/work/"]) {
  --cat-accent: #4565A8;
}

body.home .wp-block-group:has(a[href*="/category/life/"]) {
  --cat-accent: #A84E3C;
}

body.home .wp-block-group:has(a[href*="/category/digital/"]) {
  --cat-accent: #6257B5;
}

.cat-label-71,
.entry-category.cat-label-71 {
  background: #2F7D5B !important;
}

.cat-label-72,
.entry-category.cat-label-72 {
  background: #986A08 !important;
}

.cat-label-73,
.entry-category.cat-label-73 {
  background: #4565A8 !important;
}

.cat-label-74,
.entry-category.cat-label-74 {
  background: #A84E3C !important;
}

.cat-label-75,
.entry-category.cat-label-75 {
  background: #6257B5 !important;
}

/* ロゴ領域を予約してCLSを抑える */
.header-site-logo-image {
  width: 188px;
  height: 58px;
  max-width: 100%;
  object-fit: contain;
}

.footer-site-logo-image {
  width: 156px !important;
  height: 48px !important;
  max-width: 100%;
  object-fit: contain;
}

@media screen and (max-width: 834px) {
  .header-site-logo-image {
    width: 150px;
    height: 46px;
  }
}

/* カテゴリ一覧：PCでサイドバー分の空白を残さず全幅化 */
body.category #content-in {
  display: block;
  max-width: 1180px;
}

body.category #main {
  width: 100%;
  max-width: none;
}

body.category #sidebar {
  display: none;
}

body.category #list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media screen and (max-width: 1100px) {
  body.category #list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 700px) {
  body.category #list {
    grid-template-columns: 1fr;
  }
}

/* ==============================
   全ページ共通：サイドバー余白の根本解消
   ============================== */

/* トップ以外は2カラムをやめ、右側の空白を残さない */
body:not(.home) #content-in {
  display: block;
  max-width: 1180px;
}

body:not(.home) #sidebar {
  display: none;
}

body:not(.home) #main {
  margin-left: auto;
  margin-right: auto;
}

/* 記事は読みやすい中央幅に */
body.single #main {
  width: min(100%, 940px);
  max-width: 940px;
}

/* 固定ページも左右対称に */
body.page:not(.home) #main {
  width: min(100%, 1000px);
  max-width: 1000px;
}

/* カテゴリ・タグ・日付等の一覧は広く使う */
body.archive #main,
body.search #main,
body.blog #main {
  width: 100%;
  max-width: none;
}

/* 404は既存の中央レイアウトを維持 */
body.error404 #main {
  width: 100%;
  max-width: none;
}

/* 記事下の関連記事等も本文と自然につなげる */
body.single .under-entry-content {
  width: 100%;
  max-width: 940px;
  margin-left: auto;
  margin-right: auto;
}

/* タブレット・スマホは常に1カラム */
@media screen and (max-width: 1023px) {
  body:not(.home) #content-in {
    display: block;
  }

  body.single #main,
  body.page:not(.home) #main,
  body.archive #main,
  body.search #main,
  body.blog #main,
  body.error404 #main {
    width: 100%;
    max-width: none;
  }
}
