:root{
  --reky-bg:#0b2f63;
  --reky-bg-2:#0f4b9b;
  --reky-card:#0d356d;
  --reky-red:#ef1b24;
  --reky-red-2:#ff3a44;
  --reky-gold:#f2c866;
  --reky-text:#ffffff;
  --reky-muted:rgba(255,255,255,.72);
  --reky-line:rgba(255,255,255,.18);
  --reky-shadow:0 24px 80px rgba(3,22,58,.46);
}

#reky-assistant-root,
#reky-assistant-root *{
  box-sizing:border-box;
  font-family:Inter, Arial, Helvetica, sans-serif;
}

.reky-launcher{
  position:fixed;
  left:22px;
  top:22px;
  right:auto;
  bottom:auto;
  z-index:999999;
  display:flex;
  align-items:center;
  gap:11px;
  border:1px solid rgba(116,177,255,.42);
  border-radius:999px;
  padding:8px 16px 8px 8px;
  min-height:58px;
  background:
    radial-gradient(circle at 18% 20%, rgba(239,27,36,.38), transparent 32%),
    radial-gradient(circle at 92% 60%, rgba(47,118,255,.34), transparent 42%),
    linear-gradient(135deg, rgba(16,73,150,.98), rgba(7,38,90,.98) 48%, rgba(3,24,66,.98));
  color:#fff;
  box-shadow:0 18px 46px rgba(5,34,84,.42), 0 0 0 1px rgba(255,255,255,.08), inset 0 1px 0 rgba(255,255,255,.18);
  cursor:pointer;
  transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease, filter .22s ease;
  user-select:none;
  -webkit-tap-highlight-color:transparent;
}

.reky-launcher::before{
  content:"";
  position:absolute;
  inset:1px;
  border-radius:999px;
  background:linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,0) 52%);
  pointer-events:none;
}

.reky-launcher-icon,
.reky-launcher-label{
  position:relative;
  z-index:1;
}

.reky-launcher:hover{
  transform:translateY(-3px);
  border-color:rgba(239,27,36,.55);
  box-shadow:0 24px 64px rgba(6,44,109,.52), 0 0 0 4px rgba(47,118,255,.12), 0 0 28px rgba(239,27,36,.18), inset 0 1px 0 rgba(255,255,255,.20);
  filter:saturate(1.06);
}

.reky-launcher:focus-visible,
.reky-send:focus-visible,
.reky-close:focus-visible,
.reky-action:focus-visible,
.reky-chip:focus-visible{
  outline:3px solid rgba(242,200,102,.62);
  outline-offset:3px;
}

.reky-launcher.reky-pulse::after{
  content:"";
  position:absolute;
  inset:-5px;
  border-radius:999px;
  border:1px solid rgba(239,27,36,.34);
  animation:rekyPulse 2.6s ease-out infinite;
  pointer-events:none;
}

@keyframes rekyPulse{
  0%{opacity:.65; transform:scale(.98)}
  70%{opacity:0; transform:scale(1.12)}
  100%{opacity:0; transform:scale(1.12)}
}

.reky-launcher-icon{
  width:44px;
  height:44px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  background:linear-gradient(145deg, rgba(255,255,255,.14), rgba(255,255,255,.03));
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.17), 0 9px 26px rgba(0,0,0,.33);
  flex:0 0 auto;
}

.reky-launcher-icon img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.reky-launcher-label{
  display:flex;
  flex-direction:column;
  line-height:1.04;
  text-align:left;
}

.reky-launcher-label strong{
  font-size:15px;
  font-weight:800;
  letter-spacing:.1px;
  white-space:nowrap;
}

.reky-launcher-label span{
  margin-top:4px;
  color:rgba(255,255,255,.62);
  font-size:11px;
  font-weight:600;
  letter-spacing:.18px;
  white-space:nowrap;
}

.reky-panel{
  position:fixed;
  left:22px;
  top:92px;
  right:auto;
  bottom:auto;
  z-index:999999;
  width:390px;
  max-width:calc(100vw - 28px);
  max-height:72vh;
  display:none;
  flex-direction:column;
  overflow:hidden;
  border:1px solid rgba(116,177,255,.30);
  border-radius:24px;
  color:var(--reky-text);
  background:
    radial-gradient(circle at 0% 0%, rgba(239,27,36,.24), transparent 32%),
    radial-gradient(circle at 95% 10%, rgba(72,143,255,.30), transparent 38%),
    radial-gradient(circle at 85% 100%, rgba(242,200,102,.12), transparent 30%),
    linear-gradient(145deg, rgba(15,74,151,.985), rgba(8,49,111,.985) 48%, rgba(5,31,82,.985));
  box-shadow:var(--reky-shadow), inset 0 1px 0 rgba(255,255,255,.12);
  transform:translateY(12px) scale(.98);
  opacity:0;
  pointer-events:none;
  transition:opacity .22s ease, transform .22s ease;
}

.reky-panel.is-open{
  display:flex;
  transform:translateY(0) scale(1);
  opacity:1;
  pointer-events:auto;
}


#reky-assistant-root.reky-position-bottom-right .reky-launcher{
  left:auto;
  top:auto;
  right:22px;
  bottom:22px;
}

#reky-assistant-root.reky-position-bottom-right .reky-panel{
  left:auto;
  top:auto;
  right:22px;
  bottom:92px;
}

body.admin-bar #reky-assistant-root.reky-position-top-left .reky-launcher{
  top:54px;
}

body.admin-bar #reky-assistant-root.reky-position-top-left .reky-panel{
  top:124px;
}

.reky-header{
  position:relative;
  display:flex;
  align-items:center;
  gap:12px;
  padding:16px 16px 14px;
  border-bottom:1px solid rgba(255,255,255,.11);
  background:linear-gradient(180deg, rgba(116,177,255,.18), rgba(255,255,255,.045));
}

.reky-header::after{
  content:"";
  position:absolute;
  left:16px;
  right:16px;
  bottom:-1px;
  height:1px;
  background:linear-gradient(90deg, transparent, rgba(239,27,36,.82), rgba(242,200,102,.58), transparent);
}

.reky-avatar{
  width:46px;
  height:46px;
  border-radius:15px;
  overflow:hidden;
  background:rgba(116,177,255,.16);
  box-shadow:0 12px 28px rgba(0,0,0,.26), inset 0 0 0 1px rgba(255,255,255,.16);
  flex:0 0 auto;
}

.reky-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.reky-title-wrap{
  flex:1 1 auto;
  min-width:0;
}

.reky-title{
  margin:0;
  color:#fff;
  font-size:15px;
  line-height:1.14;
  font-weight:850;
  letter-spacing:.1px;
}

.reky-subtitle{
  margin:4px 0 0;
  color:var(--reky-muted);
  font-size:11.5px;
  line-height:1.28;
}

.reky-close{
  width:36px;
  height:36px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:13px;
  background:rgba(116,177,255,.12);
  color:#fff;
  cursor:pointer;
  font-size:19px;
  line-height:1;
  transition:background .2s ease, transform .2s ease, border-color .2s ease;
}

.reky-close:hover{
  transform:translateY(-1px);
  background:rgba(239,27,36,.18);
  border-color:rgba(239,27,36,.42);
}

.reky-body{
  display:flex;
  flex-direction:column;
  min-height:0;
  flex:1 1 auto;
}

.reky-messages{
  min-height:250px;
  max-height:calc(72vh - 164px);
  overflow-y:auto;
  padding:17px 14px 12px;
  scroll-behavior:smooth;
}

.reky-messages::-webkit-scrollbar{
  width:8px;
}

.reky-messages::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.18);
  border-radius:999px;
}

.reky-msg{
  display:flex;
  margin:0 0 11px;
}

.reky-msg.user{
  justify-content:flex-end;
}

.reky-bubble{
  max-width:86%;
  padding:11px 13px;
  border-radius:18px;
  color:#fff;
  font-size:13.5px;
  line-height:1.43;
  white-space:pre-wrap;
}

.reky-msg.bot .reky-bubble{
  background:linear-gradient(135deg, rgba(255,255,255,.13), rgba(116,177,255,.08));
  border:1px solid rgba(255,255,255,.10);
  border-top-left-radius:7px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
}

.reky-msg.user .reky-bubble{
  background:linear-gradient(135deg, rgba(239,27,36,.92), rgba(158,14,22,.95));
  border:1px solid rgba(255,255,255,.12);
  border-bottom-right-radius:7px;
  box-shadow:0 10px 24px rgba(239,27,36,.17);
}

.reky-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:7px 0 13px;
}

.reky-action,
.reky-chip,
.reky-inline-open{
  border:1px solid rgba(242,200,102,.36);
  border-radius:999px;
  padding:9px 12px;
  background:rgba(242,200,102,.06);
  color:#fff;
  font-size:12.5px;
  font-weight:740;
  line-height:1;
  cursor:pointer;
  text-decoration:none;
  transition:transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}

.reky-action:hover,
.reky-chip:hover,
.reky-inline-open:hover{
  transform:translateY(-1px);
  border-color:rgba(242,200,102,.8);
  background:rgba(242,200,102,.14);
  color:#fff;
}

.reky-action.primary{
  border-color:rgba(239,27,36,.62);
  background:linear-gradient(135deg, rgba(239,27,36,.96), rgba(146,12,22,.96));
  box-shadow:0 12px 26px rgba(239,27,36,.18);
}

.reky-action.primary:hover{
  border-color:rgba(255,255,255,.3);
  background:linear-gradient(135deg, rgba(255,58,68,.98), rgba(168,16,28,.98));
}

.reky-action.ghost{
  border-color:rgba(255,255,255,.16);
  background:rgba(255,255,255,.055);
}

.reky-input-area{
  padding:12px;
  border-top:1px solid rgba(255,255,255,.11);
  background:linear-gradient(180deg, rgba(5,31,82,.68), rgba(3,20,58,.76));
}

.reky-form{
  display:flex;
  gap:8px;
  align-items:flex-end;
}

.reky-input{
  flex:1 1 auto;
  min-height:44px;
  max-height:96px;
  resize:none;
  border:1px solid rgba(255,255,255,.15);
  border-radius:16px;
  padding:12px 13px;
  background:rgba(255,255,255,.10);
  color:#fff;
  font-size:14px;
  line-height:1.25;
  outline:none;
  transition:border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.reky-input::placeholder{
  color:rgba(255,255,255,.50);
}

.reky-input:focus{
  border-color:rgba(242,200,102,.62);
  box-shadow:0 0 0 4px rgba(242,200,102,.08);
  background:rgba(255,255,255,.13);
}

.reky-send{
  width:48px;
  height:44px;
  border:0;
  border-radius:16px;
  color:#fff;
  background:linear-gradient(135deg, var(--reky-red), #980b17);
  cursor:pointer;
  font-size:18px;
  line-height:1;
  transition:transform .18s ease, filter .18s ease, opacity .18s ease;
  box-shadow:0 13px 28px rgba(239,27,36,.18);
}

.reky-send:hover{
  transform:translateY(-1px);
  filter:saturate(1.1);
}

.reky-send:disabled,
.reky-input:disabled{
  opacity:.55;
  cursor:not-allowed;
}

.reky-note{
  margin:8px 2px 0;
  color:rgba(255,255,255,.47);
  font-size:10.5px;
  line-height:1.25;
}

@media (max-width: 600px){
  .reky-launcher{
    left:12px;
    top:14px;
    right:auto;
    bottom:auto;
    min-height:55px;
    padding:7px 13px 7px 7px;
  }
  .reky-launcher-icon{
    width:41px;
    height:41px;
  }
  .reky-launcher-label strong{
    font-size:14px;
  }

  #reky-assistant-root.reky-position-bottom-right .reky-launcher{
    left:auto;
    top:auto;
    right:12px;
    bottom:14px;
  }
  #reky-assistant-root.reky-position-bottom-right .reky-panel{
    left:auto;
    top:auto;
    right:10px;
    bottom:78px;
  }
  body.admin-bar #reky-assistant-root.reky-position-top-left .reky-launcher{
    top:60px;
  }
  body.admin-bar #reky-assistant-root.reky-position-top-left .reky-panel{
    top:124px;
  }

  .reky-panel{
    left:10px;
    top:78px;
    right:auto;
    bottom:auto;
    width:calc(100vw - 20px);
    max-width:calc(100vw - 20px);
    max-height:min(78vh, 660px);
    border-radius:22px;
  }
  #reky-assistant-root.reky-position-bottom-right .reky-launcher{
    left:auto;
    top:auto;
    right:12px;
    bottom:14px;
  }
  #reky-assistant-root.reky-position-bottom-right .reky-panel{
    left:auto;
    top:auto;
    right:10px;
    bottom:78px;
  }

  .reky-messages{
    max-height:calc(78vh - 164px);
    min-height:235px;
    padding:15px 12px 10px;
  }
  .reky-header{
    padding:14px 13px 12px;
  }
  .reky-avatar{
    width:42px;
    height:42px;
    border-radius:13px;
  }
  .reky-bubble{
    max-width:90%;
    font-size:13.2px;
  }
  .reky-action,
  .reky-chip{
    font-size:12px;
    padding:9px 11px;
  }
}

@media (prefers-reduced-motion: reduce){
  .reky-launcher,
  .reky-panel,
  .reky-action,
  .reky-chip,
  .reky-send,
  .reky-close{
    transition:none !important;
    animation:none !important;
  }
}
