/* ============================================================
   しおり文庫 — フッター（全ページで読む）

   ・クレジットの色と中央寄せはここに置く。記事用CSSに書くと
     トップページやカテゴリページで当たらず、濃紺の上に黒文字が出てしまう。
   ・セレクタは #footer（ID）で書く。テーマ側の指定に確実に勝たせるため。
   ============================================================ */

#footer.footer{
  --f-bg:#16305c;
  --f-ink:#cfdaea;
  --f-mute:#8ba0c2;
  --f-line:rgba(255,255,255,.13);

  background:var(--f-bg);
  color:var(--f-ink);
  border-top:none;
  font-family:"Hiragino Sans","Yu Gothic",YuGothic,"Noto Sans JP",Meiryo,sans-serif;
}
#footer .footer-in{
  max-width:1100px; margin:0 auto;
  padding:36px 24px 0;
}

/* ---- 3列 ---- */
#footer .footer-widgets{
  display:grid; grid-template-columns:1fr 1fr 1.3fr; gap:10px 52px;
  padding-bottom:26px;
}
#footer .footer-left,
#footer .footer-center,
#footer .footer-right{width:auto; float:none; padding:0; margin:0}
#footer .widget{margin:0; padding:0}

/* ---- 見出し。記事のH2と同じ「短い罫」で揃える ---- */
#footer .footer-title,
#footer .widget-title{
  position:relative;
  margin:0 0 16px; padding:0;
  font-size:12px; font-weight:700; line-height:1.5; letter-spacing:.12em;
  color:#fff; background:none; border:none;
}
#footer .footer-title::before,
#footer .widget-title::before{
  content:""; position:absolute; top:-11px; left:0;
  width:26px; height:2px; background:#7f9ccd;
}

/* ---- リンク ---- */
#footer .widget ul{margin:0; padding:0; list-style:none}
#footer .widget li{
  margin:0; padding:0; border:none; list-style:none; line-height:1.5;
}
#footer .widget li::before{content:none}
#footer .widget li a,
#footer .list-item-caption{
  display:inline-block;
  padding:5px 0;
  font-size:13px; line-height:1.6; color:var(--f-ink); text-decoration:none;
}
#footer .widget li a{
  border-bottom:1px solid transparent;
  transition:color .15s, border-color .15s;
}
/* Cocoonがホバーで背景を白くするので打ち消す。濃紺の上で文字が消えてしまうため */
#footer a,
#footer a:hover,
#footer a:focus,
#footer a:active,
#footer .widget li a:hover{background:transparent; background-color:transparent}
#footer .widget li a:hover{color:#fff; border-bottom-color:rgba(255,255,255,.45)}
#footer .widget li a:focus-visible{outline:2px solid #fff; outline-offset:2px}

/* ---- 右列（サイト紹介） ---- */
#footer .custom-html-widget p{
  margin:0 0 .6em; font-size:12.5px; line-height:1.95; color:var(--f-mute);
}
#footer .custom-html-widget p:last-child{margin:0}
#footer .custom-html-widget img{max-width:180px; height:auto}

/* ---- 足元 ---- */
/* 罫線だけ引いて、余白は持たせない。
   下のクレジット（.sb-credits-fallback）が間隔を作るので、ここで足すと二重になる */
#footer .footer-bottom{
  border-top:1px solid var(--f-line);
  padding:0; margin:0;
}
/* 空のフッターメニューと空のコピーライトが場所だけ取っていたので畳む */
#footer .navi-footer-in:not(:has(a)){display:none}
#footer .copyright:empty{display:none}

/* フッターのロゴは出さない。
   サイト名はヘッダーと最下部の著作権表示に出ているので、3回目は要らない。
   （出したくなったら下の display:none を消して、白反転の指定を戻す） */
#footer .footer-bottom-logo{display:none}
#footer .copyright{
  color:var(--f-mute); font-size:11.5px; letter-spacing:.02em; text-align:center;
}

/* ============================================================
   クレジット（Amazon・楽天・著作権）
   プラグインが出す。フッターウィジェットに貼っても、貼らず自動表示でも同じ見た目にする。
   ============================================================ */
.sb-credits{
  margin:0; text-align:center;
  color:#8ba0c2; font-size:11.5px; line-height:1.95; letter-spacing:.01em;
  font-family:"Hiragino Sans","Yu Gothic",YuGothic,"Noto Sans JP",Meiryo,sans-serif;
}
.sb-credits p{margin:0 0 .2em; color:inherit; font-size:inherit; line-height:inherit}
.sb-credits p:last-child{margin:0}
/* 楽天のクレジットはリンクが規約で必須。ただし装飾までは指定されていないので、
   周囲と同じ色・下線なしにして目立たせない。ホバーで初めてリンクだと分かる。 */
.sb-credits a{
  color:inherit; text-decoration:none; border-bottom:none;
}
.sb-credits a:hover,
.sb-credits a:focus-visible{
  color:#cfdaea; text-decoration:underline; text-underline-offset:3px;
}
.sb-credit-copy{font-variant-numeric:tabular-nums}

/* ウィジェットに貼らなかったときの自動表示。フッターと地続きに見せる。
   罫線とクレジットの間隔はここだけで作る */
.sb-credits-fallback{
  background:#16305c;
  margin:0; padding:16px 24px 22px;
}

@media (max-width:860px){
  #footer .footer-widgets{grid-template-columns:1fr; gap:28px}
  #footer .footer-in{padding:34px 20px 0}
  #footer .footer-title::before{top:-10px}
}
