/* ===== Single page typography ===== */

/* カスタム single.php 本文 */
.agora-post-body{
  color:#000;
  font-size: 18px;    /* +2pt相当 */
  line-height: 1.8;
}

/* 記事の左右余白（single.php のカード内で効く） */
.agora-post-card{
  padding-left: 28px;
  padding-right: 28px;
}

/* ===== Images: max 400px, never upscale ===== */
.agora-post-body img{
  max-width: min(100%, 400px);
  height: auto;
  display: block;
  margin: 14px auto;
}

/* 400px超の画像だけ “拡大可” にする（JSで付与） */
.agora-post-body img.agora-zoomable{
  cursor: zoom-in;
}

/* オーバーレイ（拡大表示） */
.agora-zoom-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 24px;
}

.agora-zoom-overlay img{
  max-width: min(95vw, 1200px);
  max-height: 92vh;
  width: auto;
  height: auto;
  cursor: zoom-out;
  box-shadow: 0 20px 70px rgba(0,0,0,0.45);
  border-radius: 12px;
  background: #fff;
}
/* =========================================
   Single images: hard cap 400px (win vs TT5)
========================================= */

/* ブロック画像・figure も含めて「通常表示」を強制的に400pxに収める */
.agora-post-body img,
.agora-post-body figure img,
.agora-post-body .wp-block-image img{
  max-width: 400px !important;
  width: auto !important;       /* ← 100%にしない（拡大を防ぐ） */
  height: auto !important;
  display: block !important;
  margin: 16px auto !important;
}

/* 画像ブロックが勝手に横幅を持つのを抑える */
.agora-post-body figure,
.agora-post-body .wp-block-image{
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* キャプションがあっても中央寄せ */
.agora-post-body figcaption{
  text-align: center;
}
/* Single: comment pill (same vibe as TOP badge) */
.agora-comment-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius: 999px;
  text-decoration:none !important;
  background: rgba(255,154,60,0.10);
  border: 1px solid rgba(255,154,60,0.55);
  color:#111 !important;
  font-size: 12px;
  font-weight: 700;
}

.agora-comment-pill:hover{
  background: rgba(255,154,60,0.16);
}

.agora-comment-ico{
  line-height: 1;
}

.agora-comment-badge{
  margin-left: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,154,60,0.95);
  color:#111;
  font-size: 11px;
  font-weight: 900;
}
/* =====================================================
   FIX: emoji/smiley img should NOT be treated as “content images”
   - prevent huge scaling on single page
===================================================== */

/* WordPressの絵文字（画像化）を“絵文字サイズ”に固定 */
.single .entry-content img.wp-smiley,
.single .entry-content img.emoji,
.single .wp-block-post-content img.wp-smiley,
.single .wp-block-post-content img.emoji{
  width: 1em !important;
  height: 1em !important;
  max-width: none !important;
  max-height: none !important;
  display: inline !important;
  vertical-align: -0.15em;
  object-fit: contain !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* もし親側の「img { width:100% }」が強い場合の保険：絵文字だけ無効化 */
.single .entry-content .wp-smiley,
.single .entry-content .emoji{
  width: 1em !important;
}
/* =====================================================
   FIX: emoji/smiley img should NOT be treated as “content images”
   - prevent huge scaling on single page
===================================================== */

/* AGORAの本文ラッパー内の「絵文字画像」を絵文字サイズに固定 */
.agora-post-body img.wp-smiley,
.agora-post-body img.emoji,
.agora-post-body .wp-smiley,
.agora-post-body .emoji{
  width: 1em !important;
  height: 1em !important;
  max-width: none !important;
  max-height: none !important;
  display: inline !important;
  vertical-align: -0.15em !important;
  margin: 0 !important;
  object-fit: contain !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
