/* =========================================================
   cast-timeline.css (CLEAN / CANONICAL)
   - X風カード + threaded返信ツリー + accordion
   - role(root/child)でインデント/色を確定
   - ul/li/details由来のズレを根絶
   - Mobile余白は変数で調整
   ========================================================= */

/* =========================
   0) 調整用変数（ここだけ触ればOK）
   ========================= */
:root{
  /* タイムライン外枠（PC） */
  --tl-padding-y: 10px;
  --tl-radius: 16px;

  /* 通常カード（PC） */
  --card-mt: 0px;
  --card-mb: 10px;
  --card-ml: 10px;
  --card-mr: 10px;
  --card-radius: 16px;

  /* threaded返信ツリー：root/child（PC） */
  --thread-root-ml: 28px;
  --thread-child-ml: 56px;
  --thread-mr: 10px;

  /* 単体返信（single） */
  --single-root-ml: 0px;
  --single-child-ml: 36px;

  /* Mobile（<=600px） */
  --m-tl-padding-y: 6px;
  --m-tl-radius: 12px;

  /* 通常カード（Mobile） */
  --m-card-mt: 0px;
  --m-card-mb: 8px;
  --m-card-ml: 0px;
  --m-card-mr: 0px;

  /* threaded返信ツリー：root/child（Mobile） */
  --m-thread-root-ml: 0px;
  --m-thread-child-ml: 0px;
  --m-thread-mr: 0px;

  /* 単体返信（Mobile） */
  --m-single-root-ml: 0px;
  --m-single-child-ml: 36px;
}

/* =========================
   SNSボタン
   ========================= */
.sns-follow-buttons a{ display:none !important; }
.sns-follow-buttons a.twitter-button,
.sns-follow-buttons a.x-button{ display:inline-block !important; }
.sns-follow-buttons a.bluesky-button{ display:inline-block !important; }

/* =========================
   1) タイムライン全体（X風）
   ========================= */
.cast-timeline-x{
  list-style: none;
  margin: 0;
  padding: var(--tl-padding-y) 0;
  background: transparent;
  border-radius: var(--tl-radius);
}

.cast-timeline-x,
.cast-timeline-x ul,
.cast-timeline-x li{
  margin: 0;
  padding: 0;
  list-style: none;
}

/* =========================
   2) 投稿カード（共通）
   ========================= */
.cast-post-card{
  display: flex;
  padding: 12px 10px;
  background: #fff;
  margin-top: var(--card-mt);
  margin-right: var(--card-mr);
  margin-bottom: var(--card-mb);
  margin-left: var(--card-ml);
  border: 1px solid #e6ecf0;
  border-radius: var(--card-radius);
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
  transition: box-shadow .2s, background .2s;
}
.cast-post-card:hover{
  background: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

.cast-avatar img{
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin-right: 10px;
  object-fit: cover;
  display: block;
}

.cast-avatar-link{ display:block; }

.cast-body{ flex: 1; min-width: 0; }
.cast-header{
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.cast-name{
  font-weight: 700;
  font-size: 15px;
  color: #0f1419;
  text-decoration: none;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.cast-name:hover{ text-decoration: underline; }
.cast-date{ color: #657786; font-size: 0.8em; }

.cast-content{
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.45;
  color: #0f1419;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.read-more{ display:none !important; }

/* =========================
   3) 本文画像グリッド
   ========================= */
/* =========================
   投稿画像グリッド（X風）
   ========================= */
.cast-post-gallery-inline{
  display: grid;
  gap: 3px;
  margin-top: 8px;
  border-radius: 12px;
  overflow: hidden;
}
.cast-post-gallery-inline img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: opacity .2s ease;
}
.cast-post-gallery-inline img:hover{ opacity: 0.9; }

/* 1枚：元の縦横比を保持（最大高さだけ制限） */
.cast-post-gallery-inline.count-1{
  grid-template-columns: 1fr;
}
.cast-post-gallery-inline.count-1 img{
  height: auto;
  max-height: 420px;
  object-fit: contain;
  object-position: left center;
}

/* 2枚：左右均等に2分割（正方形クロップ） */
.cast-post-gallery-inline.count-2{
  grid-template-columns: 1fr 1fr;
}
.cast-post-gallery-inline.count-2 img{
  aspect-ratio: 1 / 1;
}

/* 3枚：X風（左1枚全高 ＋ 右2枚上下） */
.cast-post-gallery-inline.count-3{
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  height: 280px;
}
.cast-post-gallery-inline.count-3 img:first-child{
  grid-row: span 2;
}

/* 4枚：2×2 均等グリッド（正方形クロップ） */
.cast-post-gallery-inline.count-4{
  grid-template-columns: 1fr 1fr;
}
.cast-post-gallery-inline.count-4 img{
  aspect-ratio: 1 / 1;
}

/* 5〜6枚：2カラム */
.cast-post-gallery-inline.count-5,
.cast-post-gallery-inline.count-6{
  grid-template-columns: 1fr 1fr;
  height: 280px;
}

/* =========================
   4) タグ
   ========================= */
.cast-tags a{
  text-decoration: none;
  padding: 2px 6px;
  border-radius: 12px;
  margin: 2px;
  color: #fff;
  font-size: 0.75em;
  display: inline-block;
}
.cast-area{ background-color:#1d9bf0; }
.cast-play{ background-color:#e0245e; }
.cast-type{ background-color:#ffad1f; }

/* =========================
   5) コンテキスト（返信/引用）
   ========================= */
.cast-context{
  margin: 8px 0 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e6ecf0;
  border-left-width: 4px;
}
.cast-post-card.is-quote .cast-context{ border-left-color:#1d9bf0; }
.cast-post-card.is-reply .cast-context{ border-left-color:#00ba7c; }
.cast-post-card.is-repost .cast-context{ border-left-color:#8b98a5; }

.cast-context .label{
  font-size: 12px;
  font-weight: 700;
  color: #536471;
}
.cast-context .context-body{
  font-size: 13px;
  color: #0f1419;
  margin-top: 4px;
  line-height: 1.35;
}

/* =========================
   5-2) Quote card (X-like)
   ========================= */
.cast-context.is-quote.x-quote-card{
  border: 2px solid #7a00df;
  background: #fbf5ff;
  box-shadow: none !important;
}

.cast-context.is-quote.x-quote-card .x-quote-head{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:6px;
  justify-content:flex-start !important;
}
.cast-context.is-quote.x-quote-card .x-quote-user{
  display:flex;
  align-items:center;
  gap:8px;
  text-decoration:none;
  flex: 0 1 auto;
}
.cast-context.is-quote.x-quote-card .x-quote-mini-avatar{
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}
.cast-context.is-quote.x-quote-card .x-quote-mini-name{
  font-weight: 800;
  font-size: 13px;
  color: #0f1419;
}
.cast-context.is-quote.x-quote-card .x-quote-mini-date{
  margin-left: 8px !important;
  font-size: 12px;
  color: #657786;
  text-decoration:none;
  flex: 0 0 auto;
}
.cast-context.is-quote.x-quote-card .x-quote-body{
  display:block;
  font-size: 13px;
  color: #0f1419;
  line-height: 1.35;
  text-decoration:none;
}

.cast-context.is-quote.x-quote-card .x-quote-thumb-wrap{
  margin-top: 8px;
  border-radius: 12px;
  overflow: hidden;
}
.cast-context.is-quote.x-quote-card .x-quote-thumb{
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  max-height: none;
  object-fit: cover;
  display:block;
}

.single-cast_post_log .cast-context.is-quote.x-quote-card{
  display:block !important;
}



/* =========================
   6) アクション（💬🔁❤️）
   ========================= */
.cast-actions{
  margin-top: 5px;
  display: flex;
  gap: 12px;
  font-size: 0.9em;
  color: #536471;
  position: relative;
}
.cast-actions span{ cursor:pointer; transition: transform .2s; }
.cast-actions span:hover{ transform: scale(1.2); }

.cast-like{ cursor:pointer; color:#666; transition: color .2s, transform .2s; }
.cast-like.liked{ color:#e0245e; transform: scale(1.15); }
.cast-like:active{ transform: scale(0.95); }

.cast-repost-menu{
  position: absolute;
  top: 28px;
  left: 0;
  background: #fff;
  border: 1px solid #e6ecf0;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
  z-index: 99999;
  display: none;
  min-width: 160px;
}
.cast-repost-menu button{
  width: 100%;
  display: block;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  border-radius: 10px;
}
.cast-repost-menu button:hover{ background:#f5f8fa; }
.cast-repost-menu-meta{
  margin-top: 6px;
  font-size: 12px;
  color: #657786;
  padding: 0 8px 4px;
}

/* =========================
   7) タブ（X風）
   ========================= */
.cast-tabs-wrap{ margin: 0 0 10px; }
.cast-tabs{
  display:flex;
  border-bottom: 1px solid #e6ecf0;
  background:#fff;
  border-radius: 16px 16px 0 0;
  overflow:hidden;
}
.cast-tab{
  flex: 1;
  padding: 12px 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  color: #536471;
}
.cast-tab.is-active{
  color: #0f1419;
  border-bottom: 3px solid #1d9bf0;
}
.cast-tab-panels{
  background:#fff;
  border: 1px solid #e6ecf0;
  border-top: 0;
  border-radius: 0 0 16px 16px;
  padding: 0;
}
.cast-tab-panels .cast-timeline-x{
  background: transparent;
  padding: 0;
  border-radius: 0;
}
.cast-tab-panels .cast-post-card{
  margin: 0;
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  box-shadow: none;
}

/* =========================
   8) ライトボックス / モーダル
   ========================= */
#x-lightbox{
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  background: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
}
#x-lightbox img{
  max-width: 92%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 12px;
  will-change: transform, opacity;
}
@keyframes lb-in-right{
  from{ transform:translateX(60px); opacity:0; }
  to  { transform:translateX(0);    opacity:1; }
}
@keyframes lb-in-left{
  from{ transform:translateX(-60px); opacity:0; }
  to  { transform:translateX(0);     opacity:1; }
}
@keyframes lb-in-fade{
  from{ opacity:0; }
  to  { opacity:1; }
}
#x-lightbox img.lb-slide-next { animation: lb-in-right .22s ease; }
#x-lightbox img.lb-slide-prev { animation: lb-in-left  .22s ease; }
#x-lightbox img.lb-fade       { animation: lb-in-fade  .18s ease; }
.x-lightbox-close{
  position: absolute;
  top: 20px;
  right: 28px;
  font-size: 32px;
  color: #fff;
  cursor: pointer;
  border: 0;
  background: transparent;
}
/* 前/次ボタン */
.x-lightbox-prev,
.x-lightbox-next{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 52px;
  line-height: 1;
  color: #fff;
  background: rgba(0,0,0,.35);
  border: 0;
  padding: 0 14px;
  cursor: pointer;
  border-radius: 8px;
  user-select: none;
  -webkit-user-select: none;
  display: none;          /* JS で表示切替 */
}
.x-lightbox-prev{ left: 10px; }
.x-lightbox-next{ right: 10px; }
/* カウンター（例：2 / 4） */
.x-lightbox-counter{
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  background: rgba(0,0,0,.45);
  padding: 3px 12px;
  border-radius: 999px;
  pointer-events: none;
}
body.cast-modal-open{ overflow:hidden; }

#quote-modal,
#comment-modal{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.55);
  z-index: 2147483647;
  padding: 16px;
}
#quote-modal .quote-box,
#comment-modal .quote-box{
  width: min(500px, 92vw);
  max-height: 80vh;
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-sizing: border-box;
}

/* =========================
   9) threaded返信ツリー（トップ/プロフ）
   ========================= */
.cast-timeline-x.cast-threaded .cast-thread-block-inner{
  padding-left: 0 !important;
  margin-left: 0 !important;
}

.cast-thread-block-replies,
.cast-thread-block-replies ul,
.cast-thread-block-replies li{
  margin-left: 0 !important;
  padding-left: 0 !important;
  list-style: none !important;
}
.cast-thread-block-replies .cast-threaded-replies,
.cast-thread-block-replies .cast-threaded-replies-hidden,
.cast-thread-block-replies .cast-thread,
.cast-thread-block-replies .cast-thread-more-body,
.cast-thread-block-replies ul.cast-thread-items{
  margin-left: 0 !important;
  padding-left: 0 !important;
  transform: none !important;
}

.cast-thread-block-replies details.cast-thread-more{
  padding-left: 0 !important;
  margin-left: 0 !important;
}

.cast-timeline-x.cast-threaded .cast-thread-block > .cast-thread-block-inner > li.cast-post-card{
  background: #fff !important;
  border-color: #e6ecf0 !important;
}

.cast-thread-more-body li.cast-post-card.is-thread[data-depth="1"]{
  margin-top: 0 !important;
  margin-right: var(--thread-mr) !important;
  margin-bottom: 10px !important;
  margin-left: var(--thread-root-ml) !important;
}
.cast-thread-more-body li.cast-post-card.is-thread[data-depth]:not([data-depth="1"]){
  margin-top: 0 !important;
  margin-right: var(--thread-mr) !important;
  margin-bottom: 10px !important;
  margin-left: var(--thread-child-ml) !important;
}

.cast-thread-more-body li.cast-post-card.is-thread[data-depth="1"]{
  background: #eef7ff !important;
  border-color: #cfe8ff !important;
}
.cast-thread-more-body li.cast-post-card.is-thread:not([data-depth="1"]){
  background: #fff0f3 !important;
  border-color: #ffd6e0 !important;
}

details.cast-thread-more > summary.cast-thread-more-summary{
  display: list-item !important;
  list-style: none !important;
  cursor: pointer !important;
  color: #1d9bf0 !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  padding: 8px 12px !important;
  margin: 6px 0 !important;
  pointer-events: auto !important;
}
details.cast-thread-more > summary::-webkit-details-marker{ display:none !important; }
details.cast-thread-more > summary::marker{ content:"" !important; }
.cast-thread-more-body{ margin-top: 6px; }

details.cast-thread-more[open] > summary.cast-thread-more-summary{
  font-size: 0 !important;
}
details.cast-thread-more[open] > summary.cast-thread-more-summary::after{
  content: "返信を閉じる";
  font-size: 14px;
  font-weight: 700;
  color: #1d9bf0;
}

/* =========================
   10) 単体 cast_post_log：返信欄（直リプTL）
   ========================= */
.single-cast_post_log ul.cast-timeline-x:not(.is-replies){ display:none !important; }
.single-cast_post_log .cast-replies-thread{ display:block !important; }
.single-cast_post_log ul.cast-timeline-x.is-replies{ display:block !important; }

.single-cast_post_log .cast-replies-thread{ margin-top: 12px; }

.single-cast_post_log .cast-replies-thread,
.single-cast_post_log .cast-replies-thread ul,
.single-cast_post_log .cast-replies-thread li{
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.single-cast_post_log .cast-replies-thread .cast-single-replies-tl{
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.single-cast_post_log .cast-replies-thread .cast-single-replies-tl li.cast-post-card{
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.single-cast_post_log .cast-replies-thread li.cast-post-card.is-thread[data-thread-role="root"]{
  margin-left: var(--single-root-ml) !important;
  background: #eef7ff !important;
  border-color: #cfe8ff !important;
}
.single-cast_post_log .cast-replies-thread li.cast-post-card.is-thread[data-thread-role="child"]{
  margin-left: var(--single-child-ml) !important;
  background: #fff0f3 !important;
  border-color: #ffd6e0 !important;
}

.single-cast_post_log details.cast-thread-more[open] > summary.cast-thread-more-summary{
  font-size: 0 !important;
}
.single-cast_post_log details.cast-thread-more[open] > summary.cast-thread-more-summary::after{
  content: "返信を閉じる";
  font-size: 14px;
  font-weight: 700;
  color: #1d9bf0;
}

/* =========================
   11) Timeline: 本文折りたたみ（cast-more）
   ========================= */
details.cast-more .more-close{ display: none; }
details.cast-more[open] .more-open{ display: none; }
details.cast-more[open] .more-close{ display: inline; }

details.cast-more > summary.cast-more-summary{
  pointer-events: none;
}
details.cast-more > summary.cast-more-summary .cast-more-ctl,
details.cast-more > summary.cast-more-summary .cast-more-ctl *{
  pointer-events: auto;
  cursor: pointer;
}

/* =========================
   12) Mobile（<=600px）
   ========================= */
@media (max-width: 600px){
  .cast-timeline-x{
    padding: var(--m-tl-padding-y) 0 !important;
    border-radius: var(--m-tl-radius) !important;
  }

  .cast-post-card{
    margin-top: var(--m-card-mt) !important;
    margin-right: var(--m-card-mr) !important;
    margin-bottom: var(--m-card-mb) !important;
    margin-left: var(--m-card-ml) !important;
  }

  .cast-thread-more-body li.cast-post-card.is-thread[data-depth="1"]{
      margin-right: var(--m-thread-mr) !important;
      margin-left: var(--m-thread-root-ml) !important;
      margin-bottom: 8px !important;
    }
    .cast-thread-more-body li.cast-post-card.is-thread[data-depth]:not([data-depth="1"]){
      margin-right: var(--m-thread-mr) !important;
      margin-left: var(--m-thread-child-ml) !important;
      margin-bottom: 8px !important;
    }

  .single-cast_post_log .cast-replies-thread li.cast-post-card.is-thread[data-thread-role="root"]{
    margin-left: var(--m-single-root-ml) !important;
  }
  .single-cast_post_log .cast-replies-thread li.cast-post-card.is-thread[data-thread-role="child"]{
    margin-left: var(--m-single-child-ml) !important;
  }
}

/* =========================================================
   Timeline: cast-more（さらに表示 / 一部を表示）をブルーに
   ========================================================= */
details.cast-more .cast-more-ctl .more-open,
details.cast-more .cast-more-ctl .more-close{
  color: #1d9bf0 !important;
  font-weight: 700;
}

/* =========================================================
   Weekly schedule (profile): 7列×3行
   ========================================================= */
.cast-weekly-schedule{
  margin: 12px 0;
}

.cast-weekly-grid{
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.cast-weekly-col{
  background: #fff;
  border: 1px solid #e6ecf0;
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
}

.cast-weekly-date{
  font-weight: 800;
  font-size: 12px;
  color: #0f1419;
}
@media (max-width: 600px){
  .cast-weekly-date{ font-size: 13px; }
}

.cast-weekly-time{
  margin-top: 6px;
  font-weight: 700;
  font-size: 13px;
  color: #1d9bf0;
}

.cast-weekly-area{
  margin-top: 6px;
  font-weight: 700;
  font-size: 13px;
  color: #536471;
}

@media (max-width: 600px){
  .cast-weekly-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* =========================================================
   Member icon jewel shimmer
   ========================================================= */
@keyframes member-icon-shimmer{
  0%  { transform:translateX(-150%) rotate(30deg); opacity:0; }
  20% { opacity:1; }
  80% { opacity:1; }
  100%{ transform:translateX(150%) rotate(30deg); opacity:0; }
}
.member-icon-jewel{
  position:relative !important;
  overflow:hidden !important;
}
.member-icon-jewel::after{
  content:"";
  position:absolute;
  top:-50%;
  left:0;
  width:35%;
  height:200%;
  background:linear-gradient(to right,rgba(255,255,255,0) 0%,rgba(255,255,255,.55) 50%,rgba(255,255,255,0) 100%);
  transform:translateX(-150%) rotate(30deg);
  animation:member-icon-shimmer 3s ease-in-out infinite;
  pointer-events:none;
  z-index:1;
}

/* =========================================================
   Cast profile public (cast_post front)
   ========================================================= */
.cast-profile-public{
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #e6ecf0;
  border-radius: 16px;
  background: #fff;
}

.cast-profile-head{
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.cast-profile-avatar img{
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  display:block;
}

.cast-profile-name{
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
}

.cast-profile-tags-row{
  display:flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
  flex-wrap: wrap;
}
.cast-profile-tags-label{
  font-size: 12px;
  font-weight: 800;
  color: #536471;
}
.cast-profile-tags{
  display:flex;
  gap: 6px;
  flex-wrap: wrap;
}
.cast-profile-tag{
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f5f8fa;
  border: 1px solid #e6ecf0;
  color: #0f1419;
}

.cast-profile-gallery{
  margin-top: 10px;
}
.cast-profile-gallery-track{
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
}
.cast-profile-gallery-item{
  flex: 0 0 auto;
  width: min(320px, 78vw);
  scroll-snap-align: start;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e6ecf0;
}
.cast-profile-gallery-item img{
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display:block;
}

.cast-profile-block{
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e6ecf0;
}
.cast-profile-block-title{
  font-weight: 800;
  margin-bottom: 6px;
}
.cast-profile-block-body{
  font-size: 14px;
  line-height: 1.55;
  color: #0f1419;
}

/* =========================================================
   cast_post: auto profile block (sample-like)
   ========================================================= */
.cast-profile-auto{
  margin-top: 10px;
  margin-bottom: 14px;
}

.cast-profile-catch{
  font-weight: 700;
  font-size: 16px;
  margin: 6px 0 10px;
}

.cast-profile-lines{
  margin: 8px 0 12px;
}
.cast-profile-line{
  display:flex;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #e6ecf0;
}
.cast-profile-line .k{
  width: 92px;
  color: #536471;
  font-weight: 800;
}
.cast-profile-line .v{
  flex: 1;
  color: #0f1419;
}

.cast-profile-text{
  line-height: 1.7;
}

/* =========================================================
   Cast profile slider (left column)
   ========================================================= */
.cast-prof-slider{
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e6ecf0;
  background: #fff;
}
.cast-prof-slider.empty{
  padding: 24px;
  color:#657786;
  font-weight: 700;
}
.cast-prof-slider-viewport{
  overflow: hidden;
}
.cast-prof-slider-track{
  display: flex;
  transition: transform .28s ease;
  will-change: transform;
}
.cast-prof-slide{
  flex: 0 0 100%;
}
.cast-prof-slide img{
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display:block;
}

.cast-prof-slider-btn{
  position:absolute;
  top:50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 0;
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 28px;
  line-height: 40px;
  cursor:pointer;
}
.cast-prof-slider-btn.prev{ left: 10px; }
.cast-prof-slider-btn.next{ right: 10px; }
.cast-prof-slider-btn:hover{ background: rgba(0,0,0,.5); }

.cast-prof-slider-dots{
  position:absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display:flex;
  justify-content:center;
  gap: 6px;
}
.cast-prof-slider-dots .dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.55);
}
.cast-prof-slider-dots .dot.is-active{
  background: rgba(255,255,255,.95);
}

/* castプロフ：表示名と所属店舗の間隔を詰める */
.entry-content h2.wp-block-heading.has-background {
  margin-bottom: 4px !important;
}
.entry-content h5.wp-block-heading {
  margin-top: 0 !important;
  margin-bottom: 8px !important;
}

/* プロフィール見出し（右カラムh3）を小さく：PC のみ */
@media (min-width: 600px) {
  .wp-block-column h3.wp-block-heading.has-purple-background-color {
    font-size: 14px !important;
    padding: 4px 12px !important;
    margin-bottom: 8px !important;
  }
}

.cast-prof-box{
  border: 1px solid #e6ecf0;
  border-radius: 16px;
  padding: 14px;
  background:#fff;
}
.cast-prof-name{
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 6px;
}
.cast-prof-shop{
  font-weight: 800;
  color: #7a00df;
  margin-bottom: 10px;
}
.cast-prof-line,
.cast-prof-tags-row{
  display:flex;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #e6ecf0;
}
.cast-prof-line .k,
.cast-prof-tags-row .k{
  width: 92px;
  color: #536471;
  font-weight: 800;
}
.cast-prof-line .v,
.cast-prof-tags-row .v{
  flex: 1;
}
.cast-prof-tag{
  display:inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background:#f5f8fa;
  border:1px solid #e6ecf0;
  margin: 2px 4px 0 0;
  font-size: 12px;
}

@media (max-width: 800px){
  .cast-prof-name{ font-size: 20px; }
}

/* プロフ写真スライダー：見本は縦長なので 3:4 に寄せる */
.cast-prof-slide img{
  aspect-ratio: 3 / 4 !important;
}

/* 得意プレイ・タイプ：2カラム下に移動後のラッパー */
.cast-prof-tags-below {
  border: 1px solid #e6ecf0;
  border-radius: 16px;
  padding: 0 14px;
  background: #fff;
  margin-bottom: 14px;
}
.cast-prof-tags-below .cast-prof-tags-row:last-child {
  border-bottom: none;
}

/* cast_post 自動差し込みの2カラム */
.cast-prof-auto-2col{
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
  align-items: start;
  margin-bottom: 10px;
}
@media (max-width: 900px){
  .cast-prof-auto-2col{ grid-template-columns: 1fr; }
}

/* 料金システム：見本寄せのテーブル */
.cast-fee-table{
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 14px;
}
.cast-fee-table th,
.cast-fee-table td{
  border: 1px solid #e6ecf0;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.cast-fee-table th{
  width: 35%;
  background: #f5f8fa;
  font-weight: 800;
}

/* お客様からの声：アコーディオン */
.cast-voices .cast-voice{
  border: 1px solid #e6ecf0;
  border-radius: 12px;
  background: #fff;
  padding: 8px 10px;
  margin: 8px 0;
}
.cast-voices .cast-voice__summary{
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}
.cast-voices .cast-voice__summary::-webkit-details-marker{ display:none; }
.cast-voices .cast-voice__body{
  margin-top: 8px;
  line-height: 1.7;
}

/* cast_post の目次を消す */
.single-cast_post .toc,
.single-cast_post .toc-content,
.single-cast_post .toc-title,
.single-cast_post .toc-list,
.single-cast_post .table-of-contents,
.single-cast_post #toc,
.single-cast_post #toc_container,
.single-cast_post .widget_index_list,
.single-cast_post .index-box,
.single-cast_post .toc-widget-box,
.single-cast_post .entry-content .toc,
.single-cast_post .entry-content .toc-content,
.single-cast_post article .toc,
.single-cast_post article .toc-content {
  display: none !important;
}

/* cast_post：お客様からの声 見出し */
.single-cast_post .cast-voice-heading{
  margin: 1.2em 0 .6em;
  line-height: 1.4;
  color:#e85d8e !important;
  font-weight:700 !important;
}

.single-cast_post .cast-voice-heading::after{
  content:"PickUp";
  display:inline-block;
  margin-left:6px;
  padding:2px 10px;
  border-radius:999px;
  background:linear-gradient(135deg,#ffcee9,#c8b6ff);
  color:#3b0d0d;
  font-size:.78em;
  font-weight:700;
  vertical-align:middle;
}

/* =========================================================
   Repost banner
   ========================================================= */
.cast-repost-banner{
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  color: #536471;
  font-size: 13px;
  line-height: 1.4;
}

.cast-repost-icon{
  display: inline-block;
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
  transform: translateY(-1px);
  text-shadow:
  0.25px 0 currentColor,
  -0.25px 0 currentColor,
  0 0.25px currentColor,
  0 -0.25px currentColor;
}

.cast-repost-user{
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

.cast-repost-user:hover{
  text-decoration: underline;
}

/* =========================
   member投稿アクションボタン（タイムライン上のmember投稿に適用）
   ========================= */
.member-actions{
  margin-top: 5px;
  display: flex;
  gap: 12px;
  color: #536471;
  position: relative;
}

.member-action-btn{
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: #536471;
  font-size: 0.9em;
  line-height: 1;
  transition: transform .2s, color .2s;
}

.member-action-btn:hover{
  transform: scale(1.2);
}

.member-action-icon{
  font-size: 1em;
  line-height: 1;
}

.member-action-count{
  font-size: 1em;
  line-height: 1;
  color: inherit;
}

.member-action-comment:hover{ color: #1d9bf0; }
.member-action-repost:hover  { color: #00ba7c; }
.member-action-like:hover    { color: #e0245e; }

.member-action-like.is-liked{
  color: #e0245e;
}
.member-action-like.is-liked .member-action-count{
  color: inherit;
}

.member-action-repost.is-reposted{
  color: #00ba7c;
}

.member-repost-wrap{
  position: relative;
  display: inline-flex;
}

.member-repost-menu{
  display: none;
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  background: #fff;
  border: 1px solid #e6ecf0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  min-width: 170px;
  z-index: 100;
  overflow: hidden;
}


/* ----------------------------------------------------------
   Castプロフ：フォローボタン＋Xアカウントボタン行（2カラム）
   左: フォローボタン / 右: Xラベル＋ボタン縦並び
   ---------------------------------------------------------- */
.cast-prof-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 10px;
  margin: 8px 0 4px;
}

/* フォローボタン側：左寄せ */
.cast-prof-actions > :first-child {
  justify-self: start;
}

/* Xアカウント側：縦並び・中央寄せ */
.cast-x-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
}

.cast-x-contact__label {
  font-size: 13px;
  color: #f0f0f0;
  white-space: nowrap;
  line-height: 1.6;
}
/* PC: 改行タグを非表示（1行） */
.cast-x-label-br { display: none; }
/* スマホ: 改行タグを有効にして2行表示 */
@media (max-width: 599px) {
  .cast-x-contact__label { white-space: normal; text-align: center; }
  .cast-x-label-br { display: inline; }
}

.cast-x-contact__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 18px;
  background: linear-gradient(270deg, #f472b6, #a14b73, #818cf8, #f472b6);
  background-size: 300% 100%;
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  border: none;
  position: relative;
  overflow: hidden;
  animation: cast-x-btn-gradient 3s ease infinite;
  box-shadow: 0 0 10px rgba(161,75,115,0.6), 0 0 20px rgba(129,140,248,0.3);
  transition: box-shadow 0.3s;
}
.cast-x-contact__btn::before {
  content: '';
  position: absolute;
  top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.45) 50%, transparent 100%);
  animation: cast-x-btn-shine 2.2s ease infinite;
}
.cast-x-contact__btn:hover {
  color: #fff;
  box-shadow: 0 0 16px rgba(244,114,182,0.8), 0 0 30px rgba(129,140,248,0.5);
}

@keyframes cast-x-btn-gradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes cast-x-btn-shine {
  0%   { left: -75%; }
  60%  { left: 130%; }
  100% { left: 130%; }
}

.cast-x-icon {
  flex-shrink: 0;
}

/* 未ログイン時フォローボタン（ログイン済みの member-follow-btn と同デザイン） */
.cast-follow-noauth-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.cast-follow-noauth-btn {
  display: inline-block;
  padding: 8px 22px;
  border: 2px solid #a14b73;
  border-radius: 999px;
  background: #a14b73;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.cast-follow-noauth-note {
  margin-top: 6px;
  font-size: 11px;
  color: #999;
}

/* … メニュー */
.cast-post-menu {
  position: relative;
  margin-left: auto;
  flex-shrink: 0;
}
.cast-post-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: #bbb;
  padding: 0;
  border-radius: 50%;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cast-post-menu-btn:hover {
  background: #f5f5f5;
  color: #666;
}
.cast-post-menu-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  min-width: 130px;
  z-index: 200;
  overflow: hidden;
}
.cast-post-menu-dropdown.open {
  display: block;
}
.cast-post-menu-item {
  display: block;
}
/* 削除フォームをメニュー内に馴染ませる */
.cast-post-menu-item .cast-delete-form,
.cast-post-menu-item .member-delete-form {
  display: block !important;
  margin: 0 !important;
}
.cast-post-menu-item .cast-delete-form button[type="submit"],
.cast-post-menu-item .member-delete-form button[type="submit"] {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  border: none;
  background: none;
  font-size: 13px;
  color: #e74c3c;
  cursor: pointer;
  font-weight: 700;
  border-radius: 0;
}
.cast-post-menu-item .cast-delete-form button[type="submit"]:hover,
.cast-post-menu-item .member-delete-form button[type="submit"]:hover {
  background: #fff5f5;
}

/* 通報ボタン */
.cast-report-btn {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  background: transparent;
  color: #bbb;
  font-size: 9px;
  cursor: pointer;
  vertical-align: middle;
  line-height: 1.6;
  transition: color .2s, border-color .2s;
}
.cast-report-btn:hover {
  color: #c0392b;
  border-color: #c0392b;
}
/* メニュー内の通報ボタンをリスト項目風に */
.cast-post-menu-item .cast-report-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  margin: 0;
  border: none;
  border-radius: 0;
  background: none;
  font-size: 11px;
  color: #a14b73;
  font-weight: 700;
  cursor: pointer;
  box-sizing: border-box;
}
.cast-post-menu-item .cast-report-btn:hover {
  background: #fff5f5;
  border: none;
}
/* community ページのメニュー項目 */
.cast-post-menu-item .community-delete,
.cast-post-menu-item .community-report-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  border: none;
  background: none;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  box-sizing: border-box;
  border-radius: 0;
}
.cast-post-menu-item .community-delete { color: #e74c3c; }
.cast-post-menu-item .community-report-btn { color: #a14b73; }
.cast-post-menu-item .community-delete:hover,
.cast-post-menu-item .community-report-btn:hover { background: #fff5f5; }

/* ---------------------------------------------------------
   LIVEバッジ・動画ページリンク（castプロフページ）
   --------------------------------------------------------- */
.cast-live-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0 4px;
}

.cast-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: #e00;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  animation: cast-live-pulse 1.4s ease-in-out infinite;
}

@keyframes cast-live-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .6; }
}

.cast-video-page-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 14px;
  background: #111;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  text-decoration: none;
  transition: background .2s;
}
.cast-video-page-link:hover {
  background: #333;
  color: #fff;
}

/* =========================================================
   cast_post 個別ページ：サイドバーを非表示（ログイン済みでも同様）
   Cocoon は body.has-sidebar .main { width:72% } で幅を制御するため
   .sidebar を隠すだけでは不十分 → .main も全幅に上書きする
   ========================================================= */
body.single-cast_post .sidebar,
body.single-cast_post #sidebar,
body.single-cast_post .sticky-sidebar,
body.single-cast_post [class*="sidebar"] {
  display: none !important;
}
body.single-cast_post .main,
body.single-cast_post #main,
body.single-cast_post #content,
body.single-cast_post .content-wrap {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
}
