/*
Theme Name: motimoti3d
Author: Sensei
Version: 1.0
*/

a:link,
a:visited {
  color: #0000ff;
}

a:focus,
a:hover,
a:active {
  color: #ff3300;
}


body {
  margin: 0;
  background: #f8f8f8;
  font-family: Verdana, sans-serif;
  font-size: 90%;
}

#wrapper {
  max-width: 1150px;
  margin: 0 auto;
  padding: 20px;
}

.site-header {
  margin-bottom: 20px;
}

.site-branding {
  display: block;
  text-align: center;
}

.brand-logo-link {
  display: inline-block;
  line-height: 0;
}

.brand-logo {
  display: block;
  max-width: 100%;
  max-height: 76px;
  width: auto;
  height: auto;
}

.brand-logo-dark {
  display: none;
}

.site-title {
  margin: 0;
  font-size: 32px;
  line-height: 1.2;
}

.site-title a {
  color: #222;
  text-decoration: none;
}

#main {
  width: 70%;
  float: left;
}

#sidebar {
  width: 27%;
  float: right;
}

#sidebar ul {
  margin: 0;
  padding-left: 18px;
}

#sidebar li {
  margin: 0 0 8px;
  line-height: 1.25;
  font-size: 14px;
}

#sidebar .search-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

#sidebar .search-fields-wrapper {
  display: flex;
  gap: 8px;
  width: 100%;
}

#sidebar .search-field {
  flex-grow: 1;
  max-width: 220px;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

#sidebar .search-submit {
  padding: 8px 12px;
  border: 1px solid #ccc;
  background: #f3f3f3;
  border-radius: 8px;
  cursor: pointer;
}

.search-note {
  font-size: 12px;
  color: #000000;
  font-weight: normal;
  display: block;
}

html.dark-mode .search-note {
  color: #a0aec0;
}

article {
  background: white;
  padding: 25px;
  margin-bottom: 25px;
  border-radius: 16px;
  overflow-wrap: anywhere;
}

article img,
article video,
article iframe,
.gr video,
.dl img {
  display: block;
  max-width: 100%;
  height: auto;
}

article p {
  line-height: 1.8;
}

article h2 {
  border-left: 30px solid #ffcc33;
  border-bottom: 1px dashed #ffcc33;

  /* ← ここが核心 */
  border-radius: 12px;

  padding: 6px 10px 6px 10px;
  margin-top: -5px;
  margin-bottom: 18px;
  font-size: 17px;
  line-height: 1.35;
  font-weight: bold;
}

article h2 a {
  color: inherit;
  text-decoration: none;
}

article h2 a:hover {
  text-decoration: underline;
}

#sidebar article h2 {
  font-size: 18px;
}

.post-meta {
  margin: 18px 0 0;
  padding-top: 10px;
  border-top: 1px solid #ececec;
  color: #666;
  font-size: 13px;
  line-height: 1.7;
}

.post-date {
  margin-right: 14px;
}

.post-nav-links {
  margin: 55px 0 65px;
  /* コメント欄を追加したため、余白をカテゴリページと同じ55px / 65pxに揃えました */
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.post-nav-links a {
  text-decoration: none;
}

.post-nav-prev,
.post-nav-home,
.post-nav-next {
  display: inline-block;
}

.archive-nav-links {
  margin: 55px 0 65px;
  /* 同様に大きく下げます */
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
}

.archive-nav-links a {
  text-decoration: none;
}

.archive-nav-prev,
.archive-nav-home,
.archive-nav-next {
  display: inline-block;
}

.footer-bar {
  clear: both;
  /* 画像や動画の回り込み（float）をここで確実に解除します */
  background: #666;
  height: 44px;
  /* 中身が空なので高さを指定してグレーのバーにします */
  border-radius: 12px;
  margin-top: 30px;
}

.copyright {
  clear: both;
  display: block;
  text-align: center;
  color: #666;
  /* ↓ この数値(50px)を変更すると、フッター（コピーライト）の上の隙間（余白）を調整できます */
  padding-top: 85px;
  padding-bottom: 25px;
  font-size: 12px;
}


.pa {
  font-size: 90%;
  padding: 30px;
  color: #666666;
}

/* ==========================================
   ツイッター風・FC2移植ボックスの基本カードスタイル
   ========================================== */
.gr,
.grl,
.grs,
.gro,
.grco,
.grnico,
.grup,
.grosi,
.loada,
.loadb,
.loadc,
.loadd,
.loade,
.loadf,
.loadg,
.loadh,
.loadi {
  background: #ffffff;
  border: 6px solid #d3d3d3;
  border-radius: 12px;
  padding: 16px;
  margin: 0 20px 22px;
  line-height: 1.5;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* 一部共通：余白 20px と文字サイズ 90% にするグループ（.gr と .grco 以外） */
.grl,
.grs,
.gro,
.grnico,
.grup,
.grosi,
.loada,
.loadb,
.loadc,
.loadd,
.loade,
.loadf,
.loadg,
.loadh,
.loadi {
  padding: 20px;
  font-size: 90%;
}

/* .grco は余白 20px のみ適用（フォントサイズは等倍のまま） */
.grco {
  padding: 20px;
}

/* 一部共通：文字の色をグレー（#666666）にするグループ */
.grs,
.grnico,
.loada,
.loadb,
.loadc,
.loadd,
.loade,
.loadf,
.loadg,
.loadh,
.loadi {
  color: #666666;
}

/* 個別のサイズ・レイアウト微調整 */
.grl {
  margin-top: -13px;
}

/* ==========================================
   それぞれの枠線（ボーダー）の色指定
   ========================================== */
.grco {
  border-color: #ffdcdc;
}

.grl {
  border-color: #ffdab9;
}

.grs {
  border-color: #d4ebfa;
}

.gro {
  border-color: #fff296;
}

.grnico {
  border-color: #c0ffd5;
}

.grup {
  border-color: #ffc0cb;
}

.grosi {
  border-color: #db7093;
}

.loada {
  border-color: #ffb9b9;
}

.loadb {
  border-color: #ffdfb9;
}

.loadc {
  border-color: #fff8b9;
}

.loadd {
  border-color: #d5ffb9;
}

.loade {
  border-color: #b9ffe7;
}

.loadf {
  border-color: #b9eaff;
}

.loadg {
  border-color: #b9c5ff;
}

.loadh {
  border-color: #d8b9ff;
}

.loadi {
  border-color: #ffb9e1;
}

div#dls {
  margin-left: 25px;
}

.name {
  font-size: 18px;
}

.name2 {
  font-size: 90%;
}

/* ツイッターのアイコン画像 */
.border_radius {
  width: 50px;
  height: 50px;
  float: left;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 0.3em;
}

/* ツイッターの画像 */
.border_radius2,
.border_radius3,
.border_radius4 {
  border-radius: 10px;
  display: inline-block;
  max-width: 100%;
  height: auto;
  vertical-align: top;
}

.border_radius2 {
  width: auto;
  max-width: 260px;
  margin-top: 12px;
}

.border_radius3 {
  width: auto;
  max-width: 100%;
  max-height: 480px;
}

.border_radius4 {
  width: auto;
  max-width: 260px;
  max-height: 260px;
}

.gr video {
  max-height: 520px;
  margin-top: 16px;
  margin-bottom: 12px;
}

.rt,
.like {
  color: #4ca9df;
}

.usui {
  color: #aab8c2;
  font-size: 14px;
}

.usui_right {
  color: #aab8c2;
  font-size: 90%;
  float: right;
}

.tweet_time {
  color: #aab8c2;
  font-size: 90%;
  float: right;
}

.gr a,
#sidebar a {
  text-decoration: none;
}

.gr a.link-url {
  text-decoration: underline;
}

.gr a:hover {
  opacity: 0.85;
}

.tweet-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  /* 文字との隙間を確保 */
  margin-bottom: 12px;
}

.tweet-images a {
  display: block;
  flex: 1 1 260px;
  max-width: 260px;
  line-height: 0;
}

.tweet-images img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.tweet-images--single a {
  flex: 0 1 520px;
  max-width: 520px;
}

.tweet-images--single img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 500px;
}

.tag-cm3d2 {
  color: #fb5587;
}

.tag-com3d2 {
  color: #FF9c00;
}

/* メインリンクだけ下線 */
.link-main {
  text-decoration: underline;
}

/* RT順など */
#tweet-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 13px;
  margin-left: 20px;
  margin-right: 20px;
  /* 右側もツイートの枠と揃えるために追加 */
  align-items: center;
  flex-wrap: wrap;
  position: relative;
  /* 子要素の基準点として一応戻しておきます */
}

#tweet-controls button {
  background: #ffffff;
  border: 2px solid #d3d3d3;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 100px;
}

#tweet-controls button:hover {
  background: #f3f3f3;
  border-color: #4ca9df;
  color: #4ca9df;
}

#tweet-search {
  padding: 8px 46px 8px 16px;
  /* 右側にボタンのスペースを広めに空ける */
  border: 2px solid #d3d3d3;
  /* 元の優しいグレーのフチに戻します */
  border-radius: 999px;
  width: 240px;
  font-size: 14px;
  box-shadow: none;
  /* 影はなし */
  background: #ffffff;
  transition: all 0.2s ease;
  box-sizing: border-box;
  /* パディングを含めた幅にする */
}

#tweet-search:focus {
  outline: none;
  border-color: #4ca9df;
  /* フォーカス時はGoogleブルーに */
  box-shadow: none;
  /* フォーカス時も影はなし */
}

#tweet-controls button.active {
  background: #4ca9df;
  border-color: #4ca9df;
  color: white;
}

#tweet-controls button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

/* ===== 漫画風 吹き出し（モーダル） ===== */
#manga-tooltip {
  position: fixed;
  z-index: 9999;
  background: #ffffff;
  border: 3px solid #333333;
  border-radius: 16px;
  padding: 16px 16px 20px 16px;
  /* box-shadowの代わりにdrop-shadowを使ってしっぽにも影を落とします */
  filter: drop-shadow(4px 4px 0px #4ca9df);
  transform-origin: bottom left;
  /* 左下を支点にアニメーション */
  display: none;
  /* 初期は非表示 */
  flex-direction: column;
  gap: 12px;
}

/* 吹き出しのしっぽ（外側の黒いフチ） */
#manga-tooltip::after {
  content: "";
  position: absolute;
  bottom: -16px;
  left: var(--tail-left, 10px);
  /* 左端から少し右 */
  border-width: 16px 20px 0 0;
  border-style: solid;
  border-color: #333333 transparent transparent transparent;
  display: block;
  width: 0;
}

/* 吹き出しのしっぽ（内側の白い部分） */
#manga-tooltip::before {
  content: "";
  position: absolute;
  bottom: -12px;
  left: calc(var(--tail-left, 10px) + 3px);
  /* 黒フチが均等に見えるように微調整 */
  border-width: 12px 14px 0 0;
  border-style: solid;
  border-color: #ffffff transparent transparent transparent;
  display: block;
  width: 0;
  z-index: 1;
}

/* ポンッと飛び出すアニメーション */
@keyframes popIn {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }

  70% {
    transform: scale(1.05);
    opacity: 1;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.manga-tooltip-title {
  text-align: center;
  font-weight: bold;
  font-size: 16px;
  color: #333;
  border-bottom: 1px solid #ccc;
  padding-bottom: 4px;
  margin-bottom: 8px;
}

.manga-tooltip-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 440px;
}

.manga-tooltip-row {
  display: flex;
  gap: 12px;
}

.manga-tooltip-row>* {
  flex: 1;
  margin: 0 !important;
  /* 他の margin 指定を上書きするために念のため */
}

.manga-tooltip-btn {
  background: #ffffff;
  border: 2px solid #333333;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
  text-align: center;
  color: #333333 !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-sizing: border-box;
  height: 42px;
}

a.manga-tooltip-btn,
a.manga-tooltip-btn:link,
a.manga-tooltip-btn:visited {
  color: #333333 !important;
}

.manga-tooltip-btn:hover {
  background: #ffcc33;
  transform: translateY(-2px);
  box-shadow: 2px 2px 0px #333333;
}

/* ===== 検索タグ（チップ） ===== */
.search-tag-chip {
  background: #ffffff;
  color: #333333;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: bold;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  border: 2px solid #333333;
  box-shadow: 2px 2px 0px #333333;
}

.search-tag-chip .tag-close {
  margin-left: 8px;
  background: #333333;
  color: #ffffff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  cursor: pointer;
  line-height: 1;
  transition: 0.2s;
}

.search-tag-chip .tag-close:hover {
  background: #ffcc33;
  color: #333333;
}

/* ===== ユーザーリンクのレイアウト調整 ===== */
.tweet-user-link {
  display: flex;
  width: fit-content;
  align-items: center;
  text-decoration: none;
  margin-bottom: 13px;
  /* 本文との隙間をいい感じに調整 */
}

.tweet-user-link img.tweet-user-icon {
  float: none;
  /* 古いfloatを解除 */
  margin: 0 10px 0 0;
}

.tweet-user-info {
  display: flex;
  flex-direction: column;
  gap: 0px;
  /* 隙間を詰める */
  line-height: 1.2;
}

/* ===== サジェスト（検索候補） ===== */
.suggest-box {
  width: 100%;
  flex-basis: 100%;
  /* flex内で横幅いっぱいに広がり、下へ押し下げる（アコーディオン） */
  background: #ffffff;
  border-radius: 12px;
  filter: drop-shadow(4px 4px 0px #4ca9df);
  /* ポップな水色の影 */
  box-sizing: border-box;

  /* アニメーション用の初期状態（閉じた状態） */
  max-height: 0;
  padding: 0 15px;
  margin-top: 0;
  margin-bottom: 0;
  opacity: 0;
  border: 0px solid #333333;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  /* スーッと動くアニメーション */
}

/* 開いた状態のクラス */
.suggest-box.open {
  max-height: 400px;
  padding: 10px 15px;
  margin-top: 10px;
  margin-bottom: 20px;
  opacity: 1;
  border-width: 3px;
  overflow-y: auto;
}

.suggest-section-title {
  font-size: 13px;
  font-weight: bold;
  color: #888;
  margin-bottom: 8px;
  margin-top: 12px;
  padding-left: 6px;
  /* 少し右に寄せてアイテムとの並び（アライメント）を綺麗にします */
  display: flex;
  align-items: center;
  gap: 6px;
  /* 絵文字と文字の間に程よい隙間を作ります */
}

.suggest-section-title:first-child {
  margin-top: 0;
}

.suggest-flex-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.suggest-item {
  cursor: pointer;
  font-weight: bold;
  color: #333;
  transition: 0.2s;
}

/* 人気・最近（横並びのチップ型） */
.suggest-item-chip {
  background: #f3f3f3;
  padding: 10px 14px;
  /* 上下の余白を増やしてぷっくり丸いチップに戻します */
  border-radius: 999px;
  font-size: 13px;
  border: 1px solid #ccc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.suggest-item-chip:hover,
.suggest-item-chip.selected {
  background: #ffcc33;
  border-color: #ffcc33;
  transform: translateY(-2px);
}

/* 候補（縦並びのリスト型） */
.suggest-item-list {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  display: block;
  border-bottom: 1px dashed #eee;
}

.suggest-item-list:last-child {
  border-bottom: none;
}

.suggest-item-list:hover,
.suggest-item-list.selected {
  background: #f3f3f3;
  color: #4ca9df;
  transform: translateX(4px);
  /* ちょっと右にスライド */
}

.dl {
  max-width: 340px;
  margin: 0 20px 20px;
  /* 上を詰め、左右を20pxにして他の枠と揃えました */
  padding: 20px;
  border: 2px solid #c6c6c6;
  border-radius: 10px;
  box-sizing: border-box;
  /* 枠線がはみ出さないようにするお守り */
}

/* 画像、動画無しのRT数・いいね・投稿時間の回り込みを防ぐ */
.tweet-stats {
  display: block;
  margin-top: 8px;
}

/* 🏷️ カテゴリリンクの下線を無効化 */
.post-meta a,
.post-meta a:hover {
  text-decoration: none !important;
}

/* 📢 広告内の表示調整（下線無効化 ＆ 画像・文字の隙間を極限まで縮小） */
.dl a {
  text-decoration: none !important;
  display: block !important;
  line-height: 1.2 !important;
  /* テキストの行間をギュッと狭くします */
}

.dl a:hover {
  text-decoration: none !important;
}

.dl br {
  display: none !important;
  /* 改行タグによる余計な隙間をカットします */
}

.dl img {
  display: block !important;
  margin: 0 auto 2px !important;
  /* 画像の下の隙間を2pxだけに指定します */
}

/* ===== サジェスト 期間切り替えヘッダー ===== */
.suggest-period-header {
  border-bottom: 2px dashed #ccc;
  padding-bottom: 12px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #888;
  line-height: 1.5;
  user-select: none;
}

.suggest-period-tab {
  cursor: pointer;
  font-weight: bold;
  color: #555;
  padding: 3px 10px;
  /* 縦横の余白を少し調整して、丸みが綺麗に見えるようにします */
  border-radius: 999px;
  transition: all 0.2s ease;
  display: inline-block;
}

.suggest-period-tab:hover {
  color: #4ca9df;
  background: #f0f8ff;
}

.suggest-period-tab.active {
  color: #3d97b8;
  /* 優しいブルー */
  background: #e3f4fc;
  /* ふんわり薄い水色 */
}

.suggest-period-tab[data-period="favorite"].active,
.suggest-period-tab[data-period="favorite"]:hover {
  color: #b27a00 !important;
  background: #fff5cc !important;
}

.suggest-period-sep-fav {
  color: #4ca9df;
  font-weight: bold;
  margin: 0 4px;
  user-select: none;
}

.suggest-period-custom-btn {
  cursor: pointer;
  font-weight: bold;
  color: #555;
  padding: 3px 10px;
  border-radius: 999px;
  /* 999pxで綺麗なカプセル型にします */
  transition: all 0.2s ease;
  display: inline-block;
}

.suggest-period-custom-btn:hover {
  color: #4ca9df;
  background: #f0f8ff;
}

.suggest-period-custom-btn.active {
  color: #3d97b8;
  /* 優しいブルー */
  background: #e3f4fc;
  /* ふんわり薄い水色 */
}

/* 📅 カレンダー（日付入力欄）エリア */
.suggest-custom-date-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 10px;
  background: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #ddd;
  animation: suggestDatePickerIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1) forwards;
}

@keyframes suggestDatePickerIn {
  0% {
    opacity: 0;
    transform: translateY(-8px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.suggest-date-input {
  border: 2px solid #ccc;
  border-radius: 6px;
  padding: 4px 8px;
  font-family: inherit;
  font-size: 13px;
  color: #333;
  outline: none;
  background: #ffffff;
  transition: border-color 0.2s;
}

.suggest-date-input:focus {
  border-color: #4ca9df;
}

.suggest-date-sep {
  color: #666;
  font-weight: bold;
}

/* データが無い時のテキスト */
.suggest-no-data {
  font-size: 13px;
  color: #999;
  padding: 10px;
  text-align: center;
}

/* ===== 検索窓のラッパー＆履歴ボックス ===== */
.search-input-wrapper {
  position: relative;
  display: inline-block;
}

/* 🔍 検索ボタンのスタイル */
#tweet-controls .search-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0;
  width: 28px;
  height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4295f4;
  /* Googleブルーの鮮やかな青 */
  transition: color 0.2s ease, transform 0.2s ease;
}

#tweet-controls .search-btn:hover {
  background: transparent !important;
  border: none !important;
  color: #1a73e8 !important;
  /* ホバー時は少し濃いめの青に */
  transform: translateY(-50%) scale(1.15);
  /* 少し大きくなるマイクロアニメーション */
}

.search-icon-svg {
  width: 22px;
  /* 18pxから22pxへサイズアップ */
  height: 22px;
}

.history-box {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #ffffff;
  border: 3px solid #333333;
  border-radius: 12px;
  z-index: 10000;
  box-sizing: border-box;
  filter: drop-shadow(4px 4px 0px #4ca9df);
  margin-top: 8px;
  display: none;
  overflow: hidden;
}

.history-box.open {
  display: block;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: bold;
  color: #333;
  border-bottom: 1px dashed #eee;
  transition: background 0.2s;
}

.history-item:last-child {
  border-bottom: none;
}

.history-item:hover {
  background: #f3f3f3;
  color: #4ca9df;
}

.history-item-click {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-grow: 1;
  cursor: pointer;
  overflow: hidden;
  /* はみ出し防止 */
}

.history-icon {
  color: #999;
  flex-shrink: 0;
}

.history-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-delete {
  background: #cccccc;
  color: #ffffff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 11px;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.history-delete:hover {
  background: #ff3300;
  color: #ffffff;
}

/* ===== 検索範囲用 吹き出し ===== */
#range-tooltip {
  position: fixed;
  z-index: 9999;
  background: #ffffff;
  border: 3px solid #333333;
  border-radius: 16px;
  padding: 16px;
  /* box-shadowの代わりにdrop-shadowを使ってしっぽにも影を落とします */
  filter: drop-shadow(4px 4px 0px #4ca9df);
  transform-origin: top center;
  /* 上中央を支点にアニメーション */
  display: none;
  /* 初期は非表示 */
  flex-direction: column;
  gap: 12px;
}

/* 吹き出しのしっぽ（外側の黒いフチ） - 上向き中央 */
#range-tooltip::after {
  content: "";
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 16px 16px 16px;
  border-style: solid;
  border-color: transparent transparent #333333 transparent;
  display: block;
  width: 0;
}

/* 吹き出しのしっぽ（内側の白い部分） - 上向き中央 */
#range-tooltip::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 12px 12px 12px;
  border-style: solid;
  border-color: transparent transparent #ffffff transparent;
  display: block;
  width: 0;
  z-index: 1;
}

/* ===== お気に入り星マークの装飾 (SVG化) ===== */
.favorite-star-icon {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  display: inline-block;
  transition: transform 0.15s ease, fill 0.15s ease, stroke 0.15s ease;
  user-select: none;
  stroke: #333333;
  /* 黒いフチ取り */
  stroke-width: 2px;
  /* コミック風の太いフチ */
  stroke-linejoin: round;
  /* 角を丸めて優しく可愛い星に */
  fill: #ffffff;
  /* 未登録は白 */
  cursor: pointer;
}

.favorite-star-icon:hover {
  transform: scale(1.3);
}

.favorite-star-icon:active {
  transform: scale(1.6) !important; /* クリックした瞬間にさらに大きく！ */
}

.favorite-star-icon.is-active {
  fill: #ffcc33;
  /* 登録後は黄色 */
}

.favorite-star-icon.inactive {
  fill: #cccccc !important;
  stroke: #999999 !important;
}

/* 吹き出しの中の星は少し大きめに表示 */
.manga-tooltip-btn .favorite-star-icon {
  width: 20px;
  height: 20px;
  margin-right: 6px;
}

/* サジェストヘッダー内の星は単なる装飾なのでホバー時の拡大などを無効化 */
.suggest-period-header .favorite-star-icon {
  cursor: inherit;
}

.suggest-period-header .favorite-star-icon:hover,
.suggest-period-header .favorite-star-icon:active {
  transform: none !important;
}

/* ===== ミュートした時のプレースホルダーカードのデザイン ===== */
.tweet-muted-placeholder {
  border-color: #d3d3d3 !important;
  /* 他のカードと調和するグレー */
  background: #fcfcfc !important;
  /* 明るいグレー背景で文字をくっきり */
  padding: 14px 20px !important;
  box-shadow: none !important;
  transition: all 0.3s ease;
  border-style: solid !important;
  /* 普通の実線枠に変更 */
  border-width: 3px !important;
  /* ほどよい太さの実線 */
  display: flex !important;
  align-items: center !important;
}

.tweet-muted-content {
  display: flex;
  align-items: center;
  gap: 16px;
  /* 隙間を広げて見やすく */
  width: 100%;
  color: #475569;
  /* 濃いグレーで読みやすさアップ */
  font-size: 14px;
  /* 文字を少し大きく */
  font-weight: bold;
}

.tweet-muted-icon {
  width: 18px;
  /* アイコンをひと回り大きく */
  height: 18px;
  fill: #64748b;
  /* アイコンの色を濃く */
  vertical-align: middle;
}

.tweet-muted-unmute-btn {
  background: #4ca9df;
  /* テーマカラーの目立つ水色 */
  border: 2px solid #333333;
  /* はっきり目立つ黒フチ */
  border-radius: 8px;
  /* 程よい角丸 */
  padding: 6px 16px;
  /* 押しやすいサイズに拡大 */
  color: #ffffff !important;
  /* 白文字でくっきり */
  cursor: pointer;
  font-weight: bold;
  font-size: 13px;
  /* ボタン文字も大きく */
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px !important;
  /* 高さをしっかり確保 */
  box-shadow: 2px 2px 0px #333333;
  /* ポップな黒影 */
  text-decoration: none !important;
}

.tweet-muted-unmute-btn:hover {
  background: #ffcc33;
  /* ホバー時にテーマの黄色に変更 */
  border-color: #333333;
  color: #333333 !important;
  transform: translateY(-2px);
  /* 少し上に浮く */
  box-shadow: 1px 1px 0px #333333;
}

/* ==========================================
   文字サイズ変更 (Font Sizes)
   ========================================== */
html.font-small body {
  font-size: 80% !important;
}

html.font-medium body {
  font-size: 90% !important;
}

html.font-large body {
  font-size: 105% !important;
}

/* ==========================================
   カスタマイズ画面 UI スタイル (Customization UI Styles)
   ========================================== */
.customize-container {
  padding: 10px 0;
}

.customize-section {
  margin-bottom: 25px;
}

.customize-section h3 {
  margin: 0 0 15px 0;
  font-size: 19px;
  color: #333;
  border-bottom: 3px solid #ffcc33;
  padding-bottom: 6px;
  display: inline-block;
}

.customize-item {
  margin-bottom: 15px;
}

/* トグルスイッチスタイル */
.customize-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-weight: bold;
  user-select: none;
}

.customize-toggle input {
  display: none;
}

.toggle-slider {
  width: 46px;
  height: 24px;
  background-color: #ccc;
  border: 2.5px solid #333;
  border-radius: 99px;
  position: relative;
  transition: background-color 0.2s ease;
  box-shadow: 2px 2px 0px #333;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  border: 2px solid #333;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.customize-toggle input:checked+.toggle-slider {
  background-color: #4ca9df;
}

.customize-toggle input:checked+.toggle-slider::before {
  transform: translateX(20px);
}

/* ラジオボタンスタイル */
.customize-radios {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.customize-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: bold;
}

.customize-radio input[type="radio"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid #333;
  border-radius: 50%;
  outline: none;
  background-color: white;
  position: relative;
  cursor: pointer;
  box-shadow: 1.5px 1.5px 0px #333;
}

.customize-radio input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #333;
  border-radius: 50%;
}

/* 入力・ボタン・バッジ */
.customize-input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  max-width: 450px;
}

.customize-input {
  flex: 1;
  padding: 8px 14px;
  border: 3px solid #333;
  border-radius: 10px;
  font-size: 14px;
  font-weight: bold;
  outline: none;
  box-shadow: 2px 2px 0px #333;
}

.customize-input:focus {
  border-color: #4ca9df;
}

.customize-btn {
  background: #4ca9df;
  border: 3px solid #333;
  border-radius: 10px;
  padding: 8px 20px;
  color: white;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 2px 2px 0px #333;
  transition: all 0.2s ease;
}

.customize-btn:hover {
  background: #ffcc33;
  color: #333;
  transform: translateY(-2px);
  box-shadow: 1px 1px 0px #333;
}

.customize-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  min-height: 35px;
}

.customize-badge {
  background: #ffffff;
  border: 2.5px solid #333;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 2px 2px 0px #333;
  color: #333;
}

.badge-delete-btn {
  background: none;
  border: none;
  color: #ff3300;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  line-height: 1;
  padding: 0 0 0 4px;
}

.badge-delete-btn:hover {
  color: red;
  transform: scale(1.2);
}

.badge-action-btn {
  background: #4ca9df;
  border: 1.5px solid #333;
  border-radius: 4px;
  color: white;
  font-weight: bold;
  font-size: 11px;
  padding: 2px 6px;
  cursor: pointer;
  transition: all 0.1s ease;
}

.badge-action-btn:hover {
  background: #ffcc33;
  color: #333;
  transform: translateY(-1px);
}

/* ==========================================
   ダークモード用の配色ルール (Dark Mode Color Rules)
   ========================================== */
html.dark-mode {
  color-scheme: dark;
}

html.dark-mode body {
  background: #121212 !important;
  color: #e2e8f0 !important;
}

html.dark-mode #wrapper {
  background: transparent;
}

html.dark-mode article {
  background: #1e1e1e !important;
  color: #e2e8f0 !important;
  border-color: #333 !important;
}

html.dark-mode .site-title a {
  color: #ffffff !important;
}

html.dark-mode .brand-logo-light {
  display: none !important;
}

html.dark-mode .brand-logo-dark {
  display: block !important;
}

html.dark-mode a:link,
html.dark-mode a:visited {
  color: #64b5f6 !important;
}

html.dark-mode a:focus,
html.dark-mode a:hover,
html.dark-mode a:active {
  color: #ff8a65 !important;
}

html.dark-mode .footer-bar {
  background: #262626 !important;
  color: #cbd5e1 !important;
}

html.dark-mode .post-meta {
  border-top-color: #333333 !important;
  color: #94a3b8 !important;
}

html.dark-mode .archive-nav-links a,
html.dark-mode .post-nav-links a {
  color: #64b5f6 !important;
}

/* 記事ツイート枠のダークモード化 */
html.dark-mode .gr,
html.dark-mode .grl,
html.dark-mode .grs,
html.dark-mode .gro,
html.dark-mode .grco,
html.dark-mode .grnico,
html.dark-mode .grup,
html.dark-mode .grosi,
html.dark-mode .loada,
html.dark-mode .loadb,
html.dark-mode .loadc,
html.dark-mode .loadd,
html.dark-mode .loade,
html.dark-mode .loadf,
html.dark-mode .loadg,
html.dark-mode .loadh,
html.dark-mode .loadi {
  background: #1a1a1a !important;
  color: #e2e8f0 !important;
  border-color: #3f3f3f !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
}

/* 枠ごとのアクセント色のダークモード微調整 */
html.dark-mode .grco {
  border-color: #8c4242 !important;
}

html.dark-mode .grl {
  border-color: #8c5d33 !important;
}

html.dark-mode .grs {
  border-color: #2b557a !important;
}

html.dark-mode .gro {
  border-color: #8c8233 !important;
}

html.dark-mode .grnico {
  border-color: #25663b !important;
}

html.dark-mode .grup {
  border-color: #8c3f4e !important;
}

html.dark-mode .grosi {
  border-color: #822247 !important;
}

html.dark-mode .loada {
  border-color: #8c4242 !important;
}

html.dark-mode .loadb {
  border-color: #8c5d33 !important;
}

html.dark-mode .loadc {
  border-color: #8c8833 !important;
}

html.dark-mode .loadd {
  border-color: #4a752b !important;
}

html.dark-mode .loade {
  border-color: #25755b !important;
}

html.dark-mode .loadf {
  border-color: #225c75 !important;
}

html.dark-mode .loadg {
  border-color: #2c3a75 !important;
}

html.dark-mode .loadh {
  border-color: #552c75 !important;
}

html.dark-mode .loadi {
  border-color: #8c2a63 !important;
}

html.dark-mode .usui,
html.dark-mode .usui_right,
html.dark-mode .tweet_time {
  color: #64748b !important;
}

/* コントロール・入力 */
html.dark-mode #tweet-controls button {
  background: #262626 !important;
  border-color: #3f3f3f !important;
  color: #e2e8f0 !important;
}

html.dark-mode #tweet-controls button:hover {
  background: #333333 !important;
  border-color: #4ca9df !important;
  color: #4ca9df !important;
}

html.dark-mode #tweet-controls button.active {
  background: #4ca9df !important;
  color: white !important;
}

html.dark-mode #tweet-search {
  background: #262626 !important;
  border-color: #3f3f3f !important;
  color: #e2e8f0 !important;
}

html.dark-mode #sidebar .search-field {
  background: #262626 !important;
  border-color: #3f3f3f !important;
  color: #e2e8f0 !important;
}

html.dark-mode #sidebar .search-submit {
  background: #333333 !important;
  border-color: #3f3f3f !important;
  color: #e2e8f0 !important;
}

/* サジェストボックス (Suggest Box) */
html.dark-mode .suggest-box {
  background: #1e1e1e !important;
  border-color: #333333 !important;
  filter: drop-shadow(4px 4px 0px #2b557a) !important;
}

html.dark-mode .suggest-item {
  color: #e2e8f0 !important;
}

html.dark-mode .suggest-item:hover {
  background: #333333 !important;
}

html.dark-mode .suggest-item-chip {
  background: #2a2a2a !important;
  border-color: #444444 !important;
  color: #e2e8f0 !important;
}

html.dark-mode .suggest-item-chip:hover,
html.dark-mode .suggest-item-chip.selected {
  background: #ffcc33 !important;
  border-color: #ffcc33 !important;
  color: #1e1e1e !important;
}

html.dark-mode .suggest-item-list {
  border-bottom-color: #2a2a2a !important;
}

html.dark-mode .suggest-item-list:hover,
html.dark-mode .suggest-item-list.selected {
  background: #2a2a2a !important;
  color: #4ca9df !important;
}

html.dark-mode .suggest-period-header {
  border-bottom-color: #333333 !important;
  color: #64748b !important;
}

html.dark-mode .suggest-section-title {
  color: #94a3b8 !important;
}

html.dark-mode .suggest-no-data {
  color: #64748b !important;
}

/* タグチップ (Search Tags) */
html.dark-mode .search-tag-chip {
  background: #262626 !important;
  color: #e2e8f0 !important;
  border-color: #3f3f3f !important;
  box-shadow: 2px 2px 0px #3f3f3f !important;
}

html.dark-mode .search-tag-chip .tag-close {
  background: #3f3f3f !important;
  color: #e2e8f0 !important;
}

html.dark-mode .search-tag-chip .tag-close:hover {
  background: #ffcc33 !important;
  color: #333333 !important;
}

/* 漫画風ポップアップ (Manga Tooltip) */
html.dark-mode #manga-tooltip {
  background: #1e1e1e !important;
  border-color: #3f3f3f !important;
  filter: drop-shadow(4px 4px 0px #2b557a) !important;
}

html.dark-mode #manga-tooltip::after {
  border-color: #3f3f3f transparent transparent transparent !important;
}

html.dark-mode #manga-tooltip::before {
  border-color: #1e1e1e transparent transparent transparent !important;
}

html.dark-mode .manga-tooltip-title {
  color: #ffffff !important;
  border-bottom-color: #333333 !important;
}

html.dark-mode .manga-tooltip-btn {
  background: #262626 !important;
  border-color: #3f3f3f !important;
  color: #e2e8f0 !important;
}

html.dark-mode .manga-tooltip-btn:hover {
  background: #ffcc33 !important;
  color: #333333 !important;
  box-shadow: 2px 2px 0px #3f3f3f !important;
}

html.dark-mode a.manga-tooltip-btn:link,
html.dark-mode a.manga-tooltip-btn:visited {
  color: #e2e8f0 !important;
}

/* ミュートプレースホルダーのダークモード */
html.dark-mode .tweet-muted-placeholder {
  border-color: #3f3f3f !important;
  background: #262626 !important;
}

html.dark-mode .tweet-muted-content {
  color: #94a3b8 !important;
}

/* カスタマイズページ個別要素のダークモード */
html.dark-mode .customize-section h3 {
  color: #ffffff !important;
  border-bottom-color: #ffcc33 !important;
}

html.dark-mode .customize-badge {
  background: #262626 !important;
  border-color: #3f3f3f !important;
  box-shadow: 2px 2px 0px #3f3f3f !important;
  color: #e2e8f0 !important;
}

html.dark-mode .customize-radio input[type="radio"] {
  background-color: #262626 !important;
  border-color: #3f3f3f !important;
  box-shadow: 1.5px 1.5px 0px #3f3f3f !important;
}

html.dark-mode .customize-radio input[type="radio"]:checked::after {
  background-color: #e2e8f0 !important;
}

html.dark-mode .toggle-slider {
  background-color: #444 !important;
  border-color: #3f3f3f !important;
  box-shadow: 2px 2px 0px #3f3f3f !important;
}

html.dark-mode .toggle-slider::before {
  background-color: #888 !important;
  border-color: #3f3f3f !important;
}

html.dark-mode .customize-toggle input:checked+.toggle-slider {
  background-color: #4ca9df !important;
}

html.dark-mode .customize-toggle input:checked+.toggle-slider::before {
  background-color: #ffffff !important;
}

html.dark-mode .customize-input {
  background: #262626 !important;
  border-color: #3f3f3f !important;
  color: #e2e8f0 !important;
  box-shadow: 2px 2px 0px #3f3f3f !important;
}

html.dark-mode .customize-btn {
  background: #2b557a !important;
  border-color: #3f3f3f !important;
  box-shadow: 2px 2px 0px #3f3f3f !important;
}

html.dark-mode .customize-btn:hover {
  background: #ffcc33 !important;
  color: #333333 !important;
  box-shadow: 1px 1px 0px #3f3f3f !important;
}

/* サイドバー下部の広告枠を無効化（ベタ貼り化） */
#sidebar article.sidebar-ad-bottom {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin-bottom: 25px;
}

/* ==========================================
   スマートフォン用のレスポンシブ表示設定 (Mobile Responsive Rules)
   ========================================== */
@media screen and (max-width: 768px) {
  #wrapper {
    padding: 10px !important;
  }

  #main {
    width: 100% !important;
    float: none !important;
    margin-bottom: 30px !important;
  }

  #sidebar {
    width: 100% !important;
    float: none !important;
  }

  /* スマホではサイドメニューの広告を非表示にする */
  #sidebar .sidebar-ad-top,
  #sidebar .sidebar-ad-bottom {
    display: none !important;
  }

  /* 記事枠の余白を少し詰めて画面を広く使う */
  article {
    padding: 15px !important;
    margin-bottom: 15px !important;
    border-radius: 12px !important;
  }

  /* 見出しの文字サイズや余白調整 */
  article h2 {
    font-size: 15px !important;
    border-left-width: 20px !important;
    margin-left: 0 !important;
  }

  /* ツイート枠などの左右余白をスマホ画面でいっぱいまで広げる */
  .gr,
  .grl,
  .grs,
  .gro,
  .grco,
  .grnico,
  .grup,
  .grosi,
  .loada,
  .loadb,
  .loadc,
  .loadd,
  .loade,
  .loadf,
  .loadg,
  .loadh,
  .loadi {
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-width: 4px !important;
    /* 太すぎる枠線をスマホ向けに少し抑える */
    padding: 12px !important;
  }

  /* ツイートコントロールなどのUI調整 */
  #tweet-controls {
    margin-left: 0 !important;
    margin-right: 0 !important;
    flex-direction: column !important;
    gap: 8px !important;
    align-items: stretch !important;
  }

  #tweet-search {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  #search-tags-container {
    margin-left: 0 !important;
  }

  /* 広告エリアをスマホ画面で中央寄せにする */
  .dl {
    margin: 0 auto 15px !important;
  }

  /* カスタマイズ設定画面のスマホ最適化 */
  .customize-container {
    padding: 0 !important;
  }

  .customize-radios {
    flex-wrap: wrap !important;
    gap: 10px !important;
  }

  .customize-badge {
    margin-bottom: 8px !important;
  }

  /* 🎯 スマホ用の吹き出し基本サイズ（はみ出し防止） */
  #manga-tooltip {
    width: calc(100% - 32px) !important;
    max-width: 360px !important;
    box-sizing: border-box !important;
  }
  #manga-tooltip .manga-tooltip-body {
    width: 100% !important;
  }
}

/* ==========================================
   プロフィール ウィジェット ＆ メールフォーム
   ========================================== */

/* プロフィール */
.profile-content {
  padding: 5px 0 0;
}

.profile-content p {
  margin: 0px 0;
  font-size: 14px;
  line-height: 1.6;
}

.profile-content a {
  color: #0000ff;
  text-decoration: underline;
}

.profile-content a:hover {
  color: #ff3300;
}

/* お問い合わせフォーム */
.contact-container {
  padding: 10px 0;
}

.contact-alert {
  padding: 14px 18px;
  margin-bottom: 25px;
  border: 3px solid #333;
  border-radius: 12px;
  font-weight: bold;
  font-size: 14px;
  box-shadow: 2px 2px 0px #333;
  line-height: 1.5;
}

.contact-success {
  background-color: #c0ffd5;
  color: #333;
}

.contact-error {
  background-color: #ffdcdc;
  color: #ff3300;
}

.contact-error ul {
  margin: 0;
  padding-left: 20px;
}

.contact-field {
  margin-bottom: 22px;
}

.contact-field label {
  display: block;
  font-weight: bold;
  margin-bottom: 8px;
  font-size: 14px;
}

.contact-field .required {
  color: #ff3300;
  font-size: 12px;
  margin-left: 4px;
}

.contact-field input[type="text"],
.contact-field input[type="email"],
.contact-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 3px solid #333;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: bold;
  outline: none;
  box-sizing: border-box;
  box-shadow: 2px 2px 0px #333;
  background-color: #ffffff;
  color: #333333;
  transition: border-color 0.2s;
}

.contact-field input[type="text"]:focus,
.contact-field input[type="email"]:focus,
.contact-field textarea:focus {
  border-color: #4ca9df;
}

.contact-submit {
  text-align: right;
  margin-top: 15px;
}

/* ダークモード対応 */
html.dark-mode .profile-content a {
  color: #64b5f6 !important;
}

html.dark-mode .profile-content a:hover {
  color: #ff8a65 !important;
}

html.dark-mode .contact-field input[type="text"],
html.dark-mode .contact-field input[type="email"],
html.dark-mode .contact-field textarea {
  background-color: #1a1a1a !important;
  color: #e2e8f0 !important;
  border-color: #3f3f3f !important;
  box-shadow: 2px 2px 0px #3f3f3f;
}

html.dark-mode .contact-field input[type="text"]:focus,
html.dark-mode .contact-field input[type="email"]:focus,
html.dark-mode .contact-field textarea:focus {
  border-color: #64b5f6 !important;
}

html.dark-mode .contact-alert {
  background-color: #1a1a1a !important;
  color: #e2e8f0 !important;
  border-color: #3f3f3f !important;
  box-shadow: 2px 2px 0px #3f3f3f;
}

html.dark-mode .contact-success {
  color: #c0ffd5 !important;
}

html.dark-mode .contact-error {
  color: #ff8a65 !important;
}

#sidebar .popular-views-count {
  font-size: 12px;
  color: #888;
  margin-left: 5px;
}

/* ==========================================
   コメント欄・返信フォーム（Twitterリプライ風）
   ========================================== */
.comments-area {
  margin: 35px 0 10px;
  padding-top: 30px;
  border-top: 2px dashed #ececec;
}

.comments-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #333;
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 30px 0;
}

.comment-list li {
  margin-bottom: 16px;
}

/* 通常のリプライカード */
.comment-body {
  background: #ffffff;
  border: 2px solid #e1e8ed;
  border-radius: 12px;
  padding: 16px;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.comment-body:hover {
  border-color: #4ca9df;
  box-shadow: 0 4px 10px rgba(76, 169, 223, 0.08);
}

/* 非公開コメント（管理者が見る時） */
.is-private-comment .comment-body {
  border-color: #ffd2d2;
  background: #fff8f8;
}

.is-private-comment .comment-body:hover {
  border-color: #ff9e9e;
}

/* 非公開コメント（一般ユーザーが見る時のダミー表示） */
.private-comment-body {
  border-color: #ececec;
  background: #fafafa;
  color: #888;
}

.private-comment-body:hover {
  border-color: #ececec;
  box-shadow: none;
}

.comment-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
  color: #657786;
}

.comment-author-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-author {
  font-weight: bold;
  color: #14171a;
}

/* 非公開バッジ */
.private-badge {
  background: #ff8a65;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
}

.comment-date {
  font-size: 11px;
  color: #aab8c2;
}

.comment-content {
  font-size: 14px;
  line-height: 1.6;
  color: #1c2938;
  word-wrap: break-word;
}

.comment-content p {
  margin: 0;
}

.comment-reply {
  text-align: right;
  margin-top: 10px;
}

/* 返信するボタン */
.comment-reply a {
  display: inline-block;
  background: #ffffff;
  border: 2px solid #d3d3d3;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: bold;
  color: #555;
  text-decoration: none;
  transition: all 0.2s ease;
}

.comment-reply a:hover {
  background: #4ca9df;
  border-color: #4ca9df;
  color: #ffffff;
}

/* 返信・コメント投稿エリア */
.comment-respond {
  background: #ffffff;
  border: 2px solid #e1e8ed;
  border-radius: 16px;
  padding: 20px;
  margin-top: 25px;
}

.comment-reply-title {
  font-size: 16px;
  font-weight: bold;
  margin-top: 0;
  margin-bottom: 15px;
  color: #333;
}

.comment-form p {
  margin-top: 0;
  margin-bottom: 16px;
}

.comment-form p:last-child {
  margin-bottom: 0;
}

.comment-form label {
  display: block;
  font-weight: bold;
  font-size: 13px;
  margin-bottom: 6px;
  color: #555;
}

.comment-form input[type="text"],
.comment-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #d3d3d3;
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 14px;
  background: #ffffff;
  transition: border-color 0.2s ease;
}

.comment-form input[type="text"]:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: #4ca9df;
}

/* 非公開チェックボックスのラベル */
.private-checkbox-label {
  display: inline-flex !important;
  align-items: center;
  font-weight: normal !important;
  cursor: pointer;
  font-size: 13px;
  color: #555;
  user-select: none;
}

.private-checkbox-label input {
  margin: 0 8px 0 0;
  cursor: pointer;
}

/* 送信ボタン */
.comment-form input[type="submit"] {
  background: #4ca9df;
  border: none;
  border-radius: 999px;
  color: #ffffff;
  padding: 10px 24px;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.comment-form input[type="submit"]:hover {
  opacity: 0.85;
}

/* ==========================================
   コメント機能のダークモード設定
   ========================================== */
html.dark-mode .comments-area {
  border-top-color: #2b394e;
}

html.dark-mode .comments-title {
  color: #e2e8f0;
}

html.dark-mode .comment-body {
  background: #1e293b;
  border-color: #334155;
}

html.dark-mode .comment-body:hover {
  border-color: #64b5f6;
  box-shadow: 0 4px 10px rgba(100, 181, 246, 0.08);
}

html.dark-mode .comment-author {
  color: #f1f5f9;
}

html.dark-mode .comment-date {
  color: #64748b;
}

html.dark-mode .comment-content {
  color: #cbd5e1;
}

html.dark-mode .comment-reply a {
  background: #1e293b;
  border-color: #475569;
  color: #cbd5e1;
}

html.dark-mode .comment-reply a:hover {
  background: #64b5f6;
  border-color: #64b5f6;
  color: #0f172a;
}

html.dark-mode .comment-respond {
  background: #1e293b;
  border-color: #334155;
}

html.dark-mode .comment-reply-title {
  color: #e2e8f0;
}

html.dark-mode .comment-form label {
  color: #94a3b8;
}

html.dark-mode .comment-form input[type="text"],
html.dark-mode .comment-form textarea {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

html.dark-mode .comment-form input[type="text"]:focus,
html.dark-mode .comment-form textarea:focus {
  border-color: #64b5f6;
}

html.dark-mode .private-checkbox-label {
  color: #cbd5e1;
}

/* ダークモード時の非公開コメント表示 */
html.dark-mode .is-private-comment .comment-body {
  border-color: #7f1d1d;
  background: #271c1c;
}

html.dark-mode .is-private-comment .comment-body:hover {
  border-color: #b91c1c;
}

html.dark-mode .private-comment-body {
  background: #1a2238;
  border-color: #2b3954;
  color: #94a3b8;
}

/* コメントの注意書き「※ が付いている欄は必須項目です」を非表示にする */
.comment-notes {
  display: none !important;
}

/* 非公開コメント（一般ユーザー向け：鍵マークのみ表示の装飾） */
.private-comment-lock-only {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f5f8fa;
  border: 2px dashed #ccd6dd;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  color: #657786;
  margin: 8px 20px;
}

html.dark-mode .private-comment-lock-only {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

/* ユーザー候補を提案するボックス */
.user-suggest-box {
  margin: 20px;
  padding: 20px;
  border: 3px solid #4ca9df;
  border-radius: 16px;
  background: #f0f8ff;
  text-align: center;
}

.user-suggest-title {
  font-weight: bold;
  color: #2d7a9c;
  margin-bottom: 12px;
  font-size: 15px;
}

.user-suggest-btn {
  background: #ffffff;
  border: 2px solid #4ca9df;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: bold;
  color: #2d7a9c;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.user-suggest-btn:hover {
  background: #4ca9df;
  color: #ffffff;
  transform: translateY(-2px);
}

/* 🌙 ダークモード用 */
html.dark-mode .user-suggest-box {
  border-color: #2b557a;
  background: #121f2b;
}

html.dark-mode .user-suggest-title {
  color: #4ca9df;
}

html.dark-mode .user-suggest-btn {
  background: #2a2a2a;
  border-color: #4ca9df;
  color: #4ca9df;
}

html.dark-mode .user-suggest-btn:hover {
  background: #4ca9df;
  color: #1e1e1e;
}

/* ==========================================
   吹き出し（ツールチップ）の背景カバーとスマホ用最適化
   ========================================== */

/* 吹き出しの背景カバー（オーバーレイ） */
#tooltip-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4); /* 40%の暗さの半透明黒 */
  z-index: 9998; /* 吹き出し(9999)のすぐ下 */
  display: none;
}

/* ==========================================
   吹き出し（ツールチップ）のスマホ用最適化スタイル
   ========================================== */

/* スマホ表示用の吹き出しスタイル（上部固定用） */
.mobile-tooltip {
  position: fixed !important;
  top: 10px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  transform-origin: top center !important;
  bottom: auto !important;
}

/* スマホ表示時のしっぽの左右移動 */
.mobile-tooltip::after {
  left: var(--tail-left, 50%) !important;
  transform: translateX(-50%) !important;
}
.mobile-tooltip::before {
  left: var(--tail-left, 50%) !important;
  transform: translateX(-50%) !important;
}