/* 案内人 チャット窓
   色などは設定ファイルの css 変数で差し替える。ここは既定値。 */
:root {
  --ann-primary: #1b2a4a;
  --ann-primary-2: #24365e;
  --ann-accent: #2f5aa8;
  --ann-light: #eef2f9;
  --ann-line: #c9d4e6;
  --ann-text: #222222;
  --ann-muted: #5a6577;
  --ann-user-bubble: #dbe7fb;
  --ann-radius: 12px;
}

.ann-launcher {
  position: fixed;
  bottom: 20px;
  z-index: 9990;
  background: var(--ann-primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(27, 42, 74, 0.28);
}
.ann-launcher.ann-pos-right { right: 20px; }
.ann-launcher.ann-pos-left { left: 20px; }
.ann-launcher:hover { background: var(--ann-primary-2); }

.ann-window {
  position: fixed;
  bottom: 20px;
  z-index: 9991;
  width: 360px;
  max-width: calc(100vw - 24px);
  height: 520px;
  max-height: calc(100dvh - 40px);
  background: #fff;
  border: 1px solid var(--ann-line);
  border-radius: var(--ann-radius);
  box-shadow: 0 12px 32px rgba(27, 42, 74, 0.22);
  display: none;
  flex-direction: column;
  overflow: hidden;
  color: var(--ann-text);
  font-size: 14px;
  line-height: 1.65;
}
.ann-window.ann-pos-right { right: 20px; }
.ann-window.ann-pos-left { left: 20px; }
.ann-window.ann-open { display: flex; }

.ann-head {
  background: var(--ann-primary);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.ann-head img { max-height: 28px; width: auto; }
.ann-head .ann-title { font-size: 15px; font-weight: 700; }
.ann-head .ann-sub { font-size: 11.5px; color: #cdd8ee; }
.ann-close {
  margin-left: auto;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

.ann-notices {
  padding: 10px 14px;
  background: var(--ann-light);
  border-bottom: 1px solid var(--ann-line);
  font-size: 12px;
  color: var(--ann-muted);
}
.ann-notices p { margin: 0 0 4px; }
.ann-notices p:last-child { margin-bottom: 0; }

.ann-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #f7f9fc;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ann-msg {
  max-width: 88%;
  padding: 9px 12px;
  border-radius: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}
.ann-msg.ann-bot {
  background: #fff;
  border: 1px solid var(--ann-line);
  border-bottom-left-radius: 3px;
  align-self: flex-start;
}
.ann-msg.ann-user {
  background: var(--ann-user-bubble);
  border-bottom-right-radius: 3px;
  align-self: flex-end;
}
.ann-msg.ann-proactive { border: 2px solid var(--ann-accent); }
.ann-msg a { color: var(--ann-accent); }

.ann-cta {
  display: block;
  margin-top: 10px;
  background: var(--ann-primary);
  color: #fff !important;
  text-align: center;
  text-decoration: none;
  padding: 9px 10px;
  border-radius: 6px;
  font-size: 13.5px;
}
.ann-cta.ann-sub {
  background: #fff;
  color: var(--ann-primary) !important;
  border: 1px solid var(--ann-primary);
}

.ann-form {
  border-top: 1px solid var(--ann-line);
  padding: 10px 12px;
  display: flex;
  gap: 8px;
  background: #fff;
}
.ann-form textarea {
  flex: 1;
  border: 1px solid var(--ann-line);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13.5px;
  resize: none;
  height: 40px;
  font-family: inherit;
}
.ann-form button {
  background: var(--ann-accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13.5px;
  cursor: pointer;
}
.ann-form button:disabled { opacity: 0.55; cursor: default; }

.ann-bubble {
  position: fixed;
  bottom: 84px;
  z-index: 9990;
  width: 300px;
  max-width: calc(100vw - 40px);
  background: #fff;
  border: 2px solid var(--ann-accent);
  border-radius: var(--ann-radius);
  box-shadow: 0 10px 26px rgba(27, 42, 74, 0.2);
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.65;
  display: none;
  cursor: pointer;
}
.ann-bubble.ann-pos-right { right: 20px; }
.ann-bubble.ann-pos-left { left: 20px; }
.ann-bubble.ann-show { display: block; }
.ann-bubble .ann-bubble-close {
  float: right;
  background: transparent;
  border: none;
  color: var(--ann-muted);
  font-size: 15px;
  cursor: pointer;
}

@media (max-width: 640px) {
  .ann-window {
    right: 0 !important;
    left: 0 !important;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    height: 92dvh;
    max-height: 92dvh;
    border-radius: 12px 12px 0 0;
  }
}

.ann-bubble .ann-bubble-choices {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ann-bubble .ann-chip {
  border: 1px solid #1f3a5f;
  background: #fff;
  color: #1f3a5f;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.ann-bubble .ann-chip:hover { background: #eef3fa; }
