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

/************************************
** 子テーマ用のスタイルを書く
************************************/

/* サプライDB スタイル */

  .supply-db-desc {
    color: #666;
    margin-bottom: 1.5em;
  }

  .supply-filter-form {
    margin-bottom: 2em;
  }
  .supply-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
  }
  .filter-group {
    flex: 1 1 0;
  }
  .filter-group.filter-submit {
    flex: 0 0 auto;
  }
  .filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .filter-group label {
    font-size: 12px;
    font-weight: bold;
    color: #555;
  }
  .filter-group select {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    min-width: 160px;
  }
  .filter-btn {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
  }
  .filter-btn:hover {
    background: #1d4ed8;
  }
  .filter-reset {
    font-size: 13px;
    color: #666;
    margin-left: 8px;
  }

  .supply-count {
    color: #555;
    margin-bottom: 0.5em;
    font-size: 14px;
  }

  .supply-table-wrap {
    overflow-x: auto;
  }
  .supply-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
  }
  .supply-table thead {
    background: #f1f5f9;
  }
  .supply-table th {
    padding: 12px 14px;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
    font-size: 13px;
    color: #475569;
  }
  .supply-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
    line-height: 1.5;
  }
  .supply-table .col-maker,
  .supply-table .col-type,
  .supply-table .col-status {
    white-space: nowrap;
  }
  .supply-table tbody tr:hover {
    background: #f8fafc;
  }
  .supply-table .col-name a {
    color: #1e40af;
    text-decoration: none;
    font-weight: 500;
  }
  .supply-table .col-name a:hover {
    text-decoration: underline;
  }
  .supply-table .col-work a {
    color: #059669;
    text-decoration: none;
    white-space: nowrap;
  }
  .supply-table .col-link a {
    display: inline-block;
    background: #f59e0b;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
    margin-right: 4px;
    white-space: nowrap;
  }
  .supply-table .col-link a:hover {
    background: #d97706;
  }

  .supply-sidebar-subtitle {
    font-size: 13px;
    font-weight: bold;
    color: #666;
    padding: 8px 12px 4px;
  }

  a.supply-article-link {
    color: #2563eb !important;
    text-decoration: none !important;
  }
  a.supply-article-link:hover {
    text-decoration: underline !important;
  }

  .avail-on_sale { color: #059669; font-weight: bold; }
  .avail-preorder { color: #2563eb; font-weight: bold; }
  .avail-secondary { color: #d97706; }
  .avail-ended { color: #9ca3af; }

  /* Cocoonデフォルトのページネーションを非表示（supply-paginationを使用） */
  .supply-layout .pagination,
  .supply-layout .pager-post-navi,
  .supply-layout .nav-links,
  .supply-layout .pagination-next-link,
  .supply-layout .pager-links,
  #content .pagination:not(.supply-pagination),
  .content-in .pagination:not(.supply-pagination),
  .article-footer .pager-post-navi {
    display: none !important;
  }

  .supply-pagination {
    margin: 1.5em 0 !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
  }
  .supply-pagination a,
  .supply-pagination span,
  .supply-pagination .page-numbers {
    display: inline-block !important;
    float: none !important;
    padding: 8px 14px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    color: #333 !important;
    font-size: 14px !important;
    line-height: 1 !important;
    min-width: 40px !important;
    box-sizing: border-box !important;
    background: #fff !important;
  }
  .supply-pagination span.current,
  .supply-pagination .page-numbers.current {
    background: #2563eb !important;
    color: #fff !important;
    border-color: #2563eb !important;
  }
  .supply-pagination a:hover {
    background: #f3f4f6 !important;
  }
  .supply-pagination .dots {
    border: none !important;
    background: transparent !important;
    padding: 8px 4px !important;
    min-width: auto !important;
  }
  .supply-pagination .page-info {
    border: none !important;
    background: transparent !important;
    color: #888 !important;
    font-size: 12px !important;
    min-width: auto !important;
    padding: 8px 4px !important;
    white-space: nowrap !important;
  }

  @media (max-width: 768px) {
    .supply-filters {
      flex-direction: column;
    }
    .filter-group select {
      min-width: 100%;
    }
    .supply-table {
      font-size: 12px;
    }
    .supply-table th,
    .supply-table td {
      padding: 8px 6px;
    }
    .col-type, .col-status {
      display: none;
    }
  }

  .supply-detail-spec {
    margin: 1.5em 0;
  }
  .supply-detail-spec table {
    width: 100%;
    max-width: 500px;
    border-collapse: collapse;
  }
  .supply-detail-spec th {
    background: #f1f5f9;
    padding: 8px 12px;
    text-align: left;
    width: 140px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
  }
  .supply-detail-spec td {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
  }
  .supply-buy-links {
    margin: 1.5em 0;
  }
  .supply-buy-links a {
    display: inline-block;
    background: #f59e0b;
    color: #fff;
    padding: 8px 20px;
    border-radius: 6px;
    text-decoration: none;
    margin-right: 8px;
    margin-bottom: 8px;
    font-weight: bold;
  }
  .supply-buy-links a:hover {
    background: #d97706;
  }


/************************************
** モダンデザインCSS
************************************/

/* --- CSS変数 --- */
:root {
  --primary: #1e3a5f;
  --primary-light: #2563eb;
  --accent: #f59e0b;
  --bg-body: #f0f2f5;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --text-primary: #1a1a2e;
  --text-body: #374151;
  --text-secondary: #6b7280;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-hover: 0 8px 20px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
}

/* --- ベース --- */
body {
  background: var(--bg-body);
  color: var(--text-body);
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Yu Gothic', YuGothic, Meiryo, sans-serif;
  line-height: 1.8;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
}

html {
  scroll-behavior: smooth;
}

::selection {
  background: rgba(37, 99, 235, 0.15);
}

/* --- ヘッダー ダーク化 --- */
#header .header-in {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  padding: 0;
}

#header {
  background: #1a1a2e;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.logo-header img,
.site-name-text {
  color: #ffffff !important;
}

.site-name-text {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ヘッダー内テキストリンク白 */
#header a {
  color: #fff;
}

/* --- グローバルナビ --- */
#navi {
  background: #16213e;
  border-top: 1px solid rgba(255,255,255,0.1);
}

#navi .navi-in > ul > li > a {
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 20px;
  transition: color 0.2s, background 0.2s;
}

#navi .navi-in > ul > li > a:hover,
#navi .navi-in > ul > .current-menu-item > a {
  color: #ffffff;
  background: rgba(255,255,255,0.08);
}

/* --- メインコンテンツ カード化 --- */
.main {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}

/* --- 記事タイトル --- */
.entry-title,
.article h1 {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

/* --- 見出しスタイル --- */
.article h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  border-left: 4px solid var(--primary-light);
  border-bottom: none;
  background: #f8fafc;
  padding: 12px 16px;
  margin: 2.5em 0 1em;
  border-radius: 0 6px 6px 0;
  line-height: 1.4;
}

.article h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 8px;
  margin: 2em 0 0.8em;
}

/* --- 本文 --- */
.entry-content p {
  margin-bottom: 1.6em;
  line-height: 1.9;
}

/* --- 目次 --- */
.toc {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 1.5em 0 2em;
}

.toc-title {
  font-size: 15px;
  font-weight: 700;
}

/* --- サイドバー --- */
#sidebar {
  background: transparent;
}

.widget-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.widget-sidebar .widget-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  padding-bottom: 8px;
  margin-bottom: 14px;
  border-bottom: 3px solid var(--primary-light);
}

.widget-sidebar li {
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
}

.widget-sidebar li:last-child {
  border-bottom: none;
}

.widget-sidebar li a {
  color: var(--text-body);
  text-decoration: none;
  transition: color 0.2s;
}

.widget-sidebar li a:hover {
  color: var(--primary-light);
}

/* --- カード型記事一覧 --- */
.entry-card-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.25s;
  box-shadow: var(--shadow);
}

.entry-card-wrap:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.entry-card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.entry-card-snippet {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* カテゴリラベル ピル型 */
.cat-label {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 600;
  border: none;
}

/* --- ボタン --- */
.wp-block-button__link {
  border-radius: 8px;
  font-weight: 700;
  padding: 14px 32px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.wp-block-button__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* --- パンくずリスト --- */
.breadcrumb {
  font-size: 12px;
  color: var(--text-secondary);
  padding: 10px 0;
}

/* --- 引用 --- */
.entry-content blockquote {
  border-left: 4px solid var(--primary-light);
  background: #f8fafc;
  padding: 20px 24px;
  border-radius: 0 8px 8px 0;
  color: var(--text-secondary);
}

/* --- フッター --- */
#footer {
  background: #1a1a2e;
  color: #ccc;
}

#footer a {
  color: #ddd;
}

/* --- SNSシェアボタン非表示（固定ページ） --- */
.page .sns-share,
.page .sns-follow {
  display: none !important;
}

/* --- 日付タグ控えめに --- */
.date-tags {
  font-size: 12px;
  color: var(--text-secondary);
}

/* --- 画像角丸 --- */
.entry-content img {
  border-radius: 6px;
}

/* --- テーブル --- */
.entry-content table {
  border-collapse: collapse;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.entry-content table th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  padding: 10px 14px;
  font-size: 13px;
}

.entry-content table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.entry-content table tr:nth-child(even) {
  background: #f8fafc;
}

/* --- 記事→作品ページ CTA --- */
.tcg-work-cta {
  margin: 2.5em 0 1.5em;
  padding: 0;
}
.tcg-work-cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 20px;
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f4f8 100%);
  border: 1px solid #c7ddf0;
  border-radius: var(--radius);
  text-align: center;
}
.tcg-work-cta-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}
.tcg-work-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-light);
  text-decoration: none;
  padding: 10px 28px;
  background: #fff;
  border: 2px solid var(--primary-light);
  border-radius: 8px;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.tcg-work-cta-link:hover {
  background: var(--primary-light);
  color: #fff;
  transform: translateY(-1px);
}
.tcg-work-cta-arrow {
  font-size: 1.2em;
  transition: transform 0.2s;
}
.tcg-work-cta-link:hover .tcg-work-cta-arrow {
  transform: translateX(3px);
}
.tcg-work-cta-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/

/* --- 注記テキスト --- */
.supply-note {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 1em;
}

/* --- 著者・フォロー非表示 --- */
.author-info,
.sns-follow,
.follow-button-area {
  display: none !important;
}

/************************************
** レスポンシブ（834px以下）
************************************/
@media screen and (max-width: 834px){
  .main {
    padding: 20px 16px;
    border-radius: 0;
  }

  .article h2 {
    font-size: 1.2rem;
    padding: 10px 14px;
  }

  .entry-title,
  .article h1 {
    font-size: 1.3rem;
  }

  #navi {
    background: #1a1a2e;
  }

  /* ヘッダー縮小 */
  .logo-header {
    padding: 8px 0;
  }

  .site-name-text {
    font-size: 18px;
  }
}

/************************************
** レスポンシブ（768px以下）スマホ
************************************/
@media screen and (max-width: 768px) {

  /* サイドバー非表示・メイン全幅 */
  #sidebar {
    display: none;
  }
  .main {
    width: 100% !important;
    margin: 0 !important;
    padding: 12px !important;
  }
  #content {
    display: block;
  }

  /* === サプライDB コンパクトカード === */
  .supply-table thead {
    display: none;
  }

  .supply-table,
  .supply-table tbody {
    display: block;
    width: 100%;
  }

  .supply-table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 2px 10px;
    margin-bottom: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    box-shadow: var(--shadow);
    align-items: center;
  }

  .supply-table td {
    display: block;
    padding: 0;
    border-bottom: none;
    font-size: 13px;
  }

  .supply-table td::before {
    display: none;
  }

  /* 商品名: 1行目左（全文表示） */
  .supply-table td.col-name {
    grid-column: 1;
    grid-row: 1;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-primary);
  }

  /* 作品/メーカー/種類: 2行目左、1行 */
  .supply-table td.col-meta {
    grid-column: 1;
    grid-row: 2;
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* 購入ボタン: 右、縦中央 */
  .supply-table td.col-link {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
  }

  .supply-table td.col-link a {
    display: inline-block;
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
  }

  /* フィルタUIスマホ対応 */
  .supply-filters {
    flex-direction: column;
    gap: 8px;
  }

  .filter-group {
    width: 100%;
  }

  .filter-group select {
    width: 100%;
    min-width: 100%;
  }

  /* PC用ナビ非表示（Cocoonモバイルメニューに任せる） */
  #navi {
    display: none !important;
  }

  /* SNSシェアボタン非表示 */
  .sns-share {
    display: none !important;
  }

  /* H1サイズ縮小 */
  .entry-title {
    font-size: 1.2rem !important;
  }

  /* 作品CTA スマホ調整 */
  .tcg-work-cta-inner {
    padding: 18px 14px;
  }
  .tcg-work-cta-link {
    font-size: 1rem;
    padding: 10px 20px;
    width: 100%;
    justify-content: center;
  }
}

/* サイドバーのXフォローCTAはPC(#sidebar)のみ表示。slide-inとモバイルでは非表示 */
.tcg-twitter-sidebar { display: none; }
@media (min-width: 1024px) {
  #sidebar .tcg-twitter-sidebar { display: block; }
}
.tcg-x-follow-sidebar {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: linear-gradient(135deg,#f8fafc 0%, #f1f5f9 100%);
  padding: 1.1em 1em;
  margin: 0;
}
.tcg-x-follow-header {
  display: flex;
  align-items: center;
  gap: 0.7em;
  margin-bottom: 0.7em;
}
.tcg-x-follow-logo {
  width: 32px;
  height: 32px;
  fill: #0f172a;
  flex-shrink: 0;
}
.tcg-x-follow-meta { line-height: 1.3; }
.tcg-x-follow-name { font-weight: 700; font-size: 0.98em; color: #0f172a; }
.tcg-x-follow-handle { font-size: 0.84em; color: #64748b; }
.tcg-x-follow-desc {
  font-size: 0.88em;
  color: #475569;
  line-height: 1.6;
  margin: 0 0 0.9em;
}
.tcg-x-follow-btn {
  display: block;
  width: 100%;
  padding: 0.7em 0;
  background: #0f172a;
  color: #fff !important;
  text-decoration: none;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.95em;
  text-align: center;
  box-sizing: border-box;
  transition: opacity 0.15s;
}
.tcg-x-follow-btn:hover { opacity: 0.85; }

/* ============================================================
   ナビバー fixed 追従 (2026-05-16) - JS連動版
   初期表示: ロゴ下の自然な位置（static）
   スクロール後: 画面上端に固定（.navi-stuck クラス付与でfixed化）
   JS: theme/functions.php の tcg_navi_sticky_script() 参照
============================================================ */
#navi.navi {
  display: block !important;
  background: #16213e !important;
  height: 45px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* スクロール後: .navi-stuck クラスが付いたら画面上端fixed */
#navi.navi.navi-stuck {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 9999 !important;
}

/* navi-stuck時のみbody padding-topで空間確保 (固定化で元の位置が空になるため) */
body.navi-stuck {
  padding-top: 45px !important;
}
body.navi-stuck.admin-bar {
  padding-top: 77px !important;
}

#navi.navi .navi-in {
  width: 100% !important;
  max-width: 100% !important;
  height: 45px !important;
  padding: 0 !important;
  margin: 0 auto !important;
}

/* menu-mobile (Cocoonがスマホ用に別途出力する4項目ul) は隠す。menu-header (PC用ul) だけ使う */
#navi.navi ul.menu-mobile {
  display: none !important;
}

#navi.navi ul.menu-header {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: center !important;
  align-items: center !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 45px !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

#navi.navi ul.menu-header::-webkit-scrollbar {
  display: none;
}

#navi.navi ul.menu-header > li {
  flex: 0 0 auto !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  height: 45px !important;
  line-height: 45px !important;
  float: none !important;
  width: auto !important;
}

#navi.navi ul.menu-header > li > a {
  display: block !important;
  padding: 0 14px !important;
  color: #fff !important;
  font-size: 14px !important;
  white-space: nowrap !important;
  height: 45px !important;
  line-height: 45px !important;
}

#navi.navi ul.menu-header > li .item-label,
#navi.navi ul.menu-header > li .caption-wrap {
  white-space: nowrap !important;
  display: inline !important;
}

/* スマホでは項目数を絞って画面圧迫を回避 */
@media screen and (max-width: 834px) {
  #navi.navi ul.menu-header > li#menu-item-83,
  #navi.navi ul.menu-header > li#menu-item-55889 {
    display: none !important;
  }
  #navi.navi ul.menu-header > li > a {
    padding: 0 10px !important;
    font-size: 13px !important;
  }
  /* モバイルフッター固定バー（メニュー/ホーム/検索/トップ/サイドバー）を非表示 */
  .mobile-menu-buttons,
  .mobile-footer-menu-buttons,
  .mobile-header-menu-buttons {
    display: none !important;
  }
  /* body のフッターマージン（フッターバー用に確保されてたぶん）を解除 */
  body.mblt-footer-mobile-buttons,
  body.mblt-header-and-footer-mobile-buttons {
    margin-bottom: 0 !important;
  }
}
