/* HLS ChatBot Manager */
#hls-center-chat,
#hls-center-chat * {
  box-sizing: border-box;
}

#hls-center-chat :first-child {
  margin-top: 0 !important;
}

#hls-center-chat {
  --hls-chat-green: #3f8067;
  --hls-chat-deep: #275844;
  --hls-chat-pale: #edf6f1;
  --hls-chat-orange: #f36c3d;
  --hls-chat-text: #2d4038;
  --hls-chat-muted: #6b7b74;
  position: relative;
  z-index: 99999;
  font-family: "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
}

#hls-center-chat button,
#hls-center-chat a {
  font: inherit;
}

#hls-center-chat .hls-center-chat__launcher {
  position: fixed;
  right: 20px;
  bottom: 104px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: center;
  padding: 0;
  border: 0;
  color: var(--hls-chat-deep);
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

#hls-center-chat .hls-center-chat__launcher-label {
  position: relative;
  display: block;
  padding: 7px 12px;
  border: 1px solid #c8ddd3;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(27, 71, 53, .14);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
}

#hls-center-chat .hls-center-chat__launcher-label::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 9px;
  height: 9px;
  border-right: 1px solid #c8ddd3;
  border-bottom: 1px solid #c8ddd3;
  background: #fff;
  transform: translate(-50%, -5px) rotate(45deg);
}

#hls-center-chat .hls-center-chat__character {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border: 4px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #69b99b, #34755d);
  box-shadow: 0 8px 24px rgba(27, 71, 53, .24);
  overflow: hidden;
  animation: hls-center-chat-float 3s ease-in-out infinite;
}

#hls-center-chat .hls-center-chat__character-face {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, .72);
  border-radius: 50%;
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
}

#hls-center-chat .hls-center-chat__character-image {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0 !important;
  background: #fff;
  object-fit: contain;
}

#hls-center-chat .hls-center-chat__launcher:hover .hls-center-chat__character,
#hls-center-chat .hls-center-chat__launcher:focus-visible .hls-center-chat__character,
#hls-center-chat.is-open .hls-center-chat__character {
  animation-play-state: paused;
}

#hls-center-chat .hls-center-chat__launcher:focus-visible {
  outline: 3px solid rgba(243, 108, 61, .45);
  outline-offset: 5px;
  border-radius: 18px;
}

#hls-center-chat .hls-center-chat__panel[hidden] {
  display: none !important;
}

#hls-center-chat .hls-center-chat__panel {
  position: fixed;
  right: 20px;
  bottom: 204px;
  z-index: 100000;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(390px, calc(100vw - 32px));
  max-height: 590px;
  max-height: min(590px, calc(100dvh - 245px));
  border: 1px solid #cfe1d8;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 52px rgba(26, 65, 50, .28);
  overflow: hidden;
}

#hls-center-chat .hls-center-chat__header {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 13px 14px 13px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--hls-chat-deep), var(--hls-chat-green));
}

#hls-center-chat .hls-center-chat__eyebrow {
  margin: 0 0 1px;
  color: rgba(255, 255, 255, .82);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
}

#hls-center-chat .hls-center-chat__header h2 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

#hls-center-chat .hls-center-chat__close {
  flex: 0 0 auto;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .1);
  box-shadow: none;
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

#hls-center-chat .hls-center-chat__close:hover,
#hls-center-chat .hls-center-chat__close:focus-visible {
  background: rgba(255, 255, 255, .24);
}

#hls-center-chat .hls-center-chat__body {
  min-height: 260px;
  padding: 17px 15px 20px;
  background: #f5faf7;
  overflow-y: auto;
  overscroll-behavior: contain;
}

#hls-center-chat .hls-center-chat__bubble {
  width: fit-content;
  max-width: 92%;
  margin: 0 0 12px;
  padding: 11px 13px;
  border-radius: 15px;
  font-size: 14px;
  line-height: 1.7;
}

#hls-center-chat .hls-center-chat__bubble p {
  margin: 0;
}

#hls-center-chat .hls-center-chat__bubble strong {
  display: block;
  margin-bottom: 4px;
  color: inherit;
  font-size: 15px;
  line-height: 1.55;
}

#hls-center-chat .hls-center-chat__bubble--bot {
  margin-right: auto;
  border: 1px solid #d2e3da;
  border-bottom-left-radius: 4px;
  color: var(--hls-chat-text);
  background: #fff;
}

#hls-center-chat .hls-center-chat__bubble--user {
  margin-left: auto;
  border-bottom-right-radius: 4px;
  color: #fff;
  background: var(--hls-chat-green);
}

#hls-center-chat .hls-center-chat__options {
  display: grid;
  gap: 8px;
  margin: 5px 0 10px;
}

#hls-center-chat .hls-center-chat__options button {
  position: relative;
  width: 100%;
  min-height: 46px;
  padding: 9px 38px 9px 13px;
  border: 1px solid #bbd7ca;
  border-radius: 11px;
  color: var(--hls-chat-deep);
  background: #fff;
  box-shadow: none;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}

#hls-center-chat .hls-center-chat__options button::after {
  content: "›";
  position: absolute;
  top: 50%;
  right: 14px;
  color: var(--hls-chat-orange);
  font-size: 23px;
  font-weight: 800;
  transform: translateY(-52%);
}

#hls-center-chat .hls-center-chat__options button:hover,
#hls-center-chat .hls-center-chat__options button:focus-visible {
  border-color: var(--hls-chat-green);
  background: var(--hls-chat-pale);
  transform: translateY(-1px);
}

#hls-center-chat .hls-center-chat__actions {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

#hls-center-chat .hls-center-chat__action {
  display: flex;
  min-height: 45px;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
  text-decoration: none;
}

#hls-center-chat .hls-center-chat__action--detail {
  border: 1px solid #b9d3c7;
  color: var(--hls-chat-deep);
  background: #fff;
}

#hls-center-chat .hls-center-chat__action--phone {
  border: 1px solid var(--hls-chat-orange);
  color: #fff;
  background: var(--hls-chat-orange);
}

#hls-center-chat .hls-center-chat__action--contact {
  border: 1px solid var(--hls-chat-green);
  color: #fff;
  background: var(--hls-chat-green);
}

#hls-center-chat .hls-center-chat__action:hover,
#hls-center-chat .hls-center-chat__action:focus-visible {
  filter: brightness(.96);
}

#hls-center-chat .hls-center-chat__restart {
  min-height: 40px;
  padding: 6px 10px;
  border: 0;
  color: var(--hls-chat-muted);
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

#hls-center-chat .hls-center-chat__footer {
  padding: 9px 13px 10px;
  border-top: 1px solid #e2ece7;
  color: var(--hls-chat-muted);
  background: #fff;
}

#hls-center-chat .hls-center-chat__footer p {
  margin: 0;
  font-size: 10px;
  line-height: 1.55;
}

@keyframes hls-center-chat-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@media (max-width: 640px) {
  #hls-center-chat .hls-center-chat__launcher {
    right: 14px;
    bottom: calc(100px + env(safe-area-inset-bottom));
  }

  #hls-center-chat .hls-center-chat__launcher-label {
    padding: 6px 10px;
    font-size: 12px;
  }

  #hls-center-chat .hls-center-chat__character {
    width: 62px;
    height: 62px;
  }

  #hls-center-chat .hls-center-chat__character-face {
    width: 38px;
    height: 38px;
    font-size: 23px;
  }

  #hls-center-chat .hls-center-chat__panel {
    right: 12px;
    bottom: calc(180px + env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 205px);
    border-radius: 17px;
  }

  #hls-center-chat .hls-center-chat__header {
    min-height: 66px;
    padding: 11px 12px 11px 15px;
  }

  #hls-center-chat .hls-center-chat__header h2 {
    font-size: 17px;
  }

  #hls-center-chat .hls-center-chat__body {
    min-height: 220px;
    padding: 14px 12px 17px;
  }

  #hls-center-chat .hls-center-chat__bubble {
    max-width: 95%;
    font-size: 13px;
  }

  #hls-center-chat .hls-center-chat__options button {
    min-height: 44px;
    font-size: 13px;
  }
}

@media (max-height: 680px) {
  #hls-center-chat .hls-center-chat__panel {
    bottom: calc(154px + env(safe-area-inset-bottom));
    max-height: calc(100dvh - 174px);
  }

  #hls-center-chat .hls-center-chat__launcher {
    bottom: calc(82px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  #hls-center-chat .hls-center-chat__character,
  #hls-center-chat .hls-center-chat__options button {
    animation: none;
    transition: none;
  }
}
