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

/*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) {


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

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


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

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

	
	/*-- ここまで --*/
}
/* nc:ここから（blog/render.py の CSS から出している。手で書き換えない） */
/* --- AI ニュース記事の中だけ --- */
.entry-content .nc-numbers{border-collapse:collapse;width:100%;font-size:15px;margin:0}
.entry-content .nc-numbers th,.entry-content .nc-numbers td{
 border-bottom:1px solid rgba(0,0,0,.12);padding:9px 10px;text-align:left;vertical-align:top}
.entry-content .nc-numbers tr:last-child th,
.entry-content .nc-numbers tr:last-child td{border-bottom:0}
.entry-content .nc-numbers th{width:44%;font-weight:600;opacity:.75}
.entry-content .nc-num{font-weight:700;font-size:1.08em}
.entry-content .nc-points li{margin:6px 0}
.entry-content .nc-talk{margin:0 0 8px}
.entry-content .nc-note{margin:32px 0 0;opacity:.7}
.entry-content .nc-source{margin:0;padding-left:1.3em}
.entry-content .nc-source li{margin:5px 0;word-break:break-word}
/* 枠の大きさは AFFINGER の .youtube-container（padding-bottom で比率を作り、
   iframe を absolute で敷き詰める）に任せる。**ここで aspect-ratio を書くと
   height:auto が theme の height:100% に勝ってしまい、縦枠が効かない。** */
.entry-content .nc-video iframe{border:0;border-radius:6px}
/* 縦動画（ショート）は 16:9 に入れると左右が真っ黒になるので縦枠にする。
   AFFINGER は iframe を .youtube-container（padding-bottom:56.25% / height:0）で
   包み、iframe を absolute で敷き詰める。**iframe 側に aspect-ratio を書いても
   効かない。**包んでいる側の padding-bottom を 9:16 に変える */
.entry-content .nc-short{max-width:340px;margin-left:auto;margin-right:auto}
.entry-content .nc-short .youtube-container{padding-bottom:177.78%}
.entry-content .nc-toc{margin:0;padding-left:1.4em}
.entry-content .nc-toc li{margin:6px 0}
.entry-content .nc-toc a{text-decoration:none}
.entry-content .nc-toc a:hover{text-decoration:underline}
/* 見出しへ飛んだとき 追従ヘッダーの下に隠れないように */
.entry-content h2[id]{scroll-margin-top:80px}
@media only screen and (max-width:599px){
 .entry-content .nc-numbers th{width:40%}
 .entry-content .nc-numbers th,
 .entry-content .nc-numbers td{padding:7px 6px;font-size:14px}
}
/* nc:ここまで */

/* nc-header:ここから（帯を題名にする。帯は blog/make_header.py が焼いたもの） */
/* 文字の題名を消すのは **テーマの設定**でやっている（AFFINGER 管理 → ヘッダー →
   「ヘッダーにサイト名（またはロゴ）を表示しない」= st-data101）。
   最初ここに CSS で隠す書き方を入れたが、テーマに同じ設定があるのでやめた。
   スマホは、上の追従バーの中身がこの題名しかなくなるので出したまま。
   ここに残すのは、設定では直せない次の 2 つだけ。 */
/* 題名が無くなると #headbox の中身が空になる。padding だけ残ると
   帯の上に濃紺の細い線が出る */
/* 題名を消すと #headbox の中身が空になる。テーマは**このとき用に**
   `#headbox{padding:5px 10px!important}` を出すので（st-themecss.php:18416
   「サイト名が非表示ならキャッチフレーズのパディングを少なめに」）、
   帯の上に濃紺の線が 10 ピクセル 残る。設定では 0 にできない。
   **!important を消せるのは !important だけ**なので、ここだけ同じ強さで書く。
   子テーマの style.css は本体より**先に**読まれるので、強さで勝つしかない。 */
@media print, screen and (min-width:960px){
	#header-full #headbox{padding-top:0!important;padding-bottom:0!important;min-height:0}
}
/* 帯は <a> で包まれている（押すとトップへ戻る）。img が inline のままだと
   下に行の隙間が残って、帯と記事のあいだに数ピクセルの線が出る */
#st-header a img{display:block}
/* nc-header:ここまで */

/* nc-footer:ここから（Live2D のクレジットをフッターに出す） */
/* 立ち絵は全記事に出るので、クレジットも全ページに要る。フッターの
   ウィジェット（フッター2列目 = sidebar-11）に 1 行 入れてある。
   テーマはフッターの**自前の部品**（サイト名・コピーライト）にだけ白を当てていて、
   ウィジェットの中の字には当てていない。body の黒を継いで濃紺の上で読めなかった。
   ここに当たる color の規則はテーマ側に 1 つ も無いので、!important は要らない。 */
#footer .footer-r,
#footer .footer-r a { color:#fff; }
#footer .footer-r a { text-decoration:underline; }
#footer .footer-r p { margin:0; line-height:1.7; opacity:.85; }
/* nc-footer:ここまで */

/* nc-sns:ここから（SNS は URL コピーだけ残した。1 つ だけだと絵柄では
   何のボタンか分からないので、文字を出して枠の付いたボタンにする。
   テーマの生成 CSS（st-themecss-loader）が .sns li と .sns li a に
   width:40px と border-radius:50% を当てているので、そこに勝つ細かさで書く） */
.sns.st-sns-singular li.share-copy { width:auto; }
.sns.st-sns-singular li.share-copy .snstext { display:inline; font-size:13px; }
.sns.st-sns-singular li.share-copy a {
  width:auto; padding:0 16px; gap:7px;
  border-radius:4px; border:1px solid #d5d5d5;
  background:#fff; color:#555;
}
.sns.st-sns-singular li.share-copy a:hover { background:#f5f5f5; }
.sns.st-sns-singular li.share-copy a i { color:#888; }
/* nc-sns:ここまで */

/* nc-top:ここから（トップページの中身。出しているのは子テーマ functions.php の
   [nc_hero] [nc_popular] [nc_videos] [nc_author]）*/
/* 子テーマの style.css は本体より**先に**読まれるので、順番では勝てない。
   当たりそうなところは細かさ（クラス 2 つ 以上）で書く。 */
.nc-top { margin: 0 0 2.6em; }
.nc-top a { text-decoration: none; }

/* リードとカテゴリのボタン */
.nc-top.nc-hero { padding: 1.4em 1.2em 1.2em; background: #f7f9fb;
	border: 1px solid #e6ebf0; border-radius: 8px; }
.nc-top .nc-hero-t { margin: 0 0 .4em; font-size: 19px; font-weight: 700;
	line-height: 1.5; color: #2b3440; }
.nc-top .nc-hero-s { margin: 0 0 1em; font-size: 13px; line-height: 1.85; color: #5b6773; }
/* カテゴリ。**丸いボタンが「ダサい」と言われたので、地に絵を敷いたカードにした。**
   絵は blog/make_cat_bg.py が焼いて、子テーマの img/cat-<カテゴリー ID>.jpg へ置く。
   **絵に字は焼いていない**ので、件数が変わっても絵は作り直さない。
   絵が無いカテゴリは下の丸いボタンのまま出る（あとで足すサブカテゴリ用） */
.nc-top .nc-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.nc-top .nc-cat { display: flex; flex-direction: column; align-items: center;
	justify-content: center; gap: 2px; padding: 7px 13px; color: #2b3440;
	background: #fff; border: 1px solid #d9e1e8; border-radius: 999px; }
.nc-top .nc-cat-n { font-size: 13px; font-weight: 700; white-space: nowrap; }
.nc-top .nc-cat-c { font-size: 11px; font-weight: 400; color: #8b96a2; }
.nc-top .nc-cat:hover { background: #2b3440; color: #fff; border-color: #2b3440; }
.nc-top .nc-cat:hover .nc-cat-c { color: #c7d0d9; }

/* 絵があるものだけカードにする */
.nc-top .nc-cat-bg { aspect-ratio: 5 / 3; padding: 0 6px; gap: 4px; color: #fff;
	border: 0; border-radius: 8px; background-color: #1a2430;
	background-size: cover; background-position: center;
	transition: filter .2s, box-shadow .2s; }
/* 字の大きさは**よそを測って決めた**（1280 幅 で測った値）。
   じゃらん 地方の札  143x92 / 234x76 / 256x88   16px
   食べログ ジャンル  128x128                    16px
   食べログ 特集      385x241                    20px
   icotto             142x142                    14px
   2week.net          255x96                     18〜21px（絵に焼いてある）
   うちの札           193x116                    15px ← 測った中でいちばん小さい
   **16px がどこでも出てくる下限**で、札が大きくてもあまり上げていない。
   2week は札が横長（2.66:1）で 18〜21px。うちの札は 193 幅 と、食べログの
   128 やじゃらんの 143 より大きいので、20px を取る */
.nc-top .nc-cat-bg .nc-cat-n { font-size: 20px; letter-spacing: .02em;
	text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.nc-top .nc-cat-bg .nc-cat-c { font-size: 13px; color: #cfdde9;
	text-shadow: 0 1px 5px rgba(0,0,0,.6); }
.nc-top .nc-cat-bg:hover { background-color: #1a2430; border: 0; color: #fff;
	filter: brightness(1.18); box-shadow: 0 2px 10px rgba(0,0,0,.22); }
.nc-top .nc-cat-bg:hover .nc-cat-c { color: #cfdde9; }

/* ヒーローのスライド。**組み立てはテーマの slick**（[st-catgroup slide="on"]）。
   こちらで足すのは余白と角丸だけ。テーマの色を塗り替えない */
.nc-top .nc-hero-slider { margin: 0 0 1.1em; }
/* **テーマの .content-post-slider は display:flex**（スライドさせないときの
   カード並べ用）。スライダーにも当たるので、.slick-list と .slick-dots が
   横に並んでしまう。測った値: slider 651 ピクセル に対して list 325 ピクセル。
   ここだけ block に戻す */
.nc-top .nc-hero-slider .content-post-slider { display: block; margin: 0; width: 100%; }
.nc-top .nc-hero-slider .content-post-slider .slick-list { width: 100%; }
.nc-top .nc-hero-slider .post-slide-image { overflow: hidden; border-radius: 6px; }
/* テーマは高さを幅の 56% にする。**アイキャッチは 1200x630 = 52.5%** なので
   上下が 21 ピクセル ぶん切れる。題を焼き込んである絵なので切らせない */
.nc-top .nc-hero-slider .post-slide-image:before { padding-top: 52.5%; }
.nc-top .nc-hero-slider .slick-dots { position: static; margin: .6em 0 0; }
/* 点を絶対位置から外したので、テーマが下に空けている 35 ピクセル は要らない */
.nc-top .nc-hero-slider .slick-slider.slick-dotted { padding-bottom: 0; }
/* 矢印。テーマの既定は**白い記号だけ**（背景なし・不透明度 .6）で、
   題の白い文字に重なると読めない。丸い下敷きを敷く。
   **暗い下敷きは効かない**（アイキャッチが暗いので埋もれる。1 回 試した）ので白 */
.nc-top .nc-hero-slider .slick-prev,
.nc-top .nc-hero-slider .slick-next {
	display: flex; align-items: center; justify-content: center;
	top: calc(50% - 16px); width: 32px; height: 32px; opacity: 1;
	background: rgba(255,255,255,.88); border-radius: 50%;
	box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.nc-top .nc-hero-slider .slick-prev { left: 10px; }
.nc-top .nc-hero-slider .slick-next { right: 10px; }
.nc-top .nc-hero-slider .slick-prev:hover,
.nc-top .nc-hero-slider .slick-next:hover { background: #fff; }
.nc-top .nc-hero-slider .slick-prev:before,
.nc-top .nc-hero-slider .slick-next:before {
	padding: 0; font-size: 15px; line-height: 1; color: #2b3440; opacity: 1; }

/* 見出し。テーマの h2 は背景と ::before が付くので、そこを消してから書く */
.nc-top .nc-sec-t { position: relative; margin: 0 0 1em; padding: 0 0 .5em;
	font-size: 17px; font-weight: 700; color: #2b3440; line-height: 1.4;
	background: none; border: 0; border-bottom: 2px solid #2b3440; border-radius: 0; }
.nc-top .nc-sec-t:before, .nc-top .nc-sec-t:after { display: none; content: none; }
.nc-top .nc-sec-sub { margin-left: .7em; font-size: 11px; font-weight: 400; color: #8b96a2; }

/* カード */
.nc-top .nc-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 16px; }
.nc-top .nc-card { display: block; color: inherit; }
.nc-top .nc-card-img { position: relative; display: block; overflow: hidden;
	border-radius: 6px; background: #eef1f4; aspect-ratio: 1200 / 630; }
.nc-top .nc-card-img img { display: block; width: 100%; height: 100%;
	object-fit: cover; transition: transform .3s; }
.nc-top .nc-card:hover .nc-card-img img { transform: scale(1.05); }
.nc-top .nc-rank { position: absolute; left: 0; top: 0; min-width: 26px; height: 26px;
	padding: 0 6px; display: flex; align-items: center; justify-content: center;
	font-size: 13px; font-weight: 700; color: #fff; background: #2b3440;
	border-radius: 6px 0 6px 0; }
.nc-top .nc-card:nth-child(1) .nc-rank { background: #b8860b; }
.nc-top .nc-play { position: absolute; left: 50%; top: 50%; width: 46px; height: 32px;
	margin: -16px 0 0 -23px; background: rgba(0,0,0,.72); border-radius: 7px; }
.nc-top .nc-play:after { content: ""; position: absolute; left: 18px; top: 9px;
	border: 7px solid transparent; border-left: 11px solid #fff; border-right: 0; }
.nc-top .nc-card-body { display: block; padding: .6em 0 0; }
.nc-top .nc-card-cat { display: inline-block; margin: 0 0 .35em; padding: 2px 7px;
	font-size: 10px; color: #5b6773; background: #eef1f4; border-radius: 3px; }
.nc-top .nc-card-t { display: block; font-size: 13.5px; font-weight: 700;
	line-height: 1.55; color: #2b3440; }
.nc-top .nc-card:hover .nc-card-t { color: #1a73e8; }
.nc-top .nc-card-d { display: block; margin-top: .35em; font-size: 11px; color: #8b96a2; }

/* 著者欄 */
.nc-top.nc-author { padding: 1.3em 1.2em; background: #fff;
	border: 1px solid #e6ebf0; border-radius: 8px; }
.nc-top .nc-author-h { font-size: 15px; }
.nc-top .nc-author-b { display: flex; gap: 16px; align-items: flex-start; }
.nc-top .nc-author-i { flex: 0 0 auto; width: 72px; height: 72px;
	border-radius: 50%; border: 1px solid #e6ebf0; }
.nc-top .nc-author-n { margin: 0 0 .4em; font-size: 15px; font-weight: 700; color: #2b3440; }
.nc-top .nc-author-d { margin: 0 0 .7em; font-size: 12.5px; line-height: 1.85; color: #5b6773; }
.nc-top .nc-author-l a { display: inline-block; margin: 0 1em .3em 0;
	font-size: 12px; color: #1a73e8; }
.nc-top .nc-author-l a:hover { text-decoration: underline; }

/* 新着一覧の見出しも、上の 2 つ と同じ形にそろえる（トップページだけ）。
   テーマの既定は濃紺の帯 + 白文字 */
.home .n-entry-t { margin: 30px 0 1em; padding: 0 0 .5em; border-bottom: 2px solid #2b3440; }
.home .n-entry-t .n-entry { display: inline; padding: 0; font-size: 17px; font-weight: 700;
	line-height: 1.4; color: #2b3440; background: none; border: 0; border-radius: 0; }
.home .n-entry-t .n-entry:before, .home .n-entry-t .n-entry:after { display: none; content: none; }

@media only screen and (max-width: 767px) {
	/* 画面が狭いと 72 ピクセル は空きすぎるので詰める（テーマ側が 30 足してくる） */
	.nc-top { margin-bottom: 1.2em; }
	.nc-top .nc-cards { grid-template-columns: repeat(2, 1fr); gap: 14px 12px; }
	.nc-top .nc-hero-t { font-size: 16px; }
	.nc-top .nc-cats { gap: 7px; }
	/* 375 幅 だと札は 110 幅 ほど。「ツール・基盤」6 文字 が 1 行 に
	   収まる上限が 15px なので 14px にする（12px は小さすぎた） */
	/* 中身の幅は 86。「ツール・基盤」がちょうど 86 で**余りが無い**ので、
	   左右の余白だけ 6 → 3 に詰めて 92 にする。名前が長いサブカテゴリーが
	   来ても、すぐには はみ出さない */
	.nc-top .nc-cat-bg { padding: 0 3px; }
	.nc-top .nc-cat-bg .nc-cat-n { font-size: 14px; }
	.nc-top .nc-cat-bg .nc-cat-c { font-size: 11px; }
	.nc-top .nc-card-t { font-size: 12.5px; }
	.nc-top .nc-author-b { gap: 12px; }
	.nc-top .nc-author-i { width: 56px; height: 56px; }
}
/* nc-top:ここまで */

/* --- スマホのヘッダー ------------------------------------------------
   帯（☰ と 🔍 の行）とバナーの**両方にブログ名が出ていた。**
   測った値（375 幅）:

       帯 dt.trigger        375x100  top 46   display:flex / space-between
         ☰                   52x48   left 0
         #st-mobile-logo    271x20   「AIニュース24」16px
         🔍                  52x48   right 0
       バナー               375x81   top 146  「AIニュース24」が焼いてある

   残すのはバナーの方。**配信サイドが作った版下で、字も絵も入っている。**
   帯の方はただの黒字なので、こちらを消す。

   **display:none にはしない。**バナーの img は alt が空なので、
   帯の見出しを丸ごと消すと**ブログ名が読み上げにも検索にも残らない。**
   字だけ見えなくして、中身は置いておく。
   帯は space-between なので、消しても ☰ は左、🔍 は右のまま。

   **幅は 959 まで。**767 で切ると足りない。テーマは帯を
   `print, screen and (min-width: 960px) { .pcnone { display: none } }`
   で消しているので、**768〜959 では帯が出たまま**になる（768 幅 の
   タブレットを縦にしたとき）。帯が出る幅とそろえる */
@media only screen and (max-width: 959px) {
	#st-mobile-logo a, #st-mobile-logo .descr {
		position: absolute; width: 1px; height: 1px;
		margin: -1px; padding: 0; overflow: hidden; white-space: nowrap;
		clip-path: inset(50%); border: 0;
	}
}

/* --- スマホの帯をバナーに重ねる --------------------------------------
   帯そのものが場所を食っていた。測った値（375 幅）:

       帯    375x100     ← ☰ と 🔍 は 52x48 しか無いのに 100 ある
       バナー 375x81
       ------------------------------------------------
       本文の先頭 227 → 100 減って 127

   濃紺の地は帯ではなく **DIV#headbox-bg** が塗っている
   （linear-gradient(#3A5090, #2B3C6D)）。帯・dl・dt はどれも透明。
   なので **#headbox-bg を高さ 0 にすると濃紺ごと消える。**
   中で見えている子は dl だけなので（他は display:none）、
   0 にしても はみ出して重なるものは無い。

   ☰ と 🔍 は残す。dl を絶対配置でバナーの上に置き直す。
   バナーは字が真ん中の 51% にしか無く、**左右 24% ずつ空いている。**
   52px の丸はそこに収まるので字に当たらない。

   高さは 2400/520（バナーの画像そのものの比）で出す。
   375 幅 → 81、768 幅 → 163。どちらもバナーと 1px も違わない。

   .acordion_tree（スライドの中身）と .acordion_search は position:fixed
   なので、帯を動かしても影響しない。開け閉めは <html> の
   s-navi-active / s-navi-search-active で効くので、これも関係しない。

   **960 以上には効かない。**テーマが .pcnone を消すのが 960 からで、
   そこでは #headbox-bg はもともと高さ 0（実測で probe の有無に差が無い） */
@media only screen and (max-width: 959px) {
	#headbox-bg { position: relative; height: 0; z-index: 9; }
	#s-navi > dl.acordion {
		position: absolute; top: 0; left: 0; width: 100%;
	}
	/* **!important が要る。**高さは テーマの カスタマイザーが
	   st-themecss-loader.php で `#s-navi dt.trigger { height: 100px }`
	   （600〜959 では calc(110px)）と書いていて、**これが子テーマの
	   style.css より後に読まれる。**同じ選択子なので順番で負ける。
	   auto が効かないと、高さ 100 から aspect-ratio が**幅の方**を
	   出してしまい、462px になって 🔍 が画面の外（left 410）へ出た */
	#s-navi dt.trigger { aspect-ratio: 2400 / 520; height: auto !important; }
}
