.jerry-chat-launcher {
  position: fixed; right: clamp(18px, 3vw, 34px); bottom: clamp(18px, 3vw, 34px); z-index: 80;
  display: inline-flex; align-items: center; gap: 10px; border: 1px solid #6e9add;
  border-radius: 14px; padding: 14px 20px; background: #235ec1; color: #fff;
  font: 600 14px/1.2 Inter, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  box-shadow: 0 10px 36px #05193380; cursor: pointer; transition: background .18s, transform .18s;
}
.jerry-chat-launcher:hover { transform: translateY(-2px); background: #3176e2; }
.jerry-chat-launcher svg { width: 21px; height: 21px; flex: none; }
.jerry-chat-launcher:focus-visible, .jerry-chat-close:focus-visible { outline: 3px solid #8fc7ff; outline-offset: 3px; }
.jerry-chat-dialog {
  position: fixed; inset: 0; margin: auto; width: min(1000px, calc(100vw - 48px));
  height: min(820px, calc(100dvh - 64px)); max-width: none; max-height: none;
  padding: 0; overflow: hidden; border: 1px solid #3b4e6b; border-radius: 20px;
  background: #0b1120; color: #eaf0fb; box-shadow: 0 32px 110px #0009;
}
.jerry-chat-dialog::backdrop { background: #03070fb3; backdrop-filter: blur(4px); }
.jerry-chat-shell { display: flex; width: 100%; height: 100%; min-height: 0; flex-direction: column; }
.jerry-chat-header {
  display: flex; flex: none; min-height: 72px; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px 22px; border-bottom: 1px solid #2b3c57; background: #0e1829;
}
.jerry-chat-heading { min-width: 0; }
.jerry-chat-title { margin: 0; color: #f4f7ff; font: 600 18px/1.35 Inter, "Noto Sans TC", "Microsoft JhengHei", sans-serif; }
.jerry-chat-subtitle { margin: 5px 0 0; color: #a2b1ca; font: 400 12px/1.4 Inter, "Noto Sans TC", "Microsoft JhengHei", sans-serif; }
.jerry-chat-close {
  display: grid; width: 36px; height: 36px; flex: none; place-items: center; border: 1px solid #3e506c;
  border-radius: 10px; background: #172438; color: #edf3ff; font: 400 24px/1 Arial, sans-serif; cursor: pointer;
}
.jerry-chat-close:hover { background: #293d59; }
.jerry-chat-frame-wrap { position: relative; flex: 1; min-height: 0; background: #0b1120; }
.jerry-chat-frame { display: block; width: 100%; height: 100%; border: 0; background: #0b1120; }
.jerry-chat-dialog[data-loading="true"] .jerry-chat-frame-wrap::after {
  content: attr(data-loading-text); position: absolute; inset: 0; display: grid; place-items: center;
  pointer-events: none; background: #0b1120; color: #a8bad4;
  font: 400 14px/1.5 Inter, "Noto Sans TC", sans-serif;
}
@media (max-width: 600px) {
  .jerry-chat-launcher { right: 15px; bottom: 15px; padding: 12px 15px; }
  .jerry-chat-dialog { width: calc(100vw - 16px); height: calc(100dvh - 16px); border-radius: 15px; }
  .jerry-chat-header { min-height: 62px; padding: 12px 14px; }
  .jerry-chat-title { font-size: 15px; }
  .jerry-chat-subtitle { font-size: 11px; }
  .jerry-chat-close { width: 32px; height: 32px; }
}
@media (prefers-reduced-motion: reduce) { .jerry-chat-launcher { transition: none; } }
