
.j-ai{
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:99990;
  font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;
  color:#232824;
}
body.admin-bar .j-ai{bottom:22px}
.j-ai-launcher{
  border:0;
  border-radius:999px;
  background:#23352c;
  color:#fff;
  display:flex;
  align-items:center;
  gap:9px;
  padding:9px 16px 9px 9px;
  box-shadow:0 12px 34px rgba(18,31,24,.25);
  cursor:pointer;
  font-weight:700;
  font-size:13px;
}
.j-ai-launcher img{
  width:34px;
  height:34px;
  object-fit:contain;
  border-radius:50%;
  background:#fff;
  padding:3px;
}
.j-ai-panel{
  position:absolute;
  right:0;
  bottom:60px;
  width:min(390px,calc(100vw - 30px));
  height:min(610px,calc(100vh - 120px));
  background:#fffdf8;
  border:1px solid #dfd8ca;
  border-radius:20px;
  box-shadow:0 22px 70px rgba(18,31,24,.25);
  overflow:hidden;
  display:grid;
  grid-template-rows:auto auto 1fr auto auto auto;
}
.j-ai-panel[hidden]{display:none!important}
.j-ai-header{
  background:#23352c;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:16px 17px;
}
.j-ai-header strong{
  display:block;
  font-family:"Yu Mincho","Hiragino Mincho ProN",serif;
  font-size:17px;
  letter-spacing:.06em;
}
.j-ai-header small{
  display:block;
  color:#d9e3dc;
  font-size:11px;
  margin-top:2px;
}
.j-ai-close{
  width:36px;
  height:36px;
  border:1px solid rgba(255,255,255,.25);
  border-radius:50%;
  color:#fff;
  background:transparent;
  font-size:22px;
  line-height:1;
  cursor:pointer;
}
.j-ai-warning{
  font-size:10.5px;
  line-height:1.6;
  padding:9px 14px;
  color:#625c4e;
  background:#f5f0e2;
  border-bottom:1px solid #e5ddcc;
}
.j-ai-messages{
  overflow:auto;
  padding:15px;
  scroll-behavior:smooth;
}
.j-ai-msg{
  display:flex;
  flex-direction:column;
  margin:0 0 12px;
}
.j-ai-msg--user{align-items:flex-end}
.j-ai-msg--bot{align-items:flex-start}
.j-ai-bubble{
  max-width:88%;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  font-size:13px;
  line-height:1.75;
  border-radius:16px;
  padding:10px 13px;
}
.j-ai-msg--bot .j-ai-bubble{
  background:#f0eee7;
  color:#263129;
  border-bottom-left-radius:5px;
}
.j-ai-msg--user .j-ai-bubble{
  background:#23352c;
  color:#fff;
  border-bottom-right-radius:5px;
}
.j-ai-typing{
  color:#68736b!important;
  font-size:12px;
}
.j-ai-links{
  display:flex;
  flex-direction:column;
  gap:5px;
  margin:7px 0 0;
  max-width:92%;
}
.j-ai-links a{
  color:#23352c;
  background:#fff;
  border:1px solid #d8d1c3;
  border-radius:10px;
  padding:7px 10px;
  text-decoration:none;
  font-size:11px;
  line-height:1.45;
}
.j-ai-links a:hover{text-decoration:underline}
.j-ai-suggestions{
  display:flex;
  gap:6px;
  overflow-x:auto;
  padding:7px 12px 10px;
  scrollbar-width:thin;
}
.j-ai-suggestions button{
  flex:0 0 auto;
  border:1px solid #d6d0c2;
  background:#fff;
  color:#344038;
  border-radius:999px;
  padding:7px 10px;
  font-size:10.5px;
  cursor:pointer;
}
.j-ai-suggestions button:hover{
  background:#eef1ed;
  border-color:#bfc8bf;
}
.j-ai-form{
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
  padding:10px 12px;
  border-top:1px solid #dfd8ca;
  background:#fff;
}
.j-ai-form textarea{
  resize:none;
  width:100%;
  min-height:46px;
  max-height:100px;
  padding:10px 11px;
  border:1px solid #d4cdbf;
  border-radius:12px;
  background:#fffdf8;
  font:inherit;
  font-size:12px;
  line-height:1.5;
}
.j-ai-form textarea:focus{
  outline:2px solid rgba(35,53,44,.18);
  border-color:#52665a;
}
.j-ai-form button{
  align-self:end;
  height:42px;
  border:0;
  border-radius:11px;
  background:#23352c;
  color:#fff;
  padding:0 15px;
  font-weight:700;
  cursor:pointer;
}
.j-ai-form button:disabled{opacity:.5;cursor:wait}
.j-ai-footer{
  font-size:9.5px;
  text-align:center;
  color:#71786f;
  padding:0 10px 9px;
  background:#fff;
}
.j-ai-footer a{color:#45584c}
.screen-reader-text{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}
@media(max-width:600px){
  .j-ai{
    right:12px;
    bottom:12px;
  }
  .j-ai-launcher{
    padding-right:13px;
  }
  .j-ai-panel{
    position:fixed;
    right:8px;
    left:8px;
    bottom:8px;
    width:auto;
    height:min(680px,calc(100dvh - 16px));
    border-radius:18px;
  }
}
