:root{--chat-ptp-accent:#1e90ff}
#chat-ptp-root{display:block}
.chatptp-label{position:fixed;right:20px;bottom:106px;z-index:100000;font-weight:700;color:var(--chat-ptp-accent);font-family:inherit}
.tptp-floating { position:fixed; z-index:999999; width:78px;height:78px;border-radius:50%; display:flex;align-items:center;justify-content:center; box-shadow:0 18px 46px rgba(5,15,50,0.18); background:linear-gradient(135deg,var(--chat-ptp-accent),#6fb3ff); cursor:pointer; transform-origin:center; right:20px; bottom:20px; }
.tptp-floating svg{width:56px;height:56px;display:block}
.tptp-entry{animation:tptp-entry .9s cubic-bezier(.2,.9,.3,1) both}
@keyframes tptp-entry{from{transform:scale(.6) rotateX(25deg);opacity:0}to{transform:scale(1) rotateX(0);opacity:1}}
/* bob + rotateY */
.tptp-idle{animation:tptp-bob 10s ease-in-out infinite}
@keyframes tptp-bob{
  0%{transform:translateY(0) rotateY(0) scale(1)}
  6%{transform:translateY(-18px) rotateY(160deg) scale(.95)}
  12%{transform:translateY(0) rotateY(360deg) scale(1)}
  100%{transform:translateY(0) rotateY(360deg) scale(1)}
}

.tptp-panel{position:fixed; z-index:999998; width:420px; max-width:calc(100% - 32px); height:560px; max-height:82vh; border-radius:14px; overflow:hidden; box-shadow:0 28px 80px rgba(10,20,60,0.18); display:flex;flex-direction:column;background:linear-gradient(180deg,#ffffff,#fbfdff); direction:rtl; font-family:inherit; right:20px; bottom:110px; }
.tptp-header { padding:12px 14px; display:flex; align-items:center; gap:10px; color:#fff; background:linear-gradient(90deg,var(--chat-ptp-accent),#6fa8ff); }
.tptp-header .title{ font-weight:700; font-size:15px; }
.tptp-messages { flex:1; overflow:auto; padding:14px; font-size:14px; color:#111; background:linear-gradient(180deg,#f8fbff,#ffffff); }
.tptp-msg { display:flex; margin:8px 0; }
.tptp-msg.me { justify-content:flex-end; }
.tptp-bubble { padding:10px 12px; border-radius:12px; line-height:1.45; max-width:78%; box-shadow:0 6px 20px rgba(10,20,60,0.04); }
.tptp-bubble.bot { background:#ffffff; border:1px solid #eef6ff; color:#0b2540; border-bottom-right-radius:6px; }
.tptp-bubble.me { background:#e6f0ff; color:#02243a; border-bottom-left-radius:6px; }
.tptp-avatar { width:36px;height:36px;border-radius:8px;overflow:hidden;margin-left:8px; }

.tptp-input-wrap { padding:10px 14px; background:#fff; border-top:1px solid #eef5ff; }
.tptp-input { display:flex; gap:8px; align-items:stretch; flex-direction:column; }
.tptp-input textarea { width:100%; min-height:56px; max-height:140px; resize:none; padding:10px;border-radius:10px;border:1px solid #e9f2ff; outline:none; font-size:14px; }
.tptp-send { background:var(--chat-ptp-accent); color:#fff; border:none; padding:10px 14px; border-radius:10px; cursor:pointer; font-weight:700; width:120px; margin:8px auto 0; display:block; }
.tptp-small { font-size:13px; color:#666; text-align:center; padding:8px 12px; }

@media (max-width:520px){
  .tptp-panel{ right:12px; left:12px; bottom:88px; width:auto; height:72vh; max-height:72vh; border-radius:12px; }
  .tptp-floating{ right:12px; bottom:12px; }
  .chatptp-label{right:12px; bottom:186px}
}
