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

/* =========================================================
   🔍 画像拡大表示（既存：構造・見た目変えずコメントのみ整流）
   ========================================================= */
.image-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
}
.image-container img {
    width: 100%;
    height: auto;
}
.image-container .overlay-text {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 5px;
    opacity: 1;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 5px; /* テキストとアイコンの間隔 */
}


/* =========================================================
   バッヂ（既存そのまま：色/サイズ/クラス不変）
   ========================================================= */
.badge {
    display: inline-block;
    padding: 0.1rem 0.2rem;
    border-radius: 0.1rem;
    color: #fff; font-size: 0.7rem;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
}
.bg-blue {background-color: #00b0b3;}
.bg-red {background-color: #e64d3c;}
.bg-green {background-color: #008057;}
.bg-yellow {background-color: #daa520;}
.bg-purple {background-color: #9a35cc;}
.bg-pink {background-color: #cc5490;}
.bg-gray {background-color: #808080;}
.bg-gray-2 {background-color: #5f9ea0;}

.badge_h {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    margin-right: 0.3rem;	
    border-radius: 0.2rem;
    color: #fff; font-size: 0.9rem;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
}
.bg_h {background-color: #ccffe8;
			color: #004224;}

/* =========================================================
   テーブル関係（スクロール・固定列：既存通り）
   ========================================================= */
/* ✅ Gutenbergのデフォルトテーブルを横スクロール可能にする */
.wp-block-table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
}

/* ✅ テーブル自体の設定 */
.wp-block-table table {
    width: 100%;
    white-space: nowrap;
    border-collapse: collapse;
}

/* ✅ 左カラム（1列目）を固定 */
.wp-block-table table tbody td:first-child,
.wp-block-table table thead th:first-child {
    position: sticky;
    left: 0;
	background-color: #fff !important; /* 100%適用されるように */
    z-index: 9; /* 強制的に前面へ */
    border-right: 1px solid silver;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1); /* 影を追加して浮き出させる */
}

/* ✅ スクロール固定時の左端セルの背景色を維持 */
.wp-block-table td:first-child,
.wp-block-table th:first-child {
    background-clip: padding-box; /* 背景色が重ならないようにする */	
    background-color: inherit; /* 親の背景色を継承 */

}
/* ✅ 横スクロールできることを知らせるラベル */
.scroll-hint {
    position: absolute;
    top: -25px; /* テーブルのすぐ上に表示 */
    left: 50%;
    transform: translateX(-50%);
    background: #ff9a00;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
    
    /* フェードアウトアニメーションを遅延させる */
    animation: fadeOut 4s ease-out forwards;
    animation-delay: 1s; /* 1秒間そのまま表示 */
}

/* 2秒間停止 → 4秒間かけて消える */
@keyframes fadeOut {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

/* =========================================================
   レスポンシブ・メディアクエリ（1081px以下）
   ========================================================= */
@media screen and (max-width: 1081px){
  /*必要ならばここにコードを書く*/
	th, td {
	font-size: 11px !important;
    padding: 1px !important;
}
	ul, ol {    
    margin-left: 0; /* 左側のマージン */
    margin-bottom: 20px !important;
}
	li {    
    margin-left: 0; /* 左側のマージン */
    margin-bottom: 0 !重要;
}	
	ul ul, ol ol {
    padding-left: 0; /* 階層ごとのインデントも調整 */
}
}

/* =========================================================
   レイアウト：コンテナ／3カラム（既存のID/クラス/順序そのまま）
   ========================================================= */
/* コンテナ */
.gw3c-container{
  width:100%;
  max-width:var(--content-max-width, 1200px);
  margin-inline:auto;
}

/* 3カラム */
.gw3c-grid{
  display:grid;
  grid-template-columns: 240px minmax(0,1fr) 280px;
	gap: 24px; /* ← 少しだけ余白を広げる */
	grid-template-areas: "left main right";
}
#sidebar-left{ grid-area:left; }
.gw3c-main{ grid-area:main; min-width:0; } /* ← min-width:0 追加 */
#sidebar-right{ grid-area:right; }          /* ← ここを #sidebar から修正 */

/* Cocoonのfloat等を打ち消し（ケンカ防止） */
#sidebar-right, #sidebar-left{
  float:none !important;
  width:auto !important;
}

/* --- スマホは本文→左→右の縦積み（Gridエリアで順序確定） --- */
@media (max-width: 767px){
  .gw3c-grid{
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "main"
      "left"
      "right";
  }
  /* 各エリアの紐付け（ID/クラスは実DOMに合わせる） */
  #sidebar-left{ grid-area: left; }
  .gw3c-main   { grid-area: main; }
  #sidebar     { grid-area: right; }

  /* 念のための保険：旧floatや幅指定を無効化 */
  #sidebar, #sidebar-left, .gw3c-main{
    float:none !important;
    width:auto !important;
  }
}


/* =========================================================
   HUBテンプレ専用（page-hub-3col.php）ヒーロー/パンくず/メニュー
   ========================================================= */

body.page-template-page-hub-3col .hub-hero{
  width:100%;
  height:260px;            /* PC表示の高さ（推奨帯） */
  background-size:cover;
  background-position:center;
  border-radius:8px;
  position:relative;
}

@media (max-width: 767px){
  body.page-template-page-hub-3col .hub-hero{
    height:180px;          /* SPだけ少し低くする */
  }
}

body.page-template-page-hub-3col .hub-hero__inner{
  position:absolute;
  inset:0;
  display:flex;
  align-items:flex-end;
  padding:16px;
  background:linear-gradient(180deg,rgba(0,0,0,0) 40%,rgba(0,0,0,.45) 100%);
  color:#fff;
}

body.page-template-page-hub-3col .hub-hero__title{
  font-size:clamp(20px,3vw,32px);
  margin:0;
}

/* メニュー枠の下マージン（後で中身追加想定） */
body.page-template-page-hub-3col .hub-menu-slot{
  margin: 16px 0;
}

/* パンくず（HUBテンプレ専用の簡易版） */
body.page-template-page-hub-3col .gw3c-bc{
  display:flex; flex-wrap:wrap; gap:6px;
  list-style:none; padding:0; margin:8px 0 12px;
  font-size:.9rem;
}
body.page-template-page-hub-3col .gw3c-bc li{
  display:inline-flex; align-items:center;
}
body.page-template-page-hub-3col .gw3c-bc li+li::before{
  content:"›"; margin:0 6px; opacity:.6;
}
body.page-template-page-hub-3col .gw3c-bc [aria-current="page"]{
  opacity:.8;
}

/* ===== HUBメニュー：grid 等分配置（PC9列 / SP3列） ===== */
body.page-template-page-hub-3col .hub-menu ul{
  display:grid;
  gap:10px;
  padding:0;
  margin:0;
  list-style:none;
}

/* PC = 9列固定 */
@media (min-width: 768px){
  body.page-template-page-hub-3col .hub-menu ul{
    grid-template-columns: repeat(9, 1fr);
  }
}

/* SP = 3列（行は自動で折れる） */
@media (max-width: 767px){
  body.page-template-page-hub-3col .hub-menu ul{
    grid-template-columns: repeat(3, 1fr);
  }
}

body.page-template-page-hub-3col .hub-menu a{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  min-height:40px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  text-decoration:none;
  font-size:14px; /* 今は共通。後から個別対応可能 */
}
/* PC共通：gap圧縮 + 上下余白圧縮 */
@media (min-width:768px){
  body.page-template-page-hub-3col .hub-menu ul{
    gap:0 !important;        /* 10 → 4 */
    margin:2px 0 !important;   /* 16 → 8 */
  }
}

/* SP：さらに強めに圧縮 */
@media (max-width:767px){
  body.page-template-page-hub-3col .hub-menu ul{
    gap:2px !important;        /* 10 → 2 */
    margin:4px 0 !important;   /* 16 → 4 */
  }
}
/* ==========================================
   HUBメニュー：PC/SPとも gapゼロ（table風に密着）
========================================== */
body.page-template-page-hub-3col .hub-menu ul{
  gap:0 !important;      /* ← 全デバイスで隙間ゼロ */
  margin:4px 0 !important;  /* 上下の余白も必要最小に */
}
body.page-template-page-hub-3col .hub-menu-slot{
  margin:0 !important;
  padding:0 !important;
  background:none !important;
  border:none !important;
}
/* ================================
   HUBメニュー：Game8 風「囲い枠セル」
   - gap 0（密着）
   - 外枠：ul、内枠：li の罫線で表現
   - 反転は a ではなく「セル(li)」背景で実行
================================ */

/* 外枠 */
body.page-template-page-hub-3col .hub-menu ul{
  gap:0 !important;
  margin:4px 0 !important;
  border:1px solid #cbd5e1;   /* 外枠 */
  border-radius:6px;
  overflow:hidden;             /* 角丸に沿って切り取り */
  background:#fff;
}

/* 内側グリッド線（基本：左&上だけに線を引く。外枠はulが担当） */
body.page-template-page-hub-3col .hub-menu li{
  margin:0;
  list-style:none;
  border-left:1px solid #cbd5e1;
  border-top: 1px solid #cbd5e1;
  background:#fff;            /* 通常時のセル背景 */
  transition:background .12s ease;
}

/* --- PC(9列)の「最左列」と「最上段」は線を消して外枠と重複しないように --- */
@media (min-width:768px){
  /* 最左列（9n+1）→ 左線を消す */
  body.page-template-page-hub-3col .hub-menu li:nth-child(9n+1){ border-left:none; }
  /* 最上段（先頭9個）→ 上線を消す */
  body.page-template-page-hub-3col .hub-menu li:nth-child(-n+9){ border-top:none; }
}

/* --- SP(3列)版も同様に列数に合わせて調整 --- */
@media (max-width:767px){
  /* 最左列（3n+1）→ 左線を消す */
  body.page-template-page-hub-3col .hub-menu li:nth-child(3n+1){ border-left:none; }
  /* 最上段（先頭3個）→ 上線を消す */
  body.page-template-page-hub-3col .hub-menu li:nth-child(-n+3){ border-top:none; }
}

/* セル内リンク（枠線は li 側が持つため a のボーダーは消す） */
body.page-template-page-hub-3col .hub-menu a{
  display:flex; align-items:center; justify-content:center;
  width:100%;
  min-height:40px;                /* まだボタン高さは触らない */
  padding:6px 6px;                /* ほぼゼロに近い控えめ余白 */
  text-decoration:none;
  font-size:14px;
  border:none; background:transparent;  /* ← a 自身の背景は透明 */
}

/* hover/active/focus：セル(li)の背景を反転 */
body.page-template-page-hub-3col .hub-menu li:hover,
body.page-template-page-hub-3col .hub-menu li:focus-within{
  background:#f1f5f9;            /* = グレー反転（a背景ではなくセル背景） */
}

/* タッチ端末での “押した感” */
body.page-template-page-hub-3col .hub-menu a:active{
  filter:brightness(0.96);
}

/* ダーク系テーマ保険（任意）
@media (prefers-color-scheme: dark){
  body.page-template-page-hub-3col .hub-menu ul{ border-color:#475569; background:#0f172a; }
  body.page-template-page-hub-3col .hub-menu li{ border-color:#475569; background:#0f172a; }
  body.page-template-page-hub-3col .hub-menu li:hover{ background:#1e293b; }
}
*/

/* フォールバック：ラッパーが無くても箇条書き化しない */
body.page-template-page-hub-3col .hub-menu-slot > ul{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

body.page-template-page-hub-3col .hub-menu a:hover{
  background:#f7f7f7;
}

/* HUBページだけ、親ラッパーの余白を殺す */
body.page-template-page-hub-3col .content-in.wrap{
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-top: 0 !important;
}

/* 念のため main 自体に何か付いていた場合もゼロ化 */
body.page-template-page-hub-3col main.main{
  margin: 0 !important;
  padding: 0 !important;
}

/* ヒーロー自身の余白ゼロ（下も含めて） */
body.page-template-page-hub-3col .hub-hero{
  margin: 0 !important;
  padding: 0 !important;
}

/* ヒーロー内テキストの余白が原因になるのを防止（保険） */
body.page-template-page-hub-3col .hub-hero h1,
body.page-template-page-hub-3col .hub-hero p{
  margin-top: 0 !important;
}

/* 横スクロールの保険（はみ出し対策） */
body.page-template-page-hub-3col{ overflow-x: clip; }  /* だめなら hidden */

/* ===========================
   HUBパンくず：SPだけ縮小（PCは現状維持）
   =========================== */
@media (max-width: 767px){
  body.page-template-page-hub-3col .gw3c-bc{
    font-size: 12px !important;   /* ← 好みで 11–13 に微調整可 */
    gap: 4px;                      /* 少しだけ詰める（任意） */
    line-height: 1.3;
  }
  body.page-template-page-hub-3col .gw3c-bc li+li::before{
    margin: 0 4px;                 /* 仕切りも詰める */
  }
}

/* （任意）超長いときのはみ出し対策。横スクロール許容ならON
@media (max-width: 767px){
  body.page-template-page-hub-3col .gw3c-bc{
    white-space: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
*/

/* ==========================================
   HUB：SPで本文端だけ余白を戻す（ヒーロー・メニュー除外）
   ========================================== */
@media (max-width:767px){
  body.page-template-page-hub-3col .gw3c-main{
    padding-inline:16px;
  }
}

/* ==========================================
   HUB：SPで左右カラムにも余白を復帰
   ========================================== */
@media (max-width: 767px){
  body.page-template-page-hub-3col #sidebar-left,
  body.page-template-page-hub-3col #sidebar-right{
    box-sizing: border-box;
    padding-inline: 16px;   /* 好みで 20px / 24px に微調整OK */
  }
}

/* =========================================================
   ヘッダー圧縮（Header compact v2：既存通り）
   ========================================================= */

/* PC 共通 — ヘッダー外枠を詰める */
#header.header.ba-fixed.cf{
  padding-block: 5px;
}

/* PC — ロゴ縮小 */
#header .site-logo-image.header-site-logo-image{
  max-height: 27px;
  height: auto;
  width: auto;
}
#header .site-name,
#header .site-name-text-link,
#header .site-name-text{
  margin: 0;
  padding: 0;
  line-height: 1.15;
}

/* hub-global-hero タイトル内リンクの見た目を継承（色そのまま・下線なし） */
.hub-global-hero__title a{
  color: inherit;
  text-decoration: none;
}
.hub-global-hero__title a:hover,
.hub-global-hero__title a:focus{
  text-decoration: none; /* 好みで：下線イヤなら削除可 */
}

/* SP（768以下） — さらに圧縮 */
@media (max-width: 768px){
  #header.header.ba-fixed.cf{
    padding-block: 4px;
  }
  #header .site-logo-image.header-site-logo-image{
    max-height: 22px;
  }
  #header .site-name,
  #header .site-name-text-link,
  #header .site-name-text{
    line-height: 1.20;
  }
}

/* 管理バーとの干渉最小化（ログイン時） */
@media (min-width: 782px){
  body.admin-bar #header.header.ba-fixed.cf{
    margin-top: 2px;
  }
}

/* =========================================================
   共通ヘッダー（hub-global-hero）— 投稿/固定共用（既存通り）
   ========================================================= */
.hub-global-hero {
  width:100%;
  height:180px;
  background-size:cover;
  background-position:center;
  border-radius:8px;
  position:relative;
  margin-bottom:12px;
}
.hub-global-hero__inner {
  position:absolute;
  inset:0;
  display:flex;
  align-items:flex-end;
  padding:12px;
  background:linear-gradient(180deg,rgba(0,0,0,0) 40%,rgba(0,0,0,.45) 100%);
  color:#fff;
}
.hub-global-hero__title {
  font-size:clamp(18px,3vw,28px);
  margin:0;
}

/* 再定義（帯風バリアント含む）— 既存通り */
.hub-global-hero {
  width:100%;
  background-size:cover;
  background-position:center;
  position:relative;
  border-radius:6px;
  margin-bottom:16px;
  overflow:hidden;
}
.hub-global-hero__inner {
  position:absolute;
  inset:0;
  display:flex;
  align-items:flex-end;
  padding:10px 14px;
  background:linear-gradient(180deg,rgba(0,0,0,0) 30%,rgba(0,0,0,0.55) 100%);
  color:#fff;
}
.hub-global-hero__title {
  font-size:clamp(18px,2.8vw,28px);
  margin:0;
  line-height:1.2;
}
/* HUB固定ページ：大きめ */
body.page-template-page-hub-3col .hub-global-hero { height:240px; }
/* 投稿（game付き）：タイトル帯風 */
body.single-post.page-template-page-hub-3col .hub-global-hero { height:100px; background-position:center 30%; }
body.single-post.page-template-page-hub-3col .hub-global-hero__inner { align-items:center; background:rgba(0,0,0,0.45); justify-content:center; }

/* =========================================================
   パンくず（共通）：本文と同じ左右余白・下線（既存通り）
   ========================================================= */
.gw3c-breadcrumbs {
  font-size: 14px;
  color: #666;
  margin: 0 auto 20px;
  padding: 0 16px 3px;
  border-bottom: 1px solid #ddd;
  max-width: var(--content-max-width, 1200px);
}
.gw3c-breadcrumbs a { color: #0073aa; text-decoration: none; }
.gw3c-breadcrumbs a:hover { text-decoration: underline; }

.gw3c-bc {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.gw3c-bc li::after { content: "›"; color: #aaa; margin-left: 6px; }
.gw3c-bc li:last-child::after { content: ""; }
.gw3c-bc li[aria-current="page"] { color: #333; font-weight: 600; }

/* スマホ：フォント少し小さく・余白も統一 */
@media (max-width: 767px){
  .gw3c-breadcrumbs {
    font-size: 13px;
    padding: 0 16px 6px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
  }
}

/* HUBページのパンくず：重複する「›」を打ち消す */
body.page-template-page-hub-3col .gw3c-bc li::after { content: none !important; }

/* =========================================================
   3カラム：カード化スタイル（影・枠・パディング：既存通り）
   ========================================================= */
.gw3c-grid {
  gap: 15px;
}
.gw3c-main,
#sidebar-left,
#sidebar-right {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 0;
  padding: 18px;
  box-shadow:
    0 3px 6px rgba(0,0,0,0.08),
    0 8px 18px rgba(0,0,0,0.04);
}
/* PC時のみ：サイドバーpaddingを少し狭く */
@media (min-width: 768px){
  #sidebar-left,
  #sidebar-right {
    padding: 6px 6px;
  }
}
/* メインだけやや強めに（主役感） */
.gw3c-main {
  box-shadow:
    0 4px 8px rgba(0,0,0,0.1),
    0 10px 24px rgba(0,0,0,0.05);
}
/* モバイルでは軽量にして負荷を下げる */
@media (max-width: 767px){
  .gw3c-main,
  #sidebar-left,
  #sidebar-right {
    margin-bottom: 14px;
    padding: 14px;
    box-shadow:
      0 2px 4px rgba(0,0,0,0.08),
      0 6px 12px rgba(0,0,0,0.03);
  }
}
/* グリッドの子要素を等高にしない */
.gw3c-grid{ align-items: start; }
/* 念のため：テーマ側が高さを盛っている場合の保険 */
#sidebar-left, #sidebar-right{ align-self: start; height: auto; min-height: 0; }
