/*
Theme Name: AFFINGER Child
Template: affinger
Description: AFFINGER6 対応
Version: 20240601
*/

/*--- ここからAFFINGER5子テーマから移植したカスタマイズ ---*/

/*サイドバーカスタマイズ記事一覧*/
ul.lcp_catlist li a{
	background-position: 3px 4px;
    display: block;
    width: auto;
    height: auto;
    text-decoration: none;
    padding: 5px 5px 5px 30px;
    background-image: url(https://futoruzo.com/wp-content/uploads/2018/08/a_arrow_orange.png);
    background-repeat: no-repeat;
/*     vertical-align: middle; */
}
a,a:visited {
    margin: 0;
    padding: 0;
    font-size: 100%;
    vertical-align: baseline;
    background: transparent;
}
.lcp_catlist {
    background: white;
    border: 1px solid paleturquoise;
}

/*Rinkerのクレ消し*/
div.yyi-rinker-detail .credit {
    font-size: 75%;
    display: none;
}

/*ブログカードの背景色*/
.st-cardbox.kanren {
    margin-top: 0;
    background-color: #f5fff5;
}


/*横並びボタン*/
.cube-b,.cube-y,.cube-r,.cube-g {
    display: inline-block;
    position: relative;
    padding: 6px 15px 4px;
    border-bottom: solid 2px rgba(0, 0, 0, .2);
    border-radius: 4px;
    box-shadow: inset 0 2px 0 rgba(255,255,255,.2), 0 2px 2px rgba(0, 0, 0, .19);
    color: #fff;
    font-weight: bold;
	  margin: .5em .5em .5em 0;
	text-decoration: none;
}
a.cube-r:hover,a.cube-g:hover,a.cube-b:hover,a.cube-y:hover{
	 color: white;
    text-decoration: none;
}
.cube-r {
    background: #f88080;
}
.cube-g {
    background: #90d581;
}
.cube-b{
    background: #4f9df4;
}
.cube-y{
    background: #ffb36b;
}

	/*-- スマホのすごいもくじのリスト前の数字消す（一時停止）--*/
/*
@media only screen and (max-width: 959px) {
	#st_toc_container.st_toc_hierarchical .st_toc_list li::before {
		display:none;
	}
}
*/

/* すごいもくじ（st-toc-lite）カスタマイズ - AFFINGER5風スタイル v4 */

/* コンテナ全体：薄い青背景・枠線・角丸・テキスト折り返し許可 */
#st_toc_container {
  padding: 1em 1.5em !important;
  margin: 2em 0;
  background: #f0f8ff; /* 薄い青（アリスブルー） */
  border: 1px solid #3686e2;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(54, 134, 226, 0.1);
  overflow: visible !important;
  word-wrap: break-word;
  word-break: break-word;
}

/* タイトルエリア：「目次」文字は白、背景は濃い青、メモアイコン付き */
#st_toc_container .st_toc_title {
  border-bottom: none;
  background: #3686e2;
  line-height: 2.5em;
  display: block;
  color: #fff !important;
  font-weight: bold;
  border-radius: 4px;
  padding-left: 1em;
  margin: -1em -1.5em 1em;
  position: relative;
  text-align: center;
}

/* メモ帳風アイコン（📝風）を「目次」の前に表示 */
#st_toc_container .st_toc_title::before {
  content: "";
  display: inline-block;
  width: 1.2em;
  height: 1.2em;
  margin-right: 0.5em;
  vertical-align: middle;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'%3E%3C/path%3E%3Cpolyline points='14 2 14 8 20 8'%3E%3C/polyline%3E%3Cline x1='16' y1='13' x2='8' y2='13'%3E%3C/line%3E%3Cline x1='16' y1='17' x2='8' y2='17'%3E%3C/line%3E%3Cpolygon points='10 13 12 13 12 17 10 17'%3E%3C/polygon%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}

/* ===== 「目次」タイトルの疑似要素（V矢印等）を完全無効化 ===== */
#st_toc_container .st_toc_title::after,
#st_toc_container .st_toc_title::before {
  /* 既存の::beforeはアイコン用なので上書きしないが、念のため */
  content: none !important;
  display: none !important;
}

/* ===== トグルボタン（V矢印・[非表示]）完全非表示 ===== */
/* トグル要素自体を非表示 */
#st_toc_container .st_toc_toggle,
#st_toc_container .st_toc_title .st_toc_toggle,
#st_toc_container .st_toc_title > .st_toc_toggle,
#st_toc_container .st_toc_title > span.st_toc_toggle,
#st_toc_container [class*="toc_toggle"],
#st_toc_container .st_toc_toggle a,
.st_toc_container.st_toc_hierarchical .st_toc_toggle,
.st_toc_container .st_toc_title .st_toc_toggle {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -9999px !important;
}

/* トグルの疑似要素も消す */
#st_toc_container .st_toc_toggle::before,
#st_toc_container .st_toc_toggle::after,
#st_toc_container .st_toc_toggle a::before,
#st_toc_container .st_toc_toggle a::after {
  content: none !important;
  display: none !important;
}

/* 戻るボタンも非表示 */
#st_toc_container .st_toc_back,
#st_toc_container [class*="toc_back"] {
  display: none !important;
}

/* リスト全体のパディング調整・テキスト折り返し許可 */
.post #st_toc_container ul,
.post #st_toc_container ol,
#st_toc_container .st_toc_list {
  padding: 0 0 0 3em !important;
  margin: 0;
  list-style: none;
  overflow: visible !important;
}

#st_toc_container .st_toc_list > li,
#st_toc_container .st_toc_list > li > ul > li {
  overflow: visible !important;
  word-wrap: break-word;
  word-break: break-word;
}

/* 階層なし（フラット）時の調整 */
#st_toc_container.only-toc .st_toc_list {
  padding-left: 3em !important;
}

#st_toc_container.only-toc li {
  list-style-type: none;
  border: none;
}

#st_toc_container.only-toc ul a {
  padding: 0 0 8px;
}

/* 階層あり（hierarchical）時のネスト調整 */
.post #st_toc_container ul ul {
  padding: 0 !important;
  padding-left: 2em !important;
  margin-top: 0.5em; /* h3同士の間に縦マージン */
}

#st_toc_container li li {
  padding: 0;
  line-height: 1.6;
}

#st_toc_container ul li li a {
  padding-left: 0;
  line-height: 1.5 !important;
}

#st_toc_container ul a {
  border-bottom: none;
  line-height: 1.6 !important;
  color: #333;
  text-decoration: none;
  transition: color 0.2s;
  display: block;
  overflow: visible !important;
  white-space: normal !important;
}

#st_toc_container ul a:hover {
  color: #3686e2;
}

/* カウンター設定（h2レベルのみ番号表示） */
#st_toc_container .st_toc_list > li {
  counter-increment: item;
  position: relative;
  padding-left: 0;
  margin-bottom: 0.3em;
  overflow: visible !important;
}

#st_toc_container .st_toc_list > li > ul > li {
  counter-increment: item2;
  margin-top: 0.5em; /* h3連続時の縦マージン */
  margin-bottom: 0.3em;
  padding-left: 0;
  overflow: visible !important;
}

/* h2（第1階層）の前に数字カウンター表示 */
#st_toc_container .st_toc_list > li::before {
  content: counter(item) " ";
  position: absolute;
  left: -2.5em;
  top: 0;
  background: #6b6b6b;
  width: 1.6em;
  height: 1.6em;
  line-height: 1.6em;
  font-size: 0.85em;
  text-align: center;
  color: #fff;
  border-radius: 50%;
  font-weight: bold;
  flex-shrink: 0;
}

/* h3（第2階層）にはカウンター（ドット）を表示しない */
#st_toc_container .st_toc_list > li > ul > li::before {
  content: none !important;
  display: none !important;
}

/* スマホ表示調整 */
@media print, screen and (max-width: 599px) {
  #st_toc_container {
    padding: 1em !important;
    margin: 1.5em 0;
  }
  
  .post #st_toc_container ul,
  .post #st_toc_container ol,
  #st_toc_container .st_toc_list {
    padding-left: 2.5em !important;
  }
  
  #st_toc_container .st_toc_list > li::before {
    left: -2.2em;
    width: 1.4em;
    height: 1.4em;
    line-height: 1.4em;
    font-size: 0.8em;
  }
  
  .post #st_toc_container ul ul {
    padding-left: 1.5em !important;
  }
}

/* ===== .scroll-box カスタマイズ ===== */
/* テーブルや幅広コンテンツの横スクロール見やすく */
.scroll-box {
  overflow-x: auto;
  overflow-y: hidden;
  margin: 1.5em 0;
  padding: 0.5em 0;
  border: 1px solid #e0e6ed;
  border-radius: 8px;
  background: #fafbfc;
  /* スクロールバー見た目調整（WebKit系） */
  scrollbar-width: thin;
  scrollbar-color: #bcccdc transparent;
}

.scroll-box::-webkit-scrollbar {
  height: 8px;
}

.scroll-box::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 4px;
}

.scroll-box::-webkit-scrollbar-thumb {
  background: #bcccdc;
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.scroll-box::-webkit-scrollbar-thumb:hover {
  background: #9ab0c8;
  background-clip: content-box;
}

/* 中のテーブル等の余白調整 */
.scroll-box > table,
.scroll-box > .wp-block-table {
  margin-bottom: 0 !important;
  min-width: 100%;
}

/* スクロールヒント（初回のみ表示） */
.scroll-box::before {
  content: "← スクロールできます →";
  display: block;
  text-align: center;
  font-size: 0.75em;
  color: #8898aa;
  padding: 0.25em 0;
  margin-bottom: -0.5em;
  opacity: 0.8;
  animation: scrollHintFade 3s ease-in-out forwards;
}

@keyframes scrollHintFade {
  0%, 70% { opacity: 0.8; }
  100% { opacity: 0; visibility: hidden; }
}

/* ホバー時はヒント再表示 */
.scroll-box:hover::before {
  animation: none;
  opacity: 0.6;
  visibility: visible;
}

/* スマホでは常にヒント表示 */
@media print, screen and (max-width: 599px) {
  .scroll-box::before {
    animation: none;
    opacity: 0.7;
  }
}

/* 空の最後列を非表示（念のため） */
.scroll-box table col:last-child {
width: 0 !important;
display: none;
}

.scroll-box table td:last-child:empty,
.scroll-box table th:last-child:empty {
display: none;
}

/* ===== パターンB対策：横スクロール強制 ===== */
/* テーブルに width: max-content を強制（画面幅に収めない） */
.scroll-box table[border] {
  width: max-content !important;
  min-width: 100% !important;
}

/* colgroup の幅合計（882px等）を尊重させる */
.scroll-box table[border="1"] {
  table-layout: fixed !important;  /* 列幅固定で colgroup 通りに描画 */
}

/* スクロールコンテナ側も確実に横スクロール許可 */
.scroll-box:has(table[border]) {
  overflow-x: auto !important;
  overflow-y: hidden !important;
  width: 100%;
  box-sizing: border-box;
}



/*--- ここまで移植カスタマイズ ---*/

/*media Queries スマートフォンとタブレットサイズ（959px以下）で適応したいCSS - スマホ・タブレット
---------------------------------------------------------------------------------------------------*/
@media only screen and (max-width: 959px) {


	/*-- ここまで --*/
}
	
/*media Queries タブレットサイズ（600px～959px）のみで適応したいCSS -タブレットのみ
---------------------------------------------------------------------------------------------------*/
@media only screen and (min-width: 600px) and (max-width: 959px) {


	/*-- ここまで --*/
}	
	
/*media Queries タブレット（600px）以上で適応したいCSS -タブレット・PC
---------------------------------------------------------------------------------------------------*/
@media only screen and (min-width: 600px) {

	
	/* PR表記画像 */
	/*
.kdate::after {
	content: '';
	display: inline-block;
	width: 300px;
	height: 20px;
	background-image: url('https://www.arikawashuhei.com/wp/content/uploads/2023/09/sutema.png');
	margin-left: 5px;
	background-size: contain;
	background-repeat: no-repeat;
	vertical-align: bottom;
}
	*/
	

	/*-- ここまで --*/
}

/*media Queries PCサイズ（960px）以上で適応したいCSS - PCのみ
---------------------------------------------------------------------------------------------------*/
@media print, screen and (min-width: 960px) {


	/*-- ここまで --*/
}

/*media Queries スマホサイズ（599px）以下で適応したいCSS - スマホのみ
---------------------------------------------------------------------------------------------------*/
@media print, screen and (max-width: 599px) {

	
	/* PR表記画像 */
	/*
.kdate::after {
	content: '';
	display: inline-block;
	width: 200px;
	height: 14px;
	background-image: url('https://www.arikawashuhei.com/wp-content/uploads/2023/09/sutema.png');
	margin-left: 5px;
	background-size: contain;
	background-repeat: no-repeat;
	vertical-align: bottom;
}
	*/
	
	
	/*-- ここまで --*/
}