/* ----------------
✅ 共通ユーティリティ 
-------------------- */
.hidden {
  display: none !important;
}

/* チャット内のVRMキャンバス（親: .chat-character） */
#vrm-avatar {
  position: relative;
}
#vrm-avatar canvas {
  width: 100vw;
  height: 100vh;
  display: block;
}



/* -------------------
✅ 起動バナー
----------------------- */
#chat-toggle-button {
  position: fixed;
  bottom: -2%;
  left: 40%;
  cursor: pointer;
  z-index: 9999;
}

/* closeボタン */
#chat-launch-close {
  position: absolute;
  right: 47.5%;
  bottom: 16%;
  background: #402a30;
  color: #fcf9f7;
  border: none;
  border-radius: 5px;
  font-size: 8px;
  font-weight: bold;
  padding: 14px 1px;
  line-height: 14px;
  text-align: center;
  cursor: pointer;
  writing-mode: vertical-rl;
  font-style: italic;
  opacity: 0.7;
}

/* 吹き出しスタイル */
.fukidashi-02-03 {
  position: absolute;
  left: 50%;
  bottom: 78%;
  transform: translateX(-50%) scaleX(-1);
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border: 1px solid #333333;
  border-radius: 50%;
  cursor: pointer;
}

.fukidashi-02-03::before {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%) rotate(135deg);
  width: 15px;
  height: 15px;
  box-sizing: border-box;
  background-color: #ffffff;
}

.fukidashi-02-03::after {
  content: "";
  position: absolute;
  top: 104%;
  left: 50%;
  transform: translateX(-50%) rotate(50deg);
  width: 16px;
  height: 1px;
  box-sizing: border-box;
  background-color: #333333;
}

.fukidashi-02-03 > .ornament {
  position: absolute;
  width: 100%;
  height: 100%;
  transform: translateX(1px) translateY(3px); /* 位置をややズラす */
  border-radius: 50%;
  background-color: #fcf9f7;
  pointer-events: none; /* クリック不可にする（下のテキストに触れるように） */
  mix-blend-mode: multiply; /* 乗算 */
}

.fukidashi-02-03 > div {
  position: relative;
  z-index: 1;
  color: #4c1c26;
  font-weight: bold;
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  transform: scaleX(-1) translateY(5px);
  letter-spacing: 1px;
}

.fukidashi-02-03 > div em {
  color: #902b43;
  font-style: normal;
  font-size: 14px;
  line-height: 24px;
}

/* -------------------------
✅ チャットボックス全体 (#chat-box)  
----------------------------- */
#chat-box {
  position: fixed;
  bottom: 10px;
  right: 10px;
  z-index: 9998;
  width: 360px;
  height: 480px;
  border-radius: 138px 10px 10px 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  background: #fff;
  font-weight: 300;
}

/* フルスクリーン状態 */
#chat-box.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  z-index: 9999;
  border-radius: 0;
}

/* 大きいバナー／画像はクリック無効化 */
#chat-toggle-button,
#chat-toggle-image { pointer-events: none; }

/* 小さな起動ボタンと × はクリック有効 */
#chat-open-hotspot,
#chat-launch-close { pointer-events: auto; }


/*---------------------------------
✅ ヘッダー（タイトル・3つのボタン・川上さん）
---------------------------------- */
#chat-box .chat-header {
  padding: 0;
  box-sizing: border-box;
}

/* 上段：右寄せボタンエリア */
#chat-box .chat-header-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0px;
}

#chat-box .chat-buttons {
  display: flex;
  gap: 2px;
  justify-content: flex-end;
  align-items: center;
}

#chat-box .chat-buttons .chat-btn {
  background: none;
  border: none;
  margin-left: 0px;
  cursor: pointer;
  padding: 8px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#chat-box.fullscreen .chat-buttons .chat-btn {
  padding: 8px 10px;
}

#chat-box .chat-buttons svg {
  width: 22px;
  height: 22px;
  transition: transform 0.2s;
}
#chat-box.fullscreen .chat-buttons svg {
  width: 25px;
  height: 25px;
  transition: transform 0.2s;
}

#chat-box .chat-buttons .chat-btn:hover svg {
  transform: scale(1.2);
}

/* 下段：画像＋説明テキスト */
#chat-box .chat-header-main {
  display: flex;
  align-items: center;
  gap: 0px;
  width: 100%;
  margin: 0 auto;
  justify-content: center;
}

#chat-box.fullscreen .chat-header-main {
  width: 80%;
  max-width: 800px;
}


#chat-box .chat-character {
  width: 44%;
    height: 125px;
}
#chat-box.fullscreen .chat-character {
  width: 42%;
  height: 225px;
}

#chat-box .chat-character video {
  width: 210px;
  height: 154px;
  object-fit: cover;
  object-position: top;
  transform: translate( -2px, -30px); 
}
#chat-box.fullscreen .chat-character video {
  width: 350px;
  height: 248px;
  object-fit: cover;
  object-position: top;
  transform: translate( 0%, -10%);
}

#chat-box .chat-description {
  width: 56%;
  text-align: center;
  padding-right: 24px;
  z-index: 100;
  transform: translateY(-8px);
}
#chat-box.fullscreen .chat-description {
  width: 56%;
  padding-right: 0px;
  transform: translateY( 0px) translateX(-32px);  
}

#chat-box .chat-label-wrapper {
  position: relative;
  display: inline-block;
  width: 90%;
  height: 42px;
}

#chat-box.fullscreen .chat-label-wrapper {
  width: 250px;
  height: 50px;
}

#chat-box .chat-label-frame {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
}

#chat-box .chat-label-text {
  position: absolute;
  top: 56%;
  left: 50%;
  transform: translate(-50%, -50%); /* 完全中央寄せ */
  font-size: 10.5px;
  color: #683037;
  white-space: nowrap;
  letter-spacing: 0px;
}

#chat-box.fullscreen .chat-label-text {
  font-size: 13.5px;
}

#chat-box .chat-description .chat-title {
  margin-top: 8px;
}
#chat-box.fullscreen .chat-description .chat-title {
  width: 94%;
  margin: 16px auto 0;
}

#chat-box .chat-description .chat-title img {
    width: 100%;
    height: auto;
}



#chat-box .chat-description .chat-subtitle {
  font-size: 10px;
  color: #6d5c61;
  margin: 2px 0 0;
  letter-spacing: 0px;
}

#chat-box.fullscreen .chat-subtitle {
  font-size: 13px;
  margin-top: 8px;
}


/* ----------------------------------------
  ✅ チャット本文エリア（バブル表示）
---------------------------------------- */
/* チャット本文エリア全体 */
#chat-box .chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px;
  background: linear-gradient(135deg, #fdeff5, #f7f4fd); /* 淡ピンク紫 */
  margin: 0;
}

/* フルスクリーン時の調整 */
#chat-box.fullscreen .chat-body {
  width: 86%;
  max-width: 850px;
  margin: 0 auto;
  padding: 40px;
}

/* 外枠ラッパー */
#chat-box .chat-body-wrapper {
  display: flex;
  justify-content: center;
  margin: 0 auto;
}

/* 白い内部ボックス */
#chat-box .chat-body-box {
  background: #fff;
  border-radius: 16px;
  padding: 6px 0 0;
  width: 100%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

#chat-box.fullscreen .chat-body-box {
  width: 92%;
  padding: 16px 0;
}

/* 以下の項目から選択する */
#chat-box .chat-intro {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #9e605f;
  font-weight: 400;
  font-size: 12px;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

#chat-box.fullscreen .chat-intro {
  font-size: 14px;
  margin-bottom: 20px;
}

#chat-box .chat-intro-icon {
  width: 24px;
  height: 24px;
}

/* ----------------------------------------
  ✅ 選択肢リスト（ボタン式）
---------------------------------------- */
/* 選択肢グリッド */
#chat-box .chat-option-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3列に変更 */
  gap: 12px;
  width: 92%;
  margin: 0 auto;
}

#chat-box.fullscreen .chat-option-grid {
  width: 82%;
  margin: 0 auto;
  max-width: 825px;
  gap: 20px;
  grid-template-columns: repeat(4, 1fr);
}

/* 各カードスタイル */
#chat-box .chat-option-card {
  background: #fff;
  border-radius: 8px;
  padding: 7px 2px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;        /* 疑似要素の基準 */
  overflow: visible;         /* 枠がはみ出しても見せる */
  z-index: 0;
}

#chat-box .chat-option-card::before{
  content: "";
  position: absolute;
  left: -3px;
  right: -3px;
  top: -3px;
  bottom: -3px;
  /* contain → cover に変更：常に枠が左右端まで届く */
  background: url("../img/chatbot/btn_back.png") center / cover no-repeat;
  z-index: 0;
  pointer-events: none;
  border-radius: 8px;
  filter: blur(2px);
}

#chat-box .chat-option-card::after{
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  border-radius: inherit;   /* カード角丸と揃える（例：10px） */
  z-index: 1;
  pointer-events: none;
}

#chat-box .chat-option-card > *{
  position: relative;
  z-index: 2;
}


#chat-box.fullscreen .chat-option-card {
  padding: 20px 10px;
  width: 82%;
  margin: 0 auto;
}
#chat-box.fullscreen .chat-option-card::before{
  content: "";
  position: absolute;
  left: -5px;
  right: -5px;
  top: -5px;
  bottom: -5px;
  /* contain → cover に変更：常に枠が左右端まで届く */
  background: url("../img/chatbot/btn_back.png") center / cover no-repeat;
  z-index: 0;
  pointer-events: none;
  border-radius: 8px;
  filter: blur(3.5px);
}

#chat-box .chat-option-card img {
  width: 34px;
  height: 34px;
  margin-bottom: 4px;
}
#chat-box.fullscreen .chat-option-card img {
  width: 36px;
  height: 36px;
  margin-bottom: 8px;
}

#chat-box .chat-option-card p {
  margin: 0;
  font-size: 10px;
  color: #4c1c26;
  font-weight: 400;
  letter-spacing: 0px;
}

#chat-box.fullscreen .chat-option-card p {
  font-size: 12.5px;
}

#chat-box .chat-option-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
}

/* ----------------------------------------
  ✅ 入力エリア（テキスト＋送信ボタン）
---------------------------------------- */
#chat-box .chat-input-area {
  background: #fff;
  border-top: 1px solid #eee;
  padding: 8px 10px;
  display: flex;
  gap: 10px;
}

#chat-box .chat-input {
  flex: 1;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 13px;
}

#chat-box .chat-send-btn {
  background: linear-gradient(to right, #f06485, #e38a79);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-weight: bold;
  cursor: pointer;
  font-size: 12px;
}

/* ----------------------------------------
  ✅ chatlog（テキスト＋送信ボタン）
---------------------------------------- */
#chat-log {
  padding: 12px 4px 0;
  overflow-y: auto;
  width: 94%;
  margin: 0 auto;
}

#chat-log.fullscreen {
  width: 82%;
  margin: 0 auto;
  max-width: 800px;
  padding: 12px 0 0;
}

/* 吹き出し共通 */
#chat-log .chat-message {
  display: flex;
  margin-bottom: 14px;
}

#chat-log .chat-message.user {
  justify-content: flex-end;
}

#chat-log .chat-message.bot {
  align-items: flex-start;
}

#chat-log .chat-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  width: 75%;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0.5px;
}
#chat-log.fullscreen .chat-bubble {
    width: 70%;
}

#chat-log .chat-bubble p {
    letter-spacing: 0px;
    font-size: 12.5px;
}

#chat-log .user-bubble {
  background: #dfe9ff;
  border-radius: 16px 16px 0 16px;
  color: #333;
  justify-content: center;
  display: flex;
  max-width: 275px;
}

#chat-log .bot-bubble {
  background: #f7f7f7;
  border-radius: 0 16px 16px 16px;
  color: #333;
}

/* アバター */
#chat-log .chat-avatar {
  width: 40px;
  height: 40px;
  margin-right: 8px;
  background: #D6ACAD;
  border-radius: 25px;
  object-fit: cover;
}

#chat-log.fullscreen .chat-avatar {
  width: 64px;
  height: 64px;
  border-radius: 100px;
  object-fit: cover;
}

/* 回答用リンクボタン */
#chat-log .link-button {
  display: block;
  margin-top: 8px;
  padding: 8px 12px;
  background: #f5ebe7;
  border: 1px solid #ddd;
  border-radius: 10px;
  color: #333;
  text-align: left;
  text-decoration: none;
  font-size: 12.5px;
  transition: background 0.2s;
  letter-spacing: 0px;
}

#chat-log.fullscreen .link-button {
  width: 400px;
}

#chat-log .link-button:hover {
  background: #f2dfd7;
}
@media (max-width: 2200px) {
  #chat-launch-close { right: 47.5%; bottom: 16%; }
}
@media (max-width: 2000px) {
  #chat-launch-close { right: 47%; bottom: 16%; }
}
@media (max-width: 1800px) {
  #chat-launch-close { right: 46.5%; bottom: 16%; }
}
@media (max-width: 1600px) {
  #chat-launch-close { right: 46%; bottom: 16%; }
}

@media (max-width: 1400px) {
  #chat-launch-close { right: 45.5%; bottom: 16%; }
}
@media (max-width: 1200px) {
  #chat-launch-close { right: 45%; bottom: 16%; }
  #chat-log.fullscreen .link-button {width: 340px;}
}
@media (max-width: 1100px) {
  #chat-launch-close { right: 44.5%; bottom: 16%; }
  
}


@media screen and (min-width:768px) and (max-width:1050px) {
   
  /* -------------------
✅ 起動バナー
----------------------- */
  #chat-toggle-button {
  position: fixed;
  bottom: -1.5%;
  left: 40.5%;
  cursor: pointer;
  z-index: 9999;
}
    
/* closeボタン */
#chat-launch-close {
  position: absolute;
  right: 44.5%;
  bottom: 16%;
  background: #402a30;
  color: #fcf9f7;
  border: none;
  border-radius: 5px;
  font-size: 8px;
  font-weight: bold;
  padding: 16px 1px;
  line-height: 14px;
  text-align: center;
  cursor: pointer;
  writing-mode: vertical-rl;
  font-style: italic;
  opacity: 0.7;
}

 /*---------------------------------
✅ ヘッダー（タイトル・3つのボタン・川上さん）
---------------------------------- */

#chat-box.fullscreen .chat-header-main {
  width: 80%;
  max-width: 700px;
}

#chat-box.fullscreen .chat-character {
  width: 42%;
  height: 182px;
}

#chat-box.fullscreen .chat-character video {
  width: 300px;
  height: 215px;
  object-fit: cover;
  object-position: top;
  transform: translate( 0%, -16%);
}

#chat-box.fullscreen .chat-description {
  width: 56%;
  padding-right: 0px;
  transform: translateY(-10px) translateX(-32px);  
}

#chat-box.fullscreen .chat-label-text {
  font-size: 14px;
}

#chat-box.fullscreen .chat-description .chat-title {
  width: 86%;
  margin: 16px auto 0;
}

#chat-box.fullscreen .chat-subtitle {
  font-size: 12px;
  margin-top: 8px;
} 

/* ----------------------------------------
  ✅ チャット本文エリア（バブル表示）
---------------------------------------- */
#chat-box.fullscreen .chat-body {
  width: 88%;
  margin: 0 auto;
  padding: 24px;
}

#chat-box.fullscreen .chat-intro {
  font-size: 13px;
  margin-bottom: 20px;
}



  /* ----------------------------------------
  ✅ chatlog（テキスト＋送信ボタン）
---------------------------------------- */
  #chat-log.fullscreen .link-button {
    width: 320px;
  }
    
  #chat-log.fullscreen .chat-bubble {
    max-width: 375px;
    width: 72%;
  }
    
  #chat-log.fullscreen .user-bubble {
    width: 40%;
  }
    
/* ----------------------------------------
  ✅ 選択肢リスト（ボタン式）
---------------------------------------- */

#chat-box.fullscreen .chat-option-grid {
  width: 88%;
  margin: 0 auto;
  gap: 16px 12px; 
  grid-template-columns: repeat(4, 1fr);
}

#chat-box.fullscreen .chat-option-card {
  padding: 18px 8px;
  width: 85%;
}

#chat-box.fullscreen .chat-option-card p {
  font-size: 11.5px;
}
    
#chat-box.fullscreen .chat-option-card::before{
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  top: -4px;
  bottom: -4px;
  /* contain → cover に変更：常に枠が左右端まで届く */
  background: url("../img/chatbot/btn_back.png") center / cover no-repeat;
  z-index: 0;
  pointer-events: none;
  border-radius: 8px;
  filter: blur(3px);
}
    
}

@media (max-width: 950px) {
  #chat-launch-close { right: 44%; bottom: 16%; }
}
@media (max-width: 850px) {
  #chat-launch-close { right: 43.5%; bottom: 16%; }
}

@media screen and (max-width: 450px) {
   
  /* -------------------
✅ 起動バナー
----------------------- */
  #chat-toggle-button {
    position: fixed;
    bottom: 14%;
    left: 39%;
    cursor: pointer;
    z-index: 9999;
  }
    
  /* 吹き出しスタイル */
  .fukidashi-02-03 {
    position: absolute;
    left: 50%;
    bottom: 58%;
    transform: translateX(-48%) scaleX(-1);
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border: 1px solid #333333;
    border-radius: 50%;
    cursor: pointer;
  }

  .fukidashi-02-03::before {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%) rotate(135deg);
    width: 8px;
    height: 8px;
    box-sizing: border-box;
    background-color: #ffffff;
  }

  .fukidashi-02-03::after {
    content: "";
    position: absolute;
    top: 104%;
    left: 50%;
    transform: translateX(-50%) rotate(50deg);
    width: 12px;
    height: 1px;
    box-sizing: border-box;
    background-color: #333333;
  }

  .fukidashi-02-03 > .ornament {
    position: absolute;
    width: 100%;
    height: 100%;
    transform: translateX(1px) translateY(1px); /* 位置をややズラす */
    border-radius: 50%;
    background-color: #fcf9f7;
    pointer-events: none; /* クリック不可にする（下のテキストに触れるように） */
    mix-blend-mode: multiply; /* 乗算 */
  }

  .fukidashi-02-03 > div {
    position: relative;
    z-index: 1;
    color: #4c1c26;
    font-weight: bold;
    font-size: 8px;
     letter-spacing: 0.5px;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    transform: scaleX(-1) translateY(4px);
  }

  .fukidashi-02-03 > div em {
    color: #902b43;;
    font-style: normal;
    font-size: 10.5px;
    line-height: 18px;
  }
}

@media screen and (min-width:451px) and (max-width:768px) {
   
  /* -------------------
✅ 起動バナー
----------------------- */
  #chat-toggle-button {
  position: fixed;
  bottom: 14%;
  left: 38.5%;
  cursor: pointer;
  z-index: 9999;
}
    
/* 吹き出しスタイル */
.fukidashi-02-03 {
  position: absolute;
  left: 50%;
  bottom: 58.5%;
  transform: translateX(-50%) scaleX(-1);
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px solid #333333;
  border-radius: 50%;
  cursor: pointer;
}

.fukidashi-02-03::before {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%) rotate(135deg);
  width: 12px;
  height: 12px;
  box-sizing: border-box;
  background-color: #ffffff;
}

.fukidashi-02-03::after {
  content: "";
  position: absolute;
  top: 105%;
  left: 50%;
  transform: translateX(-50%) rotate(50deg);
  width: 14px;
  height: 1px;
  box-sizing: border-box;
  background-color: #333333;
}

.fukidashi-02-03 > .ornament {
  position: absolute;
  width: 100%;
  height: 100%;
  transform: translateX(2px) translateY(2px); /* 位置をややズラす */
  border-radius: 50%;
  background-color: #fcf9f7;
  pointer-events: none; /* クリック不可にする（下のテキストに触れるように） */
  mix-blend-mode: multiply; /* 乗算 */
}

.fukidashi-02-03 > div {
  position: relative;
  z-index: 1;
  color: #4c1c26;
  font-weight: bold;
  font-size: 9px;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  transform: scaleX(-1) translateY(4px);
}

.fukidashi-02-03 > div em {
  color: #902b43;
  font-style: normal;
  font-size: 12px;
  line-height: 20px;
}


 /*---------------------------------
✅ ヘッダー（タイトル・3つのボタン・川上さん）
---------------------------------- */


#chat-box.fullscreen .chat-header-main {
  width: 88%;
  max-width: 480px;
}

#chat-box.fullscreen .chat-character {
  width: 42%;
  height: 178px;
}

#chat-box.fullscreen .chat-character video {
  width: 260px;
  height: 210px;
  object-fit: cover;
  object-position: top;
  transform: translate( -14%, -16%);
}

#chat-box.fullscreen .chat-description {
  width: 52%;
  padding-right: 0px;
  transform: translateY(-6px);  
}

#chat-box.fullscreen .chat-label-text {
  font-size: 14px;
}

#chat-box.fullscreen .chat-description .chat-title {
  width: 100%;
  margin: 10px auto 0;
}

#chat-box.fullscreen .chat-subtitle {
  font-size: 11.5px;
  margin-top: 4px;
} 

#chat-box.fullscreen .chat-label-wrapper {
  width: 82%;
  height: 48px;
  min-width: 200px;
}

/* ----------------------------------------
  ✅ チャット本文エリア（バブル表示）
---------------------------------------- */
#chat-box.fullscreen .chat-body {
  width: 90%;
  margin: 0 auto;
  padding: 24px;
}

#chat-box.fullscreen .chat-intro {
  font-size: 13px;
  margin-bottom: 16px;
}
    
#chat-box.fullscreen .chat-body-box {
  width: 100%;
  padding: 12px 0;
}

  /* ----------------------------------------
  ✅ chatlog（テキスト＋送信ボタン）
---------------------------------------- */
  #chat-log.fullscreen .link-button {
    max-width: 300px;
    width: 86%;
  }
    
  #chat-log.fullscreen .chat-bubble {
    max-width: 375px;
    width: 72%;
  }
    
  #chat-log.fullscreen .user-bubble {
    width: 40%;
  }
    
 #chat-log {
  padding: 16px 4px 0;
  overflow-y: auto;
  width: 92%;
  margin: 0 auto;
}
    
#chat-log.fullscreen {
  width: 90%;
  margin: 0 auto;
  padding: 12px 0 0;
}

    
/* ----------------------------------------
  ✅ 選択肢リスト（ボタン式）
---------------------------------------- */

#chat-box.fullscreen .chat-option-card {
  padding: 14px 2px;
  width: 90%;
}

#chat-box.fullscreen .chat-option-card p {
  font-size: 11px;
}

 #chat-box.fullscreen .chat-option-grid {
  width: 90%;
  margin: 0 auto;
  gap: 16px 14px;
  grid-template-columns: repeat(3, 1fr);
} 

}

@media screen and (max-width:768px) {
/* closeボタン */
#chat-launch-close {
  position: absolute;
  right: 44%;
  bottom: 15%;
  background: #402a30;
  color: #fcf9f7;
  border: none;
  border-radius: 5px;
  font-size: 6px;
  font-weight: bold;
  padding: 12px 1px;
  line-height: 12px;
  text-align: center;
  cursor: pointer;
  writing-mode: vertical-rl;
  font-style: italic;
  opacity: 0.7;
}
}

@media screen and (max-width:600px) {
 
  
    
#chat-open-hotspot{
  position: absolute;
  left: 50%;              /* 中央配置 */
  bottom: 52%;            /* キャラクターの頭の上に配置 */
  transform: translateX(-50%); /* 中央揃え */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px 6px;
  max-width: 220px;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,.12);
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  border-radius: 100px;     /* 吹き出し本体の角丸 */
  cursor: pointer;
  pointer-events: auto;     /* ← ここだけクリック可 */
}

#chat-open-hotspot .hotspot-label{
  color: #4c1c26;
  font-weight: bold;
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
}

#chat-open-hotspot .hotspot-label em{
  font-style: normal;
  color: #902b43;
  font-size: 13px;
}

/* しっぽ（三角形） */
#chat-open-hotspot:after{
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-style: solid;
  border-width: 8px 6px 0 6px; /* 上 右 下 左 */
  border-color: #ffffff transparent transparent transparent;
  filter: drop-shadow(1px 1px 1px rgba(0,0,0,.12));
}
    
#chat-launch-close { right: 43%; bottom: 15%; }
    
}

@media (max-width: 550px) {
  #chat-launch-close { right: 41.5%; bottom: 15%; }
  #chat-toggle-button {
  position: fixed;
  bottom: 14%;
  left: 38%;
  cursor: pointer;
  z-index: 9999;
}
}


@media screen and (max-width:450px) {
    
  /* フルスクリーンモードにする */
  #chat-box {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }
  /* 小窓表示ボタンを非表示 */
  #chat-box .chat-buttons .chat-fullscreen-btn {
    display: none;
  }
 
/* -------------------
✅ 起動バナー
----------------------- */
#chat-toggle-button {
  position: fixed;
  bottom: 8%;
  left: 37.5%;
  cursor: pointer;
  z-index: 9999;
}

#chat-launch-close { right: 40%; bottom: 15%; }
    
  /* -------------------------------
✅ ヘッダー（タイトル・3つのボタン・川上さん）
----------------- --------------- */
  #chat-box.fullscreen .chat-header {
    padding: 4px 0 0;
    box-sizing: border-box;
  }
    
  #chat-box.fullscreen .chat-header-main {
    width: 90%;
  }
    
  #chat-box.fullscreen .chat-label-wrapper {
    width: 88%;
    height: 46px;
    max-width: 200px;
  }
    
  #chat-box.fullscreen .chat-label-text {
    font-size: 12px;
  }
    
#chat-box.fullscreen .chat-description {
  width: 56%;
  text-align: center;
  padding-right: 0px;
  z-index: 100;
  transform: translateY(-10px);
}
    
  #chat-box.fullscreen .chat-description .chat-title {
    font-size: 28px;
    margin-top: 8px;
  }

    
    
  #chat-box.fullscreen .chat-subtitle {
    font-size: 11.5px;
    margin-top: 0px;
  }
    
  #chat-box.fullscreen .chat-character {
  width: 40%;
  height: 155px;
}
    
  #chat-box.fullscreen .chat-character video {
  width: 230px;
  height: 185px;
  object-fit: cover;
  object-position: top;
  transform: translate(-16%, -18%);
}
    
#chat-box.fullscreen .chat-buttons svg {
  width: 22px;
  height: 22px;
  transition: transform 0.2s;
}
    
#chat-box.fullscreen .chat-buttons .chat-btn {
  padding: 8px 10px 8px 0;
}

    
  /* ----------------------------------------
  ✅ チャット本文エリア（バブル表示）
---------------------------------------- */
    
  #chat-box.fullscreen .chat-description .chat-title {
  width: 100%;
  margin: 4px auto 0;
}
    
  #chat-box.fullscreen .chat-body {
    width: 100%;
    margin: 0 auto;
    padding: 20px 0;
    margin-top: 0px;
  }
    
  /* 白い内部ボックス */
  #chat-box.fullscreen .chat-body-box {
    width: 94%;
    padding: 10px 0 0;
  }
    
  /* 以下の項目から選択する */
  #chat-box.fullscreen .chat-intro {
    font-size: 13px;
    margin-bottom: 16px;
  }
    
    #chat-log.fullscreen .chat-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  width: 70%;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0.5px;
}

  #chat-log {
  padding: 16px 4px 0;
  overflow-y: auto;
  width: 92%;
  margin: 0 auto;
}
    
  /* ----------------------------------------
  ✅ 選択肢リスト（ボタン式）
---------------------------------------- */
  #chat-box.fullscreen .chat-option-grid {
    width: 95%;
    margin: 0 auto;
    gap: 12px;
  }
    
  /* 各カードスタイル */
  #chat-box.fullscreen .chat-option-card {
    padding: 14px 1px;
    width: 92%;
  }
    
  #chat-box.fullscreen .chat-option-card p {
    font-size: 10.5px;
  }

    #chat-box.fullscreen .chat-option-grid {
  width: 94%;
  margin: 0 auto;
  gap: 16px 10px;
  grid-template-columns: repeat(3, 1fr);
} 
    
  #chat-box.fullscreen .chat-option-card::before{
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  top: -4px;
  bottom: -4px;
  /* contain → cover に変更：常に枠が左右端まで届く */
  background: url("../img/chatbot/btn_back.png") center / cover no-repeat;
  z-index: 0;
  pointer-events: none;
  border-radius: 8px;
  filter: blur(2.5px);
}
    
#chat-box.fullscreen .chat-option-card img {
  width: 34px;
  height: 34px;
  margin-bottom: 6px;
}
    
  /* ----------------------------------------
  ✅ chatlog（テキスト＋送信ボタン）
---------------------------------------- */
  #chat-log.fullscreen {
    width: 90%;
    margin: 0 auto;
  }
    
  #chat-log.fullscreen .link-button {
    width: 80%;
  }
    
  #chat-log.fullscreen .chat-bubble {
    max-width: 375px;
    width: 72%;
  }
    
  #chat-log.fullscreen .user-bubble {
    width: 56%;
  }
    
  /* アバター */
  #chat-log .chat-avatar {
    width: 45px;
    height: 45px;
    margin-right: 8px;
    background: #D6ACAD;
    border-radius: 25px;
  }
    
}

@media (max-width: 400px) {
  #chat-launch-close { right: 40%; bottom: 15%; }
}
@media (max-width: 375px) {
  #chat-launch-close { right: 40%; bottom: 15%; }
}


/* ----------------------------------------
✅ 考え中表示（...）
---------------------------------------- */
.thinking-message {
  opacity: 0.8;
}

.thinking-bubble {
  background: #f0f0f0 !important;
  border: 1px solid #e0e0e0 !important;
}

.thinking-dots {
  display: inline-block;
  font-size: 24px;
  font-weight: bold;
  color: #666;
  animation: thinking-animation 1.5s infinite;
}

@keyframes thinking-animation {
  0%, 20% {
    content: ".";
  }
  40% {
    content: "..";
  }
  60%, 100% {
    content: "...";
  }
}

/* 吹き出し（.fukidashi-02-03）をクリック可能にする */
#chat-toggle-button .fukidashi-02-03 { pointer-events: auto; }

/* しっぽや装飾がクリックを奪わないように保険（任意） */
#chat-toggle-button .fukidashi-02-03::before,
#chat-toggle-button .fukidashi-02-03::after,
#chat-toggle-button .fukidashi-02-03 .ornament { pointer-events: none; }

/* 復活ボタン（PNG背景・常時は非表示） */
#revive-button{
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 130px;
  height: 130px;
  z-index: 10000;
  display: none; 
  border: 0;
  padding: 0;
  background: transparent url('../img/chatbot/revive.png') no-repeat center / contain;
  cursor: pointer;
}
#revive-button:focus-visible{
  outline: 2px solid #c3061c;
  outline-offset: 2px;
}

@media (max-width: 768px){
    #revive-button{width: 110px;height: 110px; bottom: 8px;right: 8px;}
}





