/* =========================================
   SiteHub Live Panel
========================================= */

/* 右下の開くボタン */
.sh-live-toggle {
  position: fixed;
  right: 24px;
  bottom: 24px;

  width: 64px;
  height: 64px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  background: #111;
  color: #fff;

  font-size: 28px;
  line-height: 1;

  cursor: pointer;
  z-index: 9998;

  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);

  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

.sh-live-toggle:hover {
  transform: translateY(-3px);
}

/* 右側パネル本体 */
.sh-live-panel {
  position: fixed;
  top: 0;
  right: 0;

  width: 400px;
  max-width: 92vw;
  height: 100vh;

  background: #fff;
  color: #111;

  z-index: 9999;

  display: flex;
  flex-direction: column;

  box-shadow: -14px 0 40px rgba(0, 0, 0, 0.2);

  transform: translateX(105%);
  transition: transform 0.35s ease;

  overflow: hidden;
}

/* 開いた状態 */
.sh-live-panel.is-open {
  transform: translateX(0);
}

/* パネル表示中は右下ボタンを少し隠す */
.sh-live-panel.is-open + .sh-live-toggle {
  opacity: 0;
  pointer-events: none;
}

/* ヘッダー */
.sh-live-panel__header {
  min-height: 48px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 16px;

  border-bottom: 1px solid #e8e8e8;
}

.sh-live-panel__header h3 {
  margin: 0;

  font-size: 16px;
  font-weight: 700;
}

/* 閉じるボタン */
.sh-live-close {
  width: 40px;
  height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 0;
  background: transparent;
  color: #222;

  font-size: 28px;
  line-height: 1;

  cursor: pointer;
}

/* タブ */
.sh-live-panel__tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);

  padding: 0 20px;

  border-bottom: 1px solid #e8e8e8;
}

.sh-live-panel__tabs button {
  position: relative;

  padding: 18px 8px 14px;

  border: 0;
  background: transparent;
  color: #777;

  font-size: 14px;
  font-weight: 600;

  cursor: pointer;
}

.sh-live-panel__tabs button.is-active {
  color: #111;
}

.sh-live-panel__tabs button.is-active::after {
  content: "";

  position: absolute;
  left: 15%;
  right: 15%;
  bottom: 0;

  height: 3px;

  border-radius: 999px;
  background: #2271b1;
}

/* 本文 */
.sh-live-panel__body {
  flex: 1;

  padding: 24px;

  overflow-y: auto;
  background: #fff;
}

.sh-live-comments {
  min-height: 200px;
}

/* スマホ */
@media (max-width: 767px) {
  .sh-live-toggle {
    right: 16px;
    bottom: 16px;

    width: 58px;
    height: 58px;
  }

  .sh-live-panel {
    top: auto;
    right: 0;
    bottom: 0;

    width: 100%;
    max-width: none;
    height: 78vh;

    border-radius: 20px 20px 0 0;

    transform: translateY(105%);
  }

  .sh-live-panel.is-open {
    transform: translateY(0);
  }
}

/* =========================================
   Live Panel コメント一覧
========================================= */

.sh-live-comments {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.sh-live-comment {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.sh-live-comment__avatar {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  background: #e8f2ff;
  color: #1769aa;

  font-size: 15px;
  font-weight: 700;
}

.sh-live-comment__content {
  flex: 1;
  min-width: 0;
}

.sh-live-comment__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.sh-live-comment__meta strong {
  color: #111;
  font-size: 14px;
  font-weight: 700;
}

.sh-live-comment__meta span {
  color: #999;
  font-size: 12px;
}

.sh-live-comment__content p {
  margin: 0;
  color: #222;
  font-size: 15px;
  line-height: 1.6;
}

body.admin-bar .sh-live-panel {
  top: 32px;
  height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
  body.admin-bar .sh-live-panel {
    top: 46px;
    height: calc(100vh - 46px);
  }
}

/* パネル全体 */
.sh-live-panel{
    display:flex;
    flex-direction:column;
}

/* コメント一覧 */
.sh-live-panel__body{
    flex:1;
    overflow-y:auto;
}

/* 入力欄 */
.sh-live-panel__footer{

    padding:16px;
    border-top:1px solid #eee;
    background:#fff;

    flex-shrink:0;
}

#sitehub-danmaku-form-live{

    display:flex;
    gap:10px;
}

#sitehub-danmaku-input-live{

    flex:1;
    height:42px;
}

#sitehub-danmaku-submit-live{

    width:72px;
}

.sh-live-comment--mine {
  padding: 12px;
  border-radius: 12px;
  background: #f2f8ff;
}

.sh-live-comment--mine .sh-live-comment__avatar {
  background: #2271b1;
  color: #fff;
}

/* ===============================
   Live Stats
=============================== */

.sh-live-panel__stats{

    display:flex;
    justify-content:space-around;

    padding:8px 16px;

    border-bottom:1px solid #eee;

    background:#fff;
}

.sh-live-stat{

    display:flex;
    align-items:center;

    gap:6px;
}

.sh-live-stat__icon{

    font-size:17px;
}

.sh-live-stat small{

    display:block;

    color:#888;

    font-size:9px;
}

.sh-live-stat strong{

    display:block;

    margin-top:1px;

    font-size:15px;

    font-weight:700;

    color:#111;
}

/* ===============================
   Live Panel 開閉ボタンの件数
=============================== */

.sh-live-toggle {
  flex-direction: column;
  gap: 1px;
}

.sh-live-toggle__icon {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.sh-live-toggle__count {
  display: block;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

/* ==========================
   Photo
========================== */

.sh-live-photo-grid{

    display:grid;

    grid-template-columns:repeat(2,1fr);

    gap:12px;

}

.sh-live-photo{

    aspect-ratio:1;

    background:#f4f4f4;

    border-radius:12px;

    display:flex;

    align-items:center;

    justify-content:center;

    font-size:40px;

    cursor:pointer;

    transition:.25s;
}

.sh-live-photo:hover{

    transform:scale(1.03);

}

/*==========================
Lightbox
==========================*/

.sh-live-lightbox{

    position:fixed;

    inset:0;

    background:rgba(0,0,0,.85);

    display:none;

    align-items:center;

    justify-content:center;

    z-index:99999;

}

.sh-live-lightbox img{

    max-width:90%;

    max-height:90%;

    border-radius:12px;

}

.sh-live-lightbox__close{

    position:absolute;

    top:25px;

    right:30px;

    color:#fff;

    font-size:36px;

    cursor:pointer;

}

/*=========================
Photo Upload
==========================*/

.sh-live-photo-upload{

    margin-bottom:20px;

}

.sh-live-photo-upload__button{

    display:inline-flex;

    align-items:center;

    justify-content:center;

    padding:12px 18px;

    background:#2271b1;

    color:#fff;

    border-radius:10px;

    cursor:pointer;

    font-weight:600;

    transition:.25s;

}

.sh-live-photo-upload__button:hover{

    background:#135e96;

}

.sh-live-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.sh-live-photo {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 6px;
  cursor: pointer;
}

.sh-live-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sh-live-photo{
    aspect-ratio:1/1;
    overflow:hidden;
    border-radius:12px;
}

.sh-live-photo img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.sh-live-panel__body{
    overflow-y:auto;
    overflow-x:hidden;
}

.sh-live-panel__tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
  padding: 0 20px;
  border-bottom: 1px solid #e8e8e8;
}

.sh-live-panel__tabs button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 52px;
  padding: 0 8px;

  border: 0;
  background: transparent;
  color: #777;

  font-size: 14px;
  font-weight: 600;
  line-height: 1;

  cursor: pointer;
}

.sh-live-panel__tabs button.is-active {
  color: #111;
}

.sh-live-panel__tabs button.is-active::after {
  content: "";
  position: absolute;

  left: 20%;
  right: 20%;
  bottom: 0;

  height: 3px;
  border-radius: 999px;
  background: #2271b1;
}

/* Back to TOP */
#page-top,
.pagetop,
.back-to-top{
    right: 24px;
    bottom: 110px;   /* 今より上へ */
    z-index: 900;
}

/* Live Panel */
.sh-live-toggle{
    right: 24px;
    bottom: 24px;
    z-index: 1000;
}

body:has(.sh-live-toggle) #page-top{
    bottom:110px;
}

/* Live Panel表示時のBack to Top位置調整 */
.sh-live-toggle ~ #backToTop,
body #backToTop {
  right: 24px !important;
  bottom: 105px !important;
}

/* ========================================
   LIVE PANEL 新着コメント
======================================== */

.sh-live-comment--new {
  animation: shLiveCommentIn 0.45s ease-out both;
}

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

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

.sh-hitos__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 9px 14px;

  border: 1px solid #222;
  border-radius: 999px;

  background: #fff;
  color: #111;

  font-size: 13px;
  font-weight: 700;

  cursor: pointer;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.sh-hitos__action:hover {
  background: #111;
  color: #fff;
  transform: translateY(-1px);
}

/* ========================================
   人OS 会話吹き出し
======================================== */

.sh-hitos__exchange {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}


/* 共通 */
.sh-hitos__message {
  max-width: 88%;
}

.sh-hitos__message strong {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  opacity: 0.65;
}

.sh-hitos__message p {
  margin: 0;
  padding: 11px 14px;

  border-radius: 16px;

  font-size: 14px;
  line-height: 1.7;
}


/* ==============================
   ユーザー
============================== */

.sh-hitos__message--user {
  align-self: flex-end;
  text-align: right;
}

.sh-hitos__message--user p {
  background: #222;
  color: #fff;

  border-bottom-right-radius: 4px;

  text-align: left;
}


/* ==============================
   人OS
============================== */

.sh-hitos__message--ai {
  align-self: flex-start;
}

.sh-hitos__message--ai p {
  background: #f2f3f5;
  color: #111;

  border-bottom-left-radius: 4px;
}

/* 人OS：考え中 */
.sh-hitos__character[data-state="thinking"] .sh-hitos__avatar {
  animation: shHitosThinking 0.8s ease-in-out infinite alternate;
}

@keyframes shHitosThinking {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-4px);
  }
}


/* 人OS：回答中 */
.sh-hitos__character[data-state="answering"] .sh-hitos__avatar {
  animation: shHitosAnswering 0.35s ease-in-out infinite alternate;
}

@keyframes shHitosAnswering {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.05);
  }
}

.sh-hitos__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

/* ========================================
   AIキャラクター
======================================== */

.sh-hitos__avatar {
  width: 84px;
  height: 84px;
  flex: 0 0 84px;
}

.sh-hitos__avatar-image {
  width: 84px;
  height: 84px;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  display: block;
}

/* ========================================
   AIキャラクター：通常
======================================== */

.sh-hitos__character {
  transition: all 0.3s ease;
}

.sh-hitos__avatar {
  width: 84px;
  height: 84px;
  transition: all 0.3s ease;
}

.sh-hitos__avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  display: block;
}


/* ========================================
   AIキャラクター：会話開始後
======================================== */

.sh-hitos__character.is-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.sh-hitos__character.is-compact .sh-hitos__avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}

.sh-hitos__character.is-compact .sh-hitos__status {
  font-size: 11px;
}

/* ========================================
   LIVE PANEL
   コメント一覧 コンパクト1行表示
======================================== */

/* コメント一覧全体 */
.sh-live-comments {
  padding: 6px 14px 8px !important;
}


/* コメント1件 */
.sh-live-comment {
  display: flex !important;
  align-items: center !important;

  gap: 8px !important;

  width: 100%;
  min-height: 34px !important;

  margin: 0 !important;
  padding: 5px 4px !important;

  box-sizing: border-box;

  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}


/* ========================================
   アバター
======================================== */

.sh-live-comment__avatar {
  width: 26px !important;
  height: 26px !important;

  flex: 0 0 26px !important;

  display: flex;
  align-items: center;
  justify-content: center;

  margin: 0 !important;

  border-radius: 50%;

  font-size: 10px !important;
  line-height: 1 !important;
}


/* ========================================
   投稿者・時間・コメントを横1列
======================================== */

.sh-live-comment__content {
  display: flex !important;
  align-items: center !important;

  flex: 1;
  min-width: 0;

  gap: 7px !important;

  margin: 0 !important;
  padding: 0 !important;
}


/* 投稿者＋時間 */
.sh-live-comment__meta {
  display: flex !important;
  align-items: center !important;

  flex: 0 0 auto;

  gap: 5px !important;

  margin: 0 !important;
  padding: 0 !important;
}


/* 投稿者名 */
.sh-live-comment__meta strong {
  margin: 0 !important;

  font-size: 11px !important;
  line-height: 1.2 !important;
  font-weight: 700;

  white-space: nowrap;
}


/* 投稿日時 */
.sh-live-comment__meta span {
  margin: 0 !important;

  font-size: 9px !important;
  line-height: 1.2 !important;

  white-space: nowrap;

  opacity: 0.5;
}


/* ========================================
   コメント本文
======================================== */

.sh-live-comment__content p {
  flex: 1;
  min-width: 0;

  margin: 0 !important;
  padding: 0 !important;

  font-size: 11px !important;
  line-height: 1.35 !important;

  /* 長文は最大2行 */
  white-space: normal;
  overflow: hidden;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}


/* コメント同士の余白をなくす */
.sh-live-comment + .sh-live-comment {
  margin-top: 0 !important;
}

/* ========================================
   LIVE PANEL
   Tablet / Mobile = Hero直下
======================================== */

@media (max-width: 767px) {

  .sh-live-panel,
  body.admin-bar .sh-live-panel {

    position: relative !important;

    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;

    width: 100% !important;
    max-width: 100% !important;

    height: auto !important;
    max-height: none !important;

    transform: none !important;

    border-radius: 0 !important;

    box-shadow: none !important;

    display: flex !important;

    z-index: 1 !important;
  }

  /* 閉じる必要なし */
  .sh-live-close {
    display: none !important;
  }

  /* 右下のLIVEボタンも非表示 */
  .sh-live-toggle {
    display: none !important;
  }

  /* コメント領域 */
  .sh-live-panel__body {
    height: 190px !important;
    max-height: 190px !important;

    overflow-y: auto !important;
  }

  /* 入力欄 */
  .sh-live-panel__footer {
    position: relative !important;
    bottom: auto !important;
  }

}

.sh-comment-note {
    margin: 6px 0 0;
    font-size: 11px;
    line-height: 1.5;
    color: #888;
    text-align: center;
}

/* ========================================================
   SiteHub LIVE PANEL
   Mobile Tab Layout - TEST
   コメント / 写真 / AI 共通表示領域
   ======================================================== */

@media (max-width: 767px) {

  /* ----------------------------------------
     LIVE PANEL全体
     ---------------------------------------- */

  .sh-live-panel {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  /* ----------------------------------------
     3タブ共通の表示領域
     コメント / 写真 / AI はここで切り替える
     ---------------------------------------- */

  .sh-live-panel__body {
    height: 220px !important;
    min-height: 220px !important;
    max-height: 220px !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;

    box-sizing: border-box;

    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  /* コメント単体には高さを持たせない */
  .sh-live-comments {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    overflow: visible !important;

    padding: 8px 14px !important;
    gap: 8px !important;
  }

  /* コメント1件 */
  .sh-live-comment {
    flex-shrink: 0;
    margin: 0 !important;
    padding: 6px 0 !important;
  }


  /* ----------------------------------------
     写真
     共通BODYの高さに従う
     ---------------------------------------- */

  .sh-live-photos {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }


  /* ----------------------------------------
     AI / 人OS
     共通BODYの高さに従う
     ---------------------------------------- */

  .sh-live-hitos {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }


  /* ========================================
     FOOTER
     ======================================== */

  .sh-live-panel__footer {
    position: relative !important;
    bottom: auto !important;

    width: 100%;
    box-sizing: border-box;

    padding: 5px 8px !important;

    border-top: 1px solid #e8e8e8;
    background: #fff;

    z-index: 20;
  }


  /* ========================================
     コメント入力
     ======================================== */

  #sitehub-danmaku-form-live {
    display: flex;
    align-items: center;
    gap: 6px;

    width: 100%;
    margin: 0 !important;
  }

  #sitehub-danmaku-input-live {
    flex: 1 1 auto !important;
    min-width: 0 !important;

    height: 38px !important;
    min-height: 38px !important;

    margin: 0 !important;
    padding: 0 11px !important;

    border: 0 !important;
    border-radius: 7px !important;

    background: #f3f3f3 !important;

    font-size: 16px !important;
    line-height: 38px !important;

    box-shadow: none !important;
    outline: none !important;
  }

  #sitehub-danmaku-submit-live {
    flex: 0 0 auto !important;

    width: auto !important;
    height: 38px !important;
    min-height: 38px !important;

    margin: 0 !important;
    padding: 0 12px !important;

    border-radius: 7px !important;

    font-size: 13px !important;
    line-height: 38px !important;
  }


  /* ----------------------------------------
     スマホではコメント注意書きを隠す
     ---------------------------------------- */

  @media (max-width: 767px) {
      .sh-live-panel .sh-comment-note {
          display: none !important;
          visibility: hidden !important;
          height: 0 !important;
          margin: 0 !important;
          padding: 0 !important;
          overflow: hidden !important;
      }
  }
}

/* ========================================
   LIVE PANEL
   スマホ表示：コンパクト化
   ======================================== */

@media (max-width: 767px) {

  /* ========================================
     通常時・ミニライブ共通
     ======================================== */

  /* 閲覧中・コメント数 */
  .sh-live-panel .sh-live-panel__stats {
    padding: 0 2px !important;
    gap: 4px !important;
  }

  /* 「閲覧中」「コメント」 */
  .sh-live-panel .sh-live-panel__stats small {
    font-size: 7px !important;
    line-height: 1 !important;
    margin: 0 !important;
  }

  /* 「1人」「75件」 */
  .sh-live-panel .sh-live-panel__stats strong {
    font-size: 11px !important;
    line-height: 1 !important;
    margin: 0 !important;
  }

  /* 👁 💬 アイコン */
  .sh-live-panel .sh-live-panel__stats .sh-live-stat__icon {
    font-size: 10px !important;
    line-height: 1 !important;
  }

  /* 各カウンター */
  .sh-live-panel .sh-live-stat {
    gap: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
  }


  /* ========================================
     コメント一覧上部の余白
     通常時・ミニライブ共通
     ======================================== */

  .sh-live-panel .sh-live-panel__body {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  .sh-live-panel .sh-live-comments {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  .sh-live-panel .sh-live-comment:first-child {
    margin-top: 0 !important;
  }


  /* ========================================
     キーボード表示中
     上部UIをさらに圧縮
     ======================================== */

  /* LIVE PANEL ヘッダー */
  .sh-video-hero.is-keyboard-open ~ .sh-live-panel
  .sh-live-panel__header {
    min-height: 30px !important;
    height: 30px !important;
    padding: 0 8px !important;
  }

  /* LIVE PANEL タイトル */
  .sh-video-hero.is-keyboard-open ~ .sh-live-panel
  .sh-live-panel__header h3 {
    margin: 0 !important;
    font-size: 13px !important;
    line-height: 1 !important;
  }

  /* 閲覧中・コメント数エリア */
  .sh-video-hero.is-keyboard-open ~ .sh-live-panel
  .sh-live-panel__stats {
    min-height: 30px !important;
    height: 30px !important;
  }


  /* ========================================
     コメント / 写真 / AI
     ======================================== */

  .sh-video-hero.is-keyboard-open ~ .sh-live-panel
  .sh-live-panel__tabs {
    min-height: 30px !important;
    height: 30px !important;
  }

  .sh-video-hero.is-keyboard-open ~ .sh-live-panel
  .sh-live-panel__tabs button {
    min-height: 30px !important;
    height: 30px !important;
    padding: 0 4px !important;

    font-size: 12px !important;
    line-height: 30px !important;
  }


  /* ========================================
     コメント一覧
     キーボード表示中だけコンパクト化
     ======================================== */

  /* コメント1件 */
  .sh-video-hero.is-keyboard-open ~ .sh-live-panel
  .sh-live-comment {
    min-height: 34px !important;
    padding: 4px 8px !important;
    gap: 6px !important;
  }

  /* 丸いアイコン */
  .sh-video-hero.is-keyboard-open ~ .sh-live-panel
  .sh-live-comment__avatar {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;

    font-size: 10px !important;
    line-height: 24px !important;
  }

  /* コメント本文側 */
  .sh-video-hero.is-keyboard-open ~ .sh-live-panel
  .sh-live-comment__content {
    min-width: 0 !important;
  }

  /* 名前・時間 */
  .sh-video-hero.is-keyboard-open ~ .sh-live-panel
  .sh-live-comment__meta {
    gap: 4px !important;
    margin: 0 !important;
    line-height: 1 !important;
  }

  .sh-video-hero.is-keyboard-open ~ .sh-live-panel
  .sh-live-comment__meta strong {
    font-size: 11px !important;
    line-height: 1.2 !important;
  }

  .sh-video-hero.is-keyboard-open ~ .sh-live-panel
  .sh-live-comment__meta span {
    font-size: 8px !important;
    line-height: 1.2 !important;
  }

  /* コメント本文 */
  .sh-video-hero.is-keyboard-open ~ .sh-live-panel
  .sh-live-comment__content p {
    margin: 1px 0 0 !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
  }

}


/* ========================================
   LIVE PANEL
   写真投稿ボタン
   ======================================== */

.sh-live-photo-upload {
  padding: 14px 16px 10px;
}

.sh-live-photo-upload__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  min-height: 38px;
  padding: 0 16px;

  background: #fff;
  color: #222;

  border: 1px solid #d9dde3;
  border-radius: 999px;

  font-size: 13px;
  font-weight: 600;
  line-height: 1;

  cursor: pointer;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.sh-live-photo-upload__button:hover {
  background: #f6f8fa;
  border-color: #c8cdd4;
}

.sh-live-photo-upload__button:active {
  transform: scale(0.97);
}

/* ＋ */
.sh-live-photo-upload__icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 20px;
  height: 20px;

  background: #eef6ff;
  border-radius: 50%;

  font-size: 16px;
  font-weight: 400;
  line-height: 1;
}

/* メッセージ */
.sh-live-photo-upload__message {
  margin-top: 7px;

  font-size: 11px;
  color: #777;
}


/* スマホ */
@media (max-width: 767px) {

  .sh-live-photo-upload {
    padding: 10px 12px 8px;
  }

  .sh-live-photo-upload__button {
    min-height: 34px;
    padding: 0 13px;

    font-size: 12px;
  }

  .sh-live-photo-upload__icon {
    width: 18px;
    height: 18px;

    font-size: 14px;
  }

}

/* ========================================
   LIVE PANEL
   写真0枚：Empty State
   ======================================== */

.sh-live-photo-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  min-height: 300px;
  padding: 30px 20px;

  text-align: center;
  box-sizing: border-box;
}

.sh-live-photo-empty__icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 52px;
  height: 52px;
  margin: 0 0 14px;

  background: #f2f7fc;
  border-radius: 50%;

  font-size: 21px;
  line-height: 1;
}

.sh-live-photo-empty__title {
  display: block;

  margin: 0 0 6px;

  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;

  color: #222;
}

.sh-live-photo-empty__text {
  margin: 0 0 16px;

  font-size: 12px;
  line-height: 1.5;

  color: #888;
}

/* Empty State内の投稿ボタン */
.sh-live-photo-empty .sh-live-photo-upload__button {
  margin: 0;
}


/* スマホ */
@media (max-width: 767px) {

  .sh-live-photo-empty {
    min-height: 230px;
    padding: 24px 16px;
  }

  .sh-live-photo-empty__icon {
    width: 46px;
    height: 46px;
    margin-bottom: 12px;

    font-size: 18px;
  }

  .sh-live-photo-empty__title {
    font-size: 13px;
  }

  .sh-live-photo-empty__text {
    margin-bottom: 14px;
    font-size: 11px;
  }

}

.sh-live-photo-empty {
  width: 100%;
  max-width: none;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  min-height: 300px;
  padding: 30px 20px;

  text-align: center;
  box-sizing: border-box;
}
.sh-live-photo-empty__title,
.sh-live-photo-empty__text,
.sh-live-photo-empty .sh-live-photo-upload__button {
  width: auto;
  max-width: none;
  white-space: nowrap;
  flex-shrink: 0;
}
/* 写真0枚：Empty State */
.sh-live-photos__empty {
  margin: 0 !important;
  padding: 32px 20px 20px !important;
}
.sh-live-photo-empty {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  min-height: 0;
  text-align: center;
  box-sizing: border-box;

  padding: 32px 20px 20px;
}

/* ========================================
   LIVE PANEL - Photo Grid
======================================== */

.sh-live-photos {
  padding: 18px 16px 24px;
}

/* 投稿ボタン */
.sh-live-photo-upload__button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}

/* 写真一覧 */
.sh-live-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  width: 100%;
}

/* 写真1枚 */
.sh-live-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 6px;
  background: #f3f4f6;
}

/* 写真本体 */
.sh-live-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========================================
   Mobile：コメント入力モード
======================================== */

@media (max-width: 767px) {

  /*
   * 入力中は余計なUIを隠す
   */
  body.sh-live-comment-focus .sh-live-panel__header,
  body.sh-live-comment-focus .sh-live-panel__tabs {
    display: none !important;
  }

  /*
   * LIVE PANELは通常のスマホ設定を維持
   * 高さは無理に変更しない
   */
  body.sh-live-comment-focus .sh-live-panel {
    display: flex !important;
    flex-direction: column !important;
  }

  /*
   * 空いている領域はコメント一覧へ
   */
  body.sh-live-comment-focus .sh-live-panel__body {
      flex: 0 1 auto !important;

      height: auto !important;
      min-height: 0 !important;
      max-height: none !important;

      overflow-y: auto !important;
      -webkit-overflow-scrolling: touch;
  }

  /*
   * Footerはコメント一覧の直後
   */
  body.sh-live-comment-focus .sh-live-panel__footer {
    position: relative !important;

    flex: 0 0 auto !important;

    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;

    margin: 0 !important;

    background: #fff !important;
    z-index: 10 !important;
  }

  /*
   * 入力欄を見やすく
   */
  body.sh-live-comment-focus
  #sitehub-danmaku-input-live {
    font-size: 16px !important;
  }

}