#tayori-ai-chatbot-app {
  left: auto !important;
  right: 0;
  margin-left: 0 !important;
  margin-right: 20px;
  margin-bottom: 70px !important;
}

.tayori-ai-chatbot-app-talk-body a {
  color: #43bfa0;
  text-decoration: underline;
  font-weight: normal;
}

.tayori-ai-chatbot-app-caution a {
  text-decoration: underline;
}

.tayori-ai-chatbot-app-selection-btn {
  border-width: 2px;
  border-style: outset;
  border-color: buttonborder;
  border-image: none;
}

#tayori-ai-chatbot-mobile-widget {
  display: none;
}

@media (max-width: 899px) {
  #tayori-ai-chatbot-app {
    display: none !important;
  }

  #tayori-ai-chatbot-mobile-widget {
    position: fixed;
    z-index: 100000200;
    right: 0;
    bottom: 5%;
    display: block;
  }

  .ai-chatbot-mobile-widget__button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 38px;
    min-height: 170px;
    padding: 0;
    color: #fff;
    background: #43bfa1;
    border: 0;
    border-radius: 4px 0 0 4px;
    box-shadow: 0 2px 10px rgb(0 0 0 / 20%);
    cursor: pointer;
  }

  .ai-chatbot-mobile-widget__button:focus,
  .ai-chatbot-mobile-widget__close:focus {
    outline: none !important;
  }

  .ai-chatbot-mobile-widget__logo {
    width: 26px;
    height: 26px;
    margin: 12px 6px 9px;
  }

  .ai-chatbot-mobile-widget__label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 1em;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-align: center;
  }

  .ai-chatbot-mobile-widget__label-prefix {
    white-space: nowrap;
    writing-mode: horizontal-tb;
  }

  .ai-chatbot-mobile-widget__arrow {
    width: 12px;
    height: 12px;
    margin: 12px;
    transform: rotate(-90deg);
  }

  .ai-chatbot-mobile-widget__arrow-svg {
    display: block;
    width: 100%;
    height: 100%;
  }

  .ai-chatbot-mobile-widget__arrow-svg path {
    fill: currentColor;
  }

  .ai-chatbot-mobile-widget__dialog[hidden] {
    display: none;
  }

  .ai-chatbot-mobile-widget__dialog {
    position: fixed;
    z-index: 100000201;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
    background: rgb(0 0 0 / 55%);
  }

  .ai-chatbot-mobile-widget__panel {
    position: relative;
    width: min(100%, 480px);
    height: min(600px, calc(100dvh - 32px));
    overflow: hidden;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgb(0 0 0 / 28%);
  }

  .ai-chatbot-mobile-widget__iframe {
    width: 100%;
    height: 600px;
    max-height: 100%;
    border: 0;
  }

  .ai-chatbot-mobile-widget__close {
    position: absolute;
    z-index: 1;
    top: 8px;
    right: 8px;
    display: grid;
    width: 30px;
    height: 30px;
    padding: 0;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    background-color: rgba(0, 0, 0, .2);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    place-items: center;
  }
  .ai-chatbot-mobile-widget__close::before,
  .ai-chatbot-mobile-widget__close::after {
    content: "";
    background-color: #fff;
    width: 2px;
    height: 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -6px 0 0 -1px;
    transform-origin: center center;
  }

  .ai-chatbot-mobile-widget__close::before {
    transform: rotate(45deg);
  }

  .ai-chatbot-mobile-widget__close::after {
    transform: rotate(-45deg);
  }

  body.ai-chatbot-mobile-widget-open {
    overflow: hidden;
  }
}
