@charset "utf-8";

/**
 * common2026.css
 * ユーザー提供のオリジナルCSSをベースに、ダークモード変数を統合した完成版
 */

:root {
  --main-text: #212529;
  --main-bg: #fff;
  --sub-bg: #fff;
  --relate_anker_border: #ddd;
  --blockq: #ddd;
  --rp-orange: #ff6600;
  --rp-yellow: #ffcc00;
}

@media (prefers-color-scheme: dark) {
  :root {
    --main-text: #ddd;
    --main-bg: #1A1A1A;
    --sub-bg: #282828;
    --relate_anker_border: #333;
    --blockq: #444;
  }
  img { filter: grayscale(0%) !important; }
}

/* 1. 基本設定 */
body {
  color: var(--main-text);
  background-color: var(--main-bg) !important;
  font-family: 'メイリオ', Meiryo, 'Lucida Grande', Verdana, 'ヒラギノ角ゴ Pro W3', 'Hiragino Kaku Gothic Pro', Osaka, 'ＭＳ Ｐゴシック', sans-serif;
  padding-top: 100px;
  white-space: normal;
  word-break: break-all;
  line-height: 1.8;
}

a { color: var(--rp-orange); text-decoration: none !important; }
a:hover { opacity: 0.5 !important; transition: .2s; }

/* 2. グローバルナビゲーション */
.navbar { background-color: #000 !important; }

.nav-link {
  font-size: 12px;
  color: #fff !important;
  border-bottom: 2px solid transparent;
}

/* 現在地（active）の装飾：文字色と下線 */
.navbar-nav .nav-link.active,
li.nav-item.active > a.nav-link {
  color: var(--rp-yellow) !important;
  font-weight: bold !important;
  border-bottom: 2px solid currentColor !important;
}

/* ロゴ干渉防止 */
.nav-logo-svg { height: 32px; width: auto; vertical-align: middle; }

/* 3. 関連リンクカード (relate_anker) - オリジナルを完全再現 */
.relate_anker {
  display: block;
  width: 100%;
  border: 1px solid var(--relate_anker_border);
  height: 80px;
  overflow: hidden;
  background-color: var(--sub-bg);
  padding-left: 110px; /* 画像の幅100px + 余白10px */
  padding-right: 10px;
  margin-bottom: 20px;
  background-size: 100px auto;
  background-position: left top;
  background-repeat: no-repeat;
  box-shadow: 2px 2px 2px rgba(0,0,0,0.1);
}

a.relate_anker > strong {
  display: block;
  font-weight: bold;
  font-size: 18px; /* 20pxから微調整 */
  line-height: 1.3;
  padding-top: 8px;
  color: var(--main-text);
}

a.relate_anker > .site {
  font-size: 10px;
  display: block;
  color: var(--rp-orange);
}

/* 4. 記事下部の「最近の投稿」(bottom_recent) - オリジナル再現 */
.bottom_recent { margin-top: 50px; clear: both; }

.bottom_recent .media {
  display: flex !important; /* BS5補完 */
  background-color: var(--sub-bg);
  box-shadow: 2px 2px 2px rgba(0,0,0,0.1);
  margin: 10px;
  border: 1px solid var(--relate_anker_border);
  text-decoration: none;
  overflow: hidden;
}

.image_waku_bottom {
  flex-shrink: 0;
  margin: 0 12px 0 0;
}

.image_waku_bottom img {
  object-fit: cover;
  width: 190px;
  height: 100px;
}

.bottom_recent .media-body {
  flex: 1;
  padding: 10px 10px 0 0;
}

.bottom_recent .media-body p {
  font-size: 14px;
  margin: 0;
  line-height: 1.4;color:#AAA;
}

/* 5. 汎用パーツ */
.search_found { color: #FF0000; background-color: #FFFF00; font-weight: bold; }

.list-group-item { background-color: var(--sub-bg) !important; color: var(--main-text); }

#pageTop { position: fixed; bottom: 10px; right: 20px; }
#pageTop a { font-size: 60px; color: #FF3366; opacity: 0.7; }

/* スマホ対応 */
@media (max-width: 575.98px) {
  body { padding-top: 80px; }
  article { font-size: 1.4rem; }
  
  /* スマホ版メニュー */
  li.nav-item > a.nav-link {
    font-size: 18px;
    padding: 10px 0;
    border-bottom: 1px solid #333;
  }

  .image_waku_bottom img { width: 120px; height: 80px; }
  .bottom_recent .media-body p { font-size: 14px; }
  
  .relate_anker { height: auto; min-height: 70px; padding-left: 85px; background-size: 75px auto; }
  a.relate_anker > strong { font-size: 15px; }
}