/* ===== AlMiLib Floating Chat (GGChat) ===== */
#ggchat-fab{position:fixed;right:calc(18px + env(safe-area-inset-right));bottom:calc(18px + env(safe-area-inset-bottom));width:56px;height:56px;border-radius:999px;border:0;cursor:pointer;z-index:999999;box-shadow:0 10px 30px rgba(0,0,0,.35);display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg, rgba(153, 69, 255, 1), rgba(73, 22, 222, 1));}
#ggchat-fab svg{width:26px;height:26px;fill:#fff}
#ggchat-panel{position:fixed;right:calc(18px + env(safe-area-inset-right));bottom:calc(86px + env(safe-area-inset-bottom));width:360px;max-width:calc(100vw - 36px);height:520px;max-height:calc(100vh - 120px);border-radius:18px;overflow:hidden;z-index:999999;box-shadow:0 18px 50px rgba(0,0,0,.45);display:none;background:#0b0b12;border:1px solid rgba(255,255,255,.08)}
#ggchat-panel.ggchat-open{display:flex;flex-direction:column}
.ggchat-head{padding:12px 14px;background:rgba(255,255,255,.05);display:flex;align-items:center;justify-content:space-between}
.ggchat-title{display:flex;gap:10px;align-items:center}
.ggchat-avatar{width:34px;height:34px;border-radius:999px;background:linear-gradient(135deg, rgba(153, 69, 255, .9), rgba(73, 22, 222, .9));display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;font-family:Arial,sans-serif}
.ggchat-title h4{margin:0;color:#fff;font-size:14px;font-family:Arial,sans-serif}
.ggchat-title p{margin:0;color:rgba(255,255,255,.7);font-size:12px;font-family:Arial,sans-serif}
.ggchat-close{background:transparent;border:0;cursor:pointer;color:rgba(255,255,255,.85);font-size:20px;line-height:1}
#ggchat-messages{flex:1;overflow:auto;padding:14px;display:flex;flex-direction:column;gap:10px}
.ggchat-bubble{max-width:85%;padding:10px 12px;border-radius:14px;font-family:Arial,sans-serif;font-size:13px;line-height:1.35;white-space:pre-wrap;word-wrap:break-word}
.ggchat-user{align-self:flex-end;background:rgba(153, 69, 255, .18);border:1px solid rgba(153, 69, 255, .35);color:#fff}
.ggchat-bot{align-self:flex-start;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.10);color:rgba(255,255,255,.92)}
.ggchat-foot{padding:10px;border-top:1px solid rgba(255,255,255,.08);background:rgba(0,0,0,.25);display:flex;gap:8px}
#ggchat-input{flex:1;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12);color:#fff;border-radius:12px;padding:10px 10px;outline:none;font-family:Arial,sans-serif;font-size:13px}
#ggchat-send{border:0;cursor:pointer;padding:0 14px;border-radius:12px;background:linear-gradient(135deg, rgba(153, 69, 255, 1), rgba(73, 22, 222, 1));color:#fff;font-weight:700;font-family:Arial,sans-serif}
#ggchat-hint{font-family:Arial,sans-serif;font-size:11px;color:rgba(255,255,255,.6);padding:0 14px 10px}


/* responsive */
@media (max-width: 420px){
  #ggchat-fab{right:calc(12px + env(safe-area-inset-right));bottom:calc(12px + env(safe-area-inset-bottom));}
  #ggchat-panel{right:calc(12px + env(safe-area-inset-right));bottom:calc(76px + env(safe-area-inset-bottom));width:calc(100vw - 24px);height:min(520px, calc(100vh - 110px));border-radius:16px}
  .ggchat-bubble{max-width:92%}
}
