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

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
}

/*834px以下*/
@media screen and (max-width: 834px){
  /*必要ならばここにコードを書く*/
}

/*480px以下*/
@media screen and (max-width: 480px){
  /*必要ならばここにコードを書く*/
}


/************************************
** TOPページ 最新記事
************************************/
.osora-latest-section {
  margin-top: 64px;
  padding: 44px 0 12px;
  border-top: 1px solid #d9dde3;
}

.osora-latest-header {
  margin-bottom: 24px;
}

.osora-latest-label {
  display: block;
  margin-bottom: 4px;
  color: #8b4f4f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.osora-latest-header h2,
.osora-latest-header .osora-latest-heading {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #25313d;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.35;
}

.osora-latest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 20px;
}

.osora-latest-card {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #e1e4e8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(37, 49, 61, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.osora-latest-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 9px 24px rgba(37, 49, 61, 0.12);
}

.osora-latest-card-link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.osora-latest-card-link:hover {
  color: inherit;
  text-decoration: none;
}

.osora-latest-card-link:focus-visible {
  outline: 3px solid #8b4f4f;
  outline-offset: -3px;
}

.osora-latest-thumbnail {
  display: flex;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  background: #eef1f4;
}

.osora-latest-thumbnail img {
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.osora-latest-card:hover .osora-latest-thumbnail img {
  transform: scale(1.025);
}

.osora-latest-thumbnail-fallback {
  color: #596674;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.osora-latest-card-body {
  padding: 15px 16px 16px;
}

.osora-latest-title {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 0 0 12px;
  padding: 0;
  overflow: hidden;
  color: #25313d;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.osora-latest-card-body time {
  display: block;
  color: #707b86;
  font-size: 12px;
  line-height: 1.5;
}

.osora-latest-card-body time span {
  margin-right: 0.55em;
  color: #8b4f4f;
  font-weight: 700;
}

.osora-latest-pagination {
  margin-top: 34px;
}

.osora-latest-pagination .page-numbers {
  margin: 0;
  padding: 0;
  list-style: none;
}

.osora-latest-pagination ul.page-numbers {
  display: flex !important;
  flex-flow: row nowrap !important;
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
  min-height: 42px;
  gap: 8px;
  align-items: center;
  justify-content: center;
  overflow-x: auto;
  padding: 0 0 4px;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  line-height: normal;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

.osora-latest-pagination li {
  display: block !important;
  flex: 0 0 auto;
  width: auto !important;
  margin: 0;
  padding: 0;
}

.osora-latest-pagination a.page-numbers,
.osora-latest-pagination span.page-numbers {
  display: inline-flex !important;
  flex: 0 0 auto;
  width: auto !important;
  min-width: 42px;
  min-height: 42px;
  margin: 0;
  padding: 8px 12px;
  align-items: center;
  justify-content: center;
  border: 1px solid #ccd2d8;
  border-radius: 8px;
  background: #fff;
  color: #34414e;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  writing-mode: horizontal-tb !important;
}

.osora-latest-pagination a.page-numbers:hover,
.osora-latest-pagination a.page-numbers:focus-visible {
  border-color: #8b4f4f;
  color: #8b4f4f;
}

.osora-latest-pagination span.page-numbers.current {
  border-color: #8b4f4f;
  background: #8b4f4f;
  color: #fff;
}

.osora-latest-empty {
  color: #596674;
}

/* 個別記事ではサイドバーの単行本欄を本文直後へ移す */
body.single-post #sidebar #text-95,
body.single-post #sidebar #text-97 {
  display: none !important;
}

.osora-article-book {
  margin: 48px 0 0;
  padding: 24px;
  border: 1px solid #d9dde3;
  border-radius: 12px;
  background: #f8faf9;
  text-align: center;
}

.osora-article-book-title {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  background: none;
  color: #25313d;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
}

.osora-article-book-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.osora-article-book-item {
  min-width: 0;
  overflow: hidden;
  padding: 18px 14px 14px;
  border: 1px solid #e1e4e8;
  border-radius: 10px;
  background: #fff;
}

.osora-article-book-item .textwidget {
  width: 100%;
  height: auto;
}

.osora-article-book .textwidget p {
  display: flex;
  width: 100%;
  height: auto;
  margin: 0;
  flex-direction: column;
  align-items: center;
}

.osora-article-book .textwidget p > br {
  display: none;
}

.osora-article-book .textwidget p > a {
  max-width: 100%;
}

.osora-article-book .textwidget p > a:nth-of-type(2) {
  display: flex;
  width: 100%;
  height: 150px;
  margin-top: 0;
  align-items: center;
  justify-content: center;
}

.osora-article-book .textwidget a {
  color: #34414e;
  text-decoration: none;
}

.osora-article-book .textwidget a:hover,
.osora-article-book .textwidget a:focus-visible {
  color: #8b4f4f;
  text-decoration: underline;
}

.osora-article-book .textwidget strong {
  display: block;
  max-width: 620px;
  margin: 0 auto 16px;
  line-height: 1.7;
}

.osora-article-book .textwidget img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 140px !important;
  margin: 0 auto !important;
  object-fit: contain;
}

.osora-article-book + .osora-article-latest-section {
  margin-top: 30px;
  padding-top: 30px;
}

/* 個別記事の末尾では、トップページ版より約20%コンパクトにする */
.osora-article-latest-section .osora-latest-thumbnail {
  aspect-ratio: 2 / 1;
}

.osora-article-latest-section .osora-latest-card-body {
  padding: 11px 13px 12px;
}

.osora-article-latest-section .osora-latest-title {
  min-height: 2.9em;
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.45;
}

.osora-article-latest-section .osora-latest-card-body time {
  font-size: 11px;
}

@media screen and (max-width: 834px) {
  .osora-latest-section {
    margin-top: 48px;
    padding-top: 36px;
  }

  .osora-latest-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 14px;
  }
}

@media screen and (max-width: 560px) {
  .osora-article-book {
    margin-top: 36px;
    padding: 16px 10px;
  }

  .osora-article-book-title {
    margin-bottom: 12px;
    font-size: 20px;
  }

  .osora-article-book-grid {
    gap: 8px;
  }

  .osora-article-book-item {
    padding: 10px 7px;
  }

  .osora-article-book .textwidget strong {
    margin-bottom: 8px;
    font-size: 12px;
    line-height: 1.45;
  }

  .osora-article-book .textwidget p > a:nth-of-type(2) {
    height: 122px;
  }

  .osora-article-book .textwidget img {
    max-height: 116px !important;
  }

  .osora-article-book + .osora-article-latest-section {
    margin-top: 24px;
    padding-top: 24px;
  }

  .osora-latest-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .osora-latest-card-link {
    position: relative;
    display: grid;
    grid-template-columns: 38% minmax(0, 1fr);
    width: 100%;
    height: 132px;
    box-sizing: border-box;
  }

  .osora-latest-thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
  }

  .osora-latest-thumbnail img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .osora-latest-card-body {
    display: flex;
    min-width: 0;
    padding: 10px 12px;
    flex-direction: column;
  }

  .osora-latest-title {
    min-height: 0;
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.45;
    -webkit-line-clamp: 3;
  }

  .osora-latest-card-body time {
    margin-top: auto;
    font-size: 11px;
  }

  .osora-article-latest-section .osora-latest-card-link {
    height: 106px;
  }

  .osora-article-latest-section .osora-latest-card-body {
    padding: 8px 10px;
  }

  .osora-article-latest-section .osora-latest-title {
    margin-bottom: 4px;
    font-size: 13px;
    line-height: 1.4;
    -webkit-line-clamp: 3;
  }

  .osora-latest-pagination .prev,
  .osora-latest-pagination .next {
    flex-basis: auto;
  }
}

/* 記事日付：Published と Updated を小さく一列表示 */
body .entry-card-date,
body .widget-entry-card-date,
body.single-post .date-tags {
  display: flex !important;
  align-items: center;
  gap: 10px;
  color: #7b8490;
  font-size: 10px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

body .entry-card-date .post-date,
body .entry-card-date .post-update,
body .widget-entry-card-date .post-date,
body .widget-entry-card-date .post-update,
body.single-post .date-tags .post-date,
body.single-post .date-tags .post-update {
  display: inline-flex !important;
  align-items: center;
  gap: 3px;
  margin: 0 !important;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  white-space: nowrap;
}

body .entry-card-date .post-date::before,
body .widget-entry-card-date .post-date::before,
body.single-post .date-tags .post-date::before {
  content: "Published";
}

body .entry-card-date .post-update::before,
body .widget-entry-card-date .post-update::before,
body.single-post .date-tags .post-update::before {
  content: "Updated";
}

body .entry-card-date .post-update.osora-same-day-update,
body .widget-entry-card-date .post-update.osora-same-day-update,
body.single-post .date-tags .post-update.osora-same-day-update {
  display: none !important;
}

body .entry-card-date .fa-clock,
body .entry-card-date .fa-history,
body .widget-entry-card-date .fa-clock,
body .widget-entry-card-date .fa-history,
body.single-post .date-tags .fa-clock,
body.single-post .date-tags .fa-history {
  display: none !important;
}

/* 独自の最新記事・全記事一覧の日付 */
.osora-card-dates,
.osora-list-dates {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #7b8490;
  font-size: 10px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.osora-date-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.osora-card-dates time,
.osora-list-dates time,
body .entry-card-date .entry-date,
body .widget-entry-card-date .entry-date,
body.single-post .date-tags .entry-date {
  margin: 0 !important;
  color: inherit;
  font-size: inherit !important;
  line-height: inherit;
}

.osora-all-posts-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 16px;
  align-items: baseline;
}

@media screen and (max-width: 560px) {
  body .entry-card-date,
  body .widget-entry-card-date,
  body.single-post .date-tags,
  .osora-card-dates,
  .osora-list-dates {
    gap: 7px;
    font-size: 8px;
    letter-spacing: -0.02em;
  }

  body .entry-card-date .post-date,
  body .entry-card-date .post-update,
  body .widget-entry-card-date .post-date,
  body .widget-entry-card-date .post-update,
  body.single-post .date-tags .post-date,
  body.single-post .date-tags .post-update,
  .osora-date-item {
    gap: 2px;
  }

  .osora-all-posts-list li {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .osora-list-dates {
    justify-self: start;
  }
}
