/*
Theme Name: Cocoon Child Manga
Template: cocoon
Description: Modular manga and ebook portal child theme for Cocoon.
Author: Site Admin
Version: 1.0.0
Text Domain: cocoon-child-manga
*/

/* Base child overrides. Portal-specific styles are loaded from /css/*.css on front page. */
.portal-home {
  margin-block: 0 2.5rem;
}

.portal-home * {
  box-sizing: border-box;
}

/* Section title baseline accent */
.portal-home .section-title {
  position: relative;
  padding-left: 14px;
}

.portal-home .section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 5px;
  height: 1.1em;
  border-radius: 999px;
  background: #d9d9d9;
}

/* Highlight the active featured section title */
.portal-home.is-feature-freeworks #featured .section-title::before,
.portal-home.is-feature-ranking #ranking .section-title::before,
.portal-home.is-feature-newbooks #new-releases .section-title::before,
.portal-home.is-feature-salebooks #sales .section-title::before,
.portal-home.is-feature-mediaworks #media .section-title::before {
  width: 8px;
  height: 1.25em;
  background: var(--portal-highlight, #ff9900);
}

.portal-home.is-feature-freeworks #featured .section-title,
.portal-home.is-feature-ranking #ranking .section-title,
.portal-home.is-feature-newbooks #new-releases .section-title,
.portal-home.is-feature-salebooks #sales .section-title,
.portal-home.is-feature-mediaworks #media .section-title {
  color: var(--portal-highlight-strong, #e68700);
}

/* Optional subtle featured section background */
.portal-home.is-feature-freeworks #featured {
  background: linear-gradient(180deg, rgba(255, 153, 0, 0.05) 0%, rgba(255, 153, 0, 0) 100%);
}

.portal-home.is-feature-ranking #ranking {
  background: linear-gradient(180deg, rgba(34, 34, 34, 0.04) 0%, rgba(34, 34, 34, 0) 100%);
}

.portal-home.is-feature-newbooks #new-releases {
  background: linear-gradient(180deg, rgba(42, 125, 225, 0.05) 0%, rgba(42, 125, 225, 0) 100%);
}

.portal-home.is-feature-salebooks #sales {
  background: linear-gradient(180deg, rgba(240, 90, 40, 0.05) 0%, rgba(240, 90, 40, 0) 100%);
}

.portal-home.is-feature-mediaworks #media {
  background: linear-gradient(180deg, rgba(122, 77, 232, 0.05) 0%, rgba(122, 77, 232, 0) 100%);
}

/* First-card cover emphasis in the featured section only */
.portal-home.is-feature-freeworks #featured .scroll-row > .book-card:first-child .book-cover,
.portal-home.is-feature-ranking #ranking .scroll-row > .book-card:first-child .book-cover,
.portal-home.is-feature-newbooks #new-releases .scroll-row > .book-card:first-child .book-cover,
.portal-home.is-feature-salebooks #sales .scroll-row > .book-card:first-child .book-cover,
.portal-home.is-feature-mediaworks #media .scroll-row > .book-card:first-child .book-cover {
  box-shadow: inset 0 0 0 2px var(--portal-highlight, #ff9900), 0 10px 24px rgba(0, 0, 0, 0.12);
  background: color-mix(in srgb, var(--portal-highlight, #ff9900) 12%, #efefef);
  transform: translateY(-2px);
}

.portal-home.is-feature-freeworks #featured .scroll-row > .book-card:first-child .book-placeholder,
.portal-home.is-feature-ranking #ranking .scroll-row > .book-card:first-child .book-placeholder,
.portal-home.is-feature-newbooks #new-releases .scroll-row > .book-card:first-child .book-placeholder,
.portal-home.is-feature-salebooks #sales .scroll-row > .book-card:first-child .book-placeholder,
.portal-home.is-feature-mediaworks #media .scroll-row > .book-card:first-child .book-placeholder {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--portal-highlight, #ff9900) 16%, #f3f3f3) 0%,
    #e8e8e8 100%
  );
}

/* Featured section: subtly emphasize the first card only */
.portal-home.is-feature-freeworks #featured .scroll-row > .book-card:first-child,
.portal-home.is-feature-ranking #ranking .scroll-row > .book-card:first-child,
.portal-home.is-feature-newbooks #new-releases .scroll-row > .book-card:first-child,
.portal-home.is-feature-salebooks #sales .scroll-row > .book-card:first-child,
.portal-home.is-feature-mediaworks #media .scroll-row > .book-card:first-child {
  border-color: rgba(255, 153, 0, 0.28);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  min-width: 86%;
}

@media (min-width: 768px) {
  .portal-home.is-feature-freeworks #featured .scroll-row > .book-card:first-child,
  .portal-home.is-feature-ranking #ranking .scroll-row > .book-card:first-child,
  .portal-home.is-feature-newbooks #new-releases .scroll-row > .book-card:first-child,
  .portal-home.is-feature-salebooks #sales .scroll-row > .book-card:first-child,
  .portal-home.is-feature-mediaworks #media .scroll-row > .book-card:first-child {
    min-width: 54%;
  }
}

@media (min-width: 1024px) {
  .portal-home.is-feature-freeworks #featured .scroll-row > .book-card:first-child,
  .portal-home.is-feature-ranking #ranking .scroll-row > .book-card:first-child,
  .portal-home.is-feature-newbooks #new-releases .scroll-row > .book-card:first-child,
  .portal-home.is-feature-salebooks #sales .scroll-row > .book-card:first-child,
  .portal-home.is-feature-mediaworks #media .scroll-row > .book-card:first-child {
    min-width: calc((100% - 32px) / 3 + 40px);
  }
}

/* Slightly stronger title and CTA for the first featured card */
.portal-home.is-feature-freeworks #featured .scroll-row > .book-card:first-child .book-title,
.portal-home.is-feature-ranking #ranking .scroll-row > .book-card:first-child .book-title,
.portal-home.is-feature-newbooks #new-releases .scroll-row > .book-card:first-child .book-title,
.portal-home.is-feature-salebooks #sales .scroll-row > .book-card:first-child .book-title,
.portal-home.is-feature-mediaworks #media .scroll-row > .book-card:first-child .book-title {
  font-size: 1.04rem;
}

.portal-home.is-feature-freeworks #featured .scroll-row > .book-card:first-child::after,
.portal-home.is-feature-ranking #ranking .scroll-row > .book-card:first-child::after,
.portal-home.is-feature-newbooks #new-releases .scroll-row > .book-card:first-child::after,
.portal-home.is-feature-salebooks #sales .scroll-row > .book-card:first-child::after,
.portal-home.is-feature-mediaworks #media .scroll-row > .book-card:first-child::after {
  content: "注目";
  position: absolute;
  top: 10px;
  right: 10px;
  min-height: 26px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--portal-highlight, #ff9900);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  z-index: 2;
}

/* =========================
   主役セクション別 カラー変数
   cards.css の --portal-highlight-soft / dark を上書き
========================= */

.portal-home.is-feature-freeworks {
  --portal-highlight: #ff9900;
  --portal-highlight-dark: #d97f00;
  --portal-highlight-soft: #fff0d9;
}

.portal-home.is-feature-ranking {
  --portal-highlight: #222222;
  --portal-highlight-dark: #000000;
  --portal-highlight-soft: #ececec;
}

.portal-home.is-feature-newbooks {
  --portal-highlight: #2a7de1;
  --portal-highlight-dark: #1f63b6;
  --portal-highlight-soft: #dcebff;
}

.portal-home.is-feature-salebooks {
  --portal-highlight: #f05a28;
  --portal-highlight-dark: #d94816;
  --portal-highlight-soft: #ffe0d4;
}

.portal-home.is-feature-mediaworks {
  --portal-highlight: #7a4de8;
  --portal-highlight-dark: #6038bf;
  --portal-highlight-soft: #e9deff;
}

/* =========================================================
   LS-DESIGN-LITE-3
   Manga / e-book affiliate article design polish
   Added for initial operation after post_id=185 public launch.
   Scope: single post pages, Cocoon child theme only.
   ========================================================= */

/* Page base */
body.single-post {
  background: #f4f5f7;
}

/* Main article card */
.single-post .article {
  max-width: 920px;
  margin: 28px auto 48px;
  padding: 34px 38px 42px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
}

/* Title */
.single-post .entry-title {
  margin-bottom: 18px;
  padding: 14px 18px;
  border-left: 7px solid #ff9f1c;
  border-radius: 10px;
  background: linear-gradient(90deg, #fff4df 0%, #ffffff 72%);
  font-size: 1.55rem;
  line-height: 1.45;
  font-weight: 800;
}

/* Date area */
.single-post .date-tags,
.single-post .post-date,
.single-post .post-update {
  color: #666;
  font-size: 0.86rem;
}

/* Social buttons: reduce visual pressure */
.single-post .sns-share,
.single-post .sns-share-buttons,
.single-post .sns-follow,
.single-post .sns-follow-buttons {
  margin-top: 14px;
  margin-bottom: 22px;
}

.single-post .sns-share .button-caption,
.single-post .sns-follow .button-caption {
  font-size: 0.78rem;
}

.single-post .sns-buttons a {
  border-radius: 9px;
  min-height: 34px;
}

/* Lead paragraph */
.single-post .entry-content > p:first-of-type {
  margin-top: 26px;
  padding: 18px 20px;
  border: 1px solid #f0d8ad;
  border-radius: 14px;
  background: #fffaf1;
  font-size: 1.02rem;
  line-height: 1.9;
}

/* Work info list */
.single-post .entry-content ul {
  margin: 22px 0 24px;
  padding: 20px 24px 20px 42px;
  border: 1px solid #e7e7e7;
  border-radius: 14px;
  background: #fafafa;
}

.single-post .entry-content li {
  margin: 8px 0;
  line-height: 1.75;
}

/* Amazon link as CTA button */
.single-post .entry-content a[href*="amazon.co.jp"],
.single-post .entry-content a[href*="amzn.to"] {
  display: inline-block;
  margin: 12px 0 18px;
  padding: 13px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff9900 0%, #ffb84d 100%);
  color: #111111 !important;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(255, 153, 0, 0.26);
}

.single-post .entry-content a[href*="amazon.co.jp"]:hover,
.single-post .entry-content a[href*="amzn.to"]:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

/* PR / note */
.single-post .entry-content small {
  display: block;
  margin-top: 10px;
  padding: 12px 14px;
  border-left: 5px solid #d0d0d0;
  border-radius: 10px;
  background: #f7f7f7;
  color: #555555;
  line-height: 1.8;
}

/* Category tag */
.single-post .cat-label,
.single-post .cat-link,
.single-post .entry-category {
  border-radius: 999px;
}

/* Mobile */
@media screen and (max-width: 768px) {
  .single-post .article {
    margin: 12px 10px 28px;
    padding: 22px 16px 30px;
    border-radius: 14px;
  }

  .single-post .entry-title {
    padding: 12px 14px;
    font-size: 1.22rem;
  }

  .single-post .entry-content > p:first-of-type {
    padding: 14px 15px;
  }

  .single-post .entry-content ul {
    padding: 16px 16px 16px 34px;
  }

  .single-post .entry-content a[href*="amazon.co.jp"],
  .single-post .entry-content a[href*="amzn.to"] {
    display: block;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
  }
}

/* =========================================================
   LS-DESIGN-LITE-4
   Hide default SNS share UI / author display.
   Add book cover and multi-store button layout.
   ========================================================= */

/* Hide Cocoon default large SNS buttons */
.single-post .sns-share,
.single-post .sns-share-buttons,
.single-post .sns-follow,
.single-post .sns-follow-buttons,
.single-post .share-button,
.single-post .share-buttons,
.single-post .bc-brand-color,
.single-post .bc-brand-color-white,
.single-post .ss-top,
.single-post .ss-bottom,
.single-post .sns-buttons {
  display: none !important;
}

/* Hide visible author display such as ai_publisher */
.single-post .author-info,
.single-post .author-box,
.single-post .author-name,
.single-post .author-link,
.single-post .post-author,
.single-post .entry-author,
.single-post .byline,
.single-post .writer {
  display: none !important;
}

/* Optional small monochrome share icons area for future use */
.single-post .ls-mini-share {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  margin: 14px 0 0;
}

.single-post .ls-mini-share a {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #555 !important;
  background: transparent;
  text-decoration: none;
  font-size: 16px;
  opacity: 0.75;
}

.single-post .ls-mini-share a:hover {
  opacity: 1;
  background: #f0f0f0;
}

/* Book cover + store card */
.single-post .ls-store-card {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  gap: 24px;
  align-items: center;
  margin: 24px 0 28px;
  padding: 22px;
  border: 1px solid #e6e6e6;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.04);
}

.single-post .ls-book-cover {
  text-align: center;
}

.single-post .ls-book-cover img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
}

.single-post .ls-book-cover-placeholder {
  display: flex;
  min-height: 210px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #f3f3f3 0%, #ffffff 100%);
  color: #777;
  font-size: 0.9rem;
  border: 1px dashed #d0d0d0;
}

/* Store buttons */
.single-post .ls-store-buttons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.single-post .ls-store-btn {
  display: block;
  padding: 13px 18px;
  border-radius: 999px;
  text-align: center;
  text-decoration: none !important;
  font-weight: 800;
  line-height: 1.4;
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.10);
}

.single-post .ls-store-amazon {
  background: linear-gradient(135deg, #ff9900 0%, #ffbd59 100%);
  color: #111 !important;
}

.single-post .ls-store-kobo {
  background: linear-gradient(135deg, #bf0000 0%, #e03a3a 100%);
  color: #fff !important;
}

.single-post .ls-store-dmm {
  background: linear-gradient(135deg, #1c64f2 0%, #4f8df7 100%);
  color: #fff !important;
}

.single-post .ls-store-btn:hover {
  transform: translateY(-1px);
  opacity: 0.94;
}

/* Mobile layout */
@media screen and (max-width: 768px) {
  .single-post .ls-store-card {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .single-post .ls-book-cover img {
    max-width: 180px;
  }

  .single-post .ls-mini-share {
    justify-content: center;
  }
}

/* =========================================================
   LS-CATEGORY-LITE-1
   Hide visible category chip such as "未分類" on single posts.
   CSS only. No WordPress API / no post update.
   ========================================================= */

body.single-post .cat-label,
body.single-post .cat-link,
body.single-post .entry-category,
body.single-post .entry-categories,
body.single-post .post-category,
body.single-post .post-categories,
body.single-post .footer-post-meta .cat-link,
body.single-post .entry-footer .cat-link,
body.single-post .entry-footer .cat-label,
body.single-post .article-footer .cat-link,
body.single-post .article-footer .cat-label,
body.single-post a[href*="/category/uncategorized"],
body.single-post a[href*="%e6%9c%aa%e5%88%86%e9%a1%9e"] {
  display: none !important;
}

/* HOSHIDORI_NEW_RELEASE_V10_START */
.hoshidori-new-releases .section-box {border:1px solid #d8e6fb;border-top:4px solid #3678e5;border-radius:18px;background:linear-gradient(180deg,#f8fbff 0%,#fff 18%);padding:22px;box-shadow:0 12px 30px rgba(30,64,175,.08)}
.hoshidori-new-releases .section-head {display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}
.hoshidori-section-title-wrap {display:flex;align-items:center;gap:10px}
.hoshidori-section-symbol {display:inline-flex;align-items:center;justify-content:center;min-width:48px;min-height:28px;padding:0 10px;border-radius:999px;background:#e9f2ff;color:#225cd1;font-size:.72rem;font-weight:900;letter-spacing:.06em}
.hoshidori-new-release-grid {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;overflow:visible}
.hoshidori-new-release-card {position:relative;min-width:0;border:1px solid #d8e6fb;border-radius:16px;background:#fff;box-shadow:inset 0 3px 0 #dfeeff,0 8px 20px rgba(37,99,235,.08);overflow:hidden}
.hoshidori-new-release-card .book-cover {position:relative}
.hoshidori-new-badge {position:absolute;top:9px;left:9px;z-index:2;padding:4px 8px;border-radius:999px;background:#3678e5;color:#fff;font-size:.68rem;font-weight:900}
.hoshidori-new-release-card .book-meta {padding:14px}
.hoshidori-new-release-card .book-title {margin:0 0 8px;font-size:.96rem;line-height:1.5}
.hoshidori-new-release-card .book-sub {margin:0 0 12px;color:#667085;font-size:.78rem}
.hoshidori-new-release-card .book-cta {display:inline-flex;align-items:center;justify-content:center;width:100%;min-height:42px;margin-top:8px;border-radius:10px;background:#225cd1;color:#fff;font-weight:800;text-decoration:none}
.hoshidori-new-release-card .book-store-link-list {display:grid;grid-template-columns:1fr;gap:7px;margin-top:10px}
.hoshidori-new-release-card .book-store-link {display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:7px 8px;border:1px solid #cdddf8;border-radius:9px;background:#eff5ff;color:#285fb7;font-size:.78rem;font-weight:800;text-decoration:none}
@media (max-width:1024px){.hoshidori-new-release-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:640px){.hoshidori-new-releases .section-box{padding:16px 12px;border-radius:14px}.hoshidori-new-release-grid{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:8px}.hoshidori-new-release-card{flex:0 0 76%;scroll-snap-align:start}}
/* HOSHIDORI_NEW_RELEASE_V10_END */

/* HOSHIDORI_NEW_RELEASE_LAYOUT_FIX_START */
.hoshidori-new-releases .section-box {
  min-height: 0 !important;
  height: auto !important;
  padding-bottom: 22px !important;
}

.hoshidori-new-release-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 260px)) !important;
  justify-content: start !important;
  align-items: stretch !important;
  min-height: 0 !important;
  height: auto !important;
  gap: 16px !important;
}

.hoshidori-new-release-card {
  width: 100% !important;
  max-width: 260px !important;
  min-height: 0 !important;
  height: auto !important;
}

.hoshidori-new-release-card .book-cta {
  background: #225cd1 !important;
  border-color: #225cd1 !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(34, 92, 209, .18) !important;
}

.hoshidori-new-release-card .book-cover,
.hoshidori-new-release-card .book-card-cover-link {
  width: 100% !important;
}

@media (max-width: 640px) {
  .hoshidori-new-release-grid {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
  }

  .hoshidori-new-release-card {
    flex: 0 0 78% !important;
    max-width: 300px !important;
    scroll-snap-align: start;
  }
}
/* HOSHIDORI_NEW_RELEASE_LAYOUT_FIX_END */

/* HOSHIDORI_NEW_RELEASE_COMPACT_START */
.hoshidori-new-releases,
.hoshidori-new-releases .section-box,
.hoshidori-new-releases .scroll-row,
.hoshidori-new-releases .hoshidori-new-release-grid {
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
}

.hoshidori-new-releases .section-box {
  padding-bottom: 18px !important;
}

.hoshidori-new-releases .hoshidori-new-release-grid {
  align-content: start !important;
  align-items: start !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.hoshidori-new-releases .book-card,
.hoshidori-new-releases .hoshidori-new-release-card {
  align-self: start !important;
  margin-bottom: 0 !important;
}

.hoshidori-new-releases::after,
.hoshidori-new-releases .section-box::after,
.hoshidori-new-releases .scroll-row::after {
  display: none !important;
  content: none !important;
}
/* HOSHIDORI_NEW_RELEASE_COMPACT_END */

/* HOSHIDORI_STORE_LINKS_START */
.hoshidori-store-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 10px;
}

.hoshidori-store-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #cfdcf6;
  background: #f4f8ff;
  color: #2455b5;
  font-size: .78rem;
  font-weight: 800;
  text-decoration: none;
  line-height: 1.2;
}

.hoshidori-store-link--kindle { background: #eef4ff; }
.hoshidori-store-link--kobo { background: #effaf1; color: #1d7a3d; border-color: #cfe9d6; }
.hoshidori-store-link--dmm { background: #fff4f4; color: #b23838; border-color: #f0d3d3; }

.hoshidori-store-link.is-disabled {
  background: #f3f4f6;
  color: #7b8592;
  border-color: #e0e3e8;
  cursor: default;
}
/* HOSHIDORI_STORE_LINKS_END */
