.reap-assistant { position: fixed; z-index: 9998; right: 22px; bottom: 22px; font-family: inherit; color: #132238; }
.reap-assistant__launcher { min-height: 52px; display: inline-flex; align-items: center; gap: 9px; padding: 8px 17px 8px 8px; border: 0; border-radius: 999px; background: #132238; color: #fff; box-shadow: 0 15px 40px rgba(19,34,56,.25); font: inherit; font-weight: 800; cursor: pointer; }
.reap-assistant__launcher-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg,#b82a2f,#e4832b 45%,#53833b 70%,#6d4a8d); color: #fff; font-weight: 900; }
.reap-assistant__panel { position: absolute; right: 0; bottom: 64px; width: min(390px, calc(100vw - 28px)); height: min(580px, calc(100vh - 120px)); display: none; grid-template-rows: auto 1fr auto auto; overflow: hidden; border: 1px solid #dce4e9; border-radius: 20px; background: #fff; box-shadow: 0 25px 70px rgba(19,34,56,.25); }
.reap-assistant__panel.is-open { display: grid; }
.reap-assistant__header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 17px; background: #132238; color: #fff; }
.reap-assistant__header strong { display: block; font-size: .98rem; }
.reap-assistant__header span { display: block; margin-top: 1px; color: #c8d4de; font-size: .72rem; }
.reap-assistant__close { width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; background: transparent; color: #fff; font-size: 1.35rem; cursor: pointer; }
.reap-assistant__messages { overflow-y: auto; padding: 17px; background: #f5f7f9; scroll-behavior: smooth; }
.reap-assistant__message { max-width: 88%; margin: 0 0 11px; padding: 11px 13px; border-radius: 14px; font-size: .91rem; line-height: 1.52; white-space: pre-line; }
.reap-assistant__message.is-assistant { margin-right: auto; border: 1px solid #dce4e9; border-top-left-radius: 4px; background: #fff; }
.reap-assistant__message.is-user { margin-left: auto; border-top-right-radius: 4px; background: #132238; color: #fff; }
.reap-assistant__source { display: block; margin-top: 8px; color: #b82a2f; font-size: .76rem; font-weight: 750; text-decoration: none; }
.reap-assistant__form { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px; border-top: 1px solid #dce4e9; background: #fff; }
.reap-assistant__form textarea { width: 100%; min-height: 44px; max-height: 110px; resize: vertical; padding: 10px 11px; border: 1px solid #cfd9df; border-radius: 11px; font: inherit; font-size: .9rem; line-height: 1.4; }
.reap-assistant__form button { align-self: end; min-height: 44px; padding: 9px 14px; border: 0; border-radius: 11px; background: #b82a2f; color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.reap-assistant__form button:disabled { opacity: .65; cursor: wait; }
.reap-assistant__note { margin: 0; padding: 0 13px 11px; color: #6a7681; background: #fff; font-size: .67rem; line-height: 1.35; }
.reap-assistant button:focus-visible, .reap-assistant textarea:focus-visible, .reap-assistant a:focus-visible { outline: 3px solid #d9a739; outline-offset: 2px; }
@media (max-width: 600px) {
  .reap-assistant { right: 14px; bottom: 14px; }
  .reap-assistant__panel { position: fixed; left: 14px; right: 14px; bottom: 76px; width: auto; height: min(590px, calc(100vh - 100px)); }
}
@media (prefers-reduced-motion: reduce) { .reap-assistant__messages { scroll-behavior: auto; } }

.reap-assistant .screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Version 1.1 responsive chat UI. */
@media (max-width: 782px) {
  .reap-assistant { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .reap-assistant__launcher { min-height: 54px; padding: 8px 15px 8px 8px; box-shadow: 0 13px 34px rgba(19,34,56,.28); }
  .reap-assistant__launcher-mark { width: 38px; height: 38px; }
  .reap-assistant__panel {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    width: auto;
    height: min(640px, calc(100dvh - 96px - env(safe-area-inset-bottom)));
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(10,22,37,.28);
  }
  .reap-assistant__header { padding: 15px 16px; }
  .reap-assistant__close { width: 42px; height: 42px; }
  .reap-assistant__messages { padding: 14px; }
  .reap-assistant__message { max-width: 92%; padding: 11px 12px; font-size: .93rem; }
  .reap-assistant__form { grid-template-columns: minmax(0,1fr) auto; gap: 7px; padding: 10px; }
  .reap-assistant__form textarea { min-height: 48px; max-height: 120px; font-size: 16px; resize: none; }
  .reap-assistant__form button { min-width: 58px; min-height: 48px; padding: 10px 13px; }
  .reap-assistant__note { padding: 0 12px 11px; }
}

@media (max-width: 480px) {
  .reap-assistant__launcher { width: 54px; height: 54px; padding: 8px; justify-content: center; border-radius: 50%; }
  .reap-assistant__launcher > span:last-child { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
  .reap-assistant__panel { left: 6px; right: 6px; bottom: calc(74px + env(safe-area-inset-bottom)); height: min(660px, calc(100dvh - 88px - env(safe-area-inset-bottom))); border-radius: 20px; }
}

@media (max-width: 360px) {
  .reap-assistant__panel { left: 4px; right: 4px; }
  .reap-assistant__messages { padding: 11px; }
  .reap-assistant__message { max-width: 95%; }
  .reap-assistant__form { padding: 8px; }
}
