/* Pucky — friendly character AI + support hub */
.pgb-support-fab{
  position:fixed;right:1rem;bottom:1rem;z-index:90;
  width:48px;height:48px;border-radius:999px;border:0;cursor:pointer;
  background:linear-gradient(180deg,#f0d78c,#d4af37);color:#0b1220;
  box-shadow:0 8px 22px rgba(5,9,16,.28);
  display:flex;align-items:center;justify-content:center;padding:0;
  transition:transform .2s ease;
}
.pgb-support-fab:hover{transform:scale(1.04)}
.pgb-support-fab .pucky-face{width:36px;height:36px;border-radius:999px;display:block;object-fit:cover}
.pgb-support-fab .dot{
  position:absolute;top:4px;right:6px;width:8px;height:8px;border-radius:999px;
  background:#22c55e;border:2px solid #0b1220;
}
.pgb-pucky-bubble{
  position:fixed;right:4.25rem;bottom:1.15rem;z-index:89;max-width:180px;
  background:#fff;color:#121826;border-radius:12px;padding:.5rem .65rem;
  font-size:.68rem;font-weight:700;line-height:1.3;
  box-shadow:0 8px 22px rgba(5,9,16,.22);border:1px solid rgba(18,24,38,.08);
  display:none;
}
.pgb-pucky-bubble.is-on{display:block;animation:puckyIn .35s ease}
.pgb-pucky-bubble::after{
  content:"";position:absolute;right:-6px;bottom:14px;width:12px;height:12px;background:#fff;
  border-right:1px solid rgba(18,24,38,.08);border-bottom:1px solid rgba(18,24,38,.08);
  transform:rotate(-45deg);
}
@keyframes puckyIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

.pgb-support-panel{
  position:fixed;right:1rem;bottom:4.5rem;z-index:91;width:min(340px,calc(100vw - 1.5rem));
  background:#fff;color:#121826;border-radius:18px;box-shadow:0 20px 50px rgba(5,9,16,.35);
  border:1px solid rgba(18,24,38,.08);overflow:hidden;display:none;flex-direction:column;
  max-height:min(78vh,620px);min-height:0;
}
.pgb-support-panel.is-open{display:flex}
.pgb-support-panel.is-open.is-chat{height:min(78vh,620px)}
.pgb-support-home{display:flex;flex-direction:column;min-height:0;overflow:auto}
.pgb-support-head{
  padding:.85rem 1rem;background:linear-gradient(135deg,#0b1220,#163a74);color:#fff;
  display:flex;align-items:center;gap:.5rem;flex-shrink:0;
}
.pgb-support-head .pucky-face{width:40px;height:40px;flex-shrink:0}
.pgb-support-head .who{flex:1;min-width:0}
.pgb-support-head strong{display:block;font-size:.95rem}
.pgb-support-head small{font-size:.68rem;opacity:.7}
.pgb-support-head button{
  border:0;background:transparent;color:rgba(255,255,255,.7);font-size:1.2rem;cursor:pointer;line-height:1;
  width:36px;height:36px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;
}
.pgb-speak-btn{font-size:1rem !important;background:rgba(255,255,255,.08) !important}
.pgb-speak-btn[aria-pressed="true"]{background:rgba(240,215,140,.2) !important;color:#f0d78c !important}
.pgb-support-disc{font-size:.68rem;color:#8a93a3;padding:.55rem 1rem 0;line-height:1.35}
.pgb-quick{
  display:flex;flex-wrap:wrap;gap:.35rem;padding:.65rem .75rem .25rem;
}
.pgb-quick button{
  border:1px solid rgba(18,24,38,.1);background:#f4f6fa;border-radius:999px;
  padding:.4rem .65rem;font-size:.68rem;font-weight:800;cursor:pointer;color:#163a74;
}
.pgb-quick button:hover{background:#e8edf5}
.pgb-support-menu{padding:.5rem .75rem .85rem;display:grid;gap:.4rem;overflow:auto}
.pgb-support-menu button,.pgb-support-menu a{
  display:flex;align-items:center;gap:.65rem;width:100%;text-align:left;
  border:1px solid rgba(18,24,38,.08);background:#f4f6fa;border-radius:999px;
  padding:.7rem .95rem;font-size:.86rem;font-weight:700;color:#121826;cursor:pointer;text-decoration:none;
}
.pgb-support-menu button:hover,.pgb-support-menu a:hover{background:#e8edf5}
.pgb-support-menu .ico{
  width:28px;height:28px;border-radius:999px;background:#fff;display:grid;place-items:center;flex-shrink:0;font-size:.9rem;
}
.pgb-support-foot{padding:0 1rem .85rem;font-size:.72rem}
.pgb-support-foot a{color:#163a74;font-weight:700}

.pgb-chat{display:none;flex-direction:column;flex:1;min-height:0}
.pgb-chat.is-on{display:flex}
.pgb-chat-msgs{flex:1;overflow:auto;padding:.85rem;display:flex;flex-direction:column;gap:.55rem;background:#f8fafc;min-height:220px}
.pgb-bubble{
  max-width:88%;padding:.65rem .8rem;border-radius:14px;font-size:.86rem;line-height:1.4;
}
.pgb-bubble.bot{background:#fff;border:1px solid rgba(18,24,38,.08);align-self:flex-start}
.pgb-bubble.user{background:#163a74;color:#fff;align-self:flex-end}
.pgb-bubble-links{padding:.45rem .65rem}
.pgb-bubble .cta-stack{display:grid;gap:.3rem}
.pgb-bubble .cta-stack a,.pgb-bubble .cta-stack .pgb-seed{
  color:#163a74;font-weight:800;font-size:.8rem;text-decoration:none;text-align:left;
  border:0;background:transparent;cursor:pointer;padding:.2rem 0;font:inherit;
}
.pgb-typing{display:inline-flex;gap:5px;align-items:center;min-width:52px}
.pgb-typing span{
  width:7px;height:7px;border-radius:50%;background:#8a93a3;
  animation:puckyDot 1s ease-in-out infinite;
}
.pgb-typing span:nth-child(2){animation-delay:.15s}
.pgb-typing span:nth-child(3){animation-delay:.3s}
@keyframes puckyDot{0%,80%,100%{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
.pgb-chat-form{
  display:flex;gap:.35rem;padding:.65rem;border-top:1px solid rgba(18,24,38,.08);background:#fff;flex-shrink:0;
  align-items:center;
}
.pgb-chat-form input{
  flex:1;min-width:0;border:1px solid rgba(18,24,38,.12);border-radius:999px;padding:.65rem .85rem;font:inherit;
}
.pgb-chat-form button[type="submit"]{
  border:0;border-radius:999px;padding:.65rem 1rem;background:#0b1220;color:#fff;font-weight:800;cursor:pointer;font-size:.75rem;
  flex-shrink:0;
}
.pgb-mic{
  width:42px;height:42px;border-radius:999px;border:1px solid rgba(18,24,38,.12);background:#f4f6fa;
  cursor:pointer;flex-shrink:0;font-size:1.05rem;display:inline-flex;align-items:center;justify-content:center;
}
.pgb-mic.is-hot{
  background:#7a1524;border-color:#7a1524;color:#fff;
  box-shadow:0 0 0 0 rgba(122,21,36,.45);
  animation:puckyMic 1.2s ease-out infinite;
}
@keyframes puckyMic{
  0%{box-shadow:0 0 0 0 rgba(122,21,36,.45)}
  70%{box-shadow:0 0 0 12px rgba(122,21,36,0)}
  100%{box-shadow:0 0 0 0 rgba(122,21,36,0)}
}
.pgb-chat-back{
  border:0;background:transparent;color:#163a74;font-weight:800;font-size:.72rem;padding:.5rem .85rem 0;cursor:pointer;text-align:left;flex-shrink:0;
}
@media(max-width:520px){
  .pgb-support-fab{right:max(.75rem,env(safe-area-inset-right));bottom:max(.75rem,env(safe-area-inset-bottom))}
  .pgb-support-panel{
    right:max(.5rem,env(safe-area-inset-right));left:max(.5rem,env(safe-area-inset-left));
    width:auto;bottom:calc(4.1rem + env(safe-area-inset-bottom));
  }
  .pgb-support-panel.is-open.is-chat{height:min(82vh,640px)}
}

.pgb-lang-bar{
  background:linear-gradient(180deg,#10203a,#0a162c);color:#fff;padding:.65rem 4vw;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.75rem;
}
.pgb-lang-bar .pgb-lang-btn{
  border:1px solid rgba(255,255,255,.2);background:transparent;color:#fff;border-radius:999px;
  padding:.45rem .85rem;font-size:.72rem;font-weight:800;letter-spacing:.06em;cursor:pointer;
}
.pgb-lang-bar .pgb-lang-btn:hover{border-color:#f0d78c;color:#f0d78c}
.pgb-lang-pop{
  position:fixed;inset:0;z-index:100;background:rgba(5,9,16,.55);display:none;align-items:flex-end;justify-content:center;
}
.pgb-lang-pop.is-open{display:flex}
.pgb-lang-sheet{
  background:#fff;color:#121826;width:min(520px,100%);max-height:70vh;border-radius:16px 16px 0 0;
  padding:1rem 1rem 1.5rem;overflow:auto;
}
.pgb-lang-sheet h3{margin:0 0 .75rem;font-size:1rem}
.pgb-lang-sheet button{
  display:block;width:100%;text-align:left;border:0;background:transparent;padding:.7rem .5rem;
  border-bottom:1px solid rgba(18,24,38,.06);font-size:.92rem;cursor:pointer;font-weight:600;
}
.pgb-lang-sheet button.is-on{color:#163a74;font-weight:800}
.pgb-lang-sheet .close{float:right;border:0;background:#f4f6fa;border-radius:999px;width:32px;height:32px;cursor:pointer}

html[dir="rtl"] .pgb-support-fab{right:auto;left:1rem}
html[dir="rtl"] .pgb-support-panel{right:auto;left:1rem}
html[dir="rtl"] .pgb-pucky-bubble{right:auto;left:4.25rem}
html[dir="rtl"] .pgb-pucky-bubble::after{right:auto;left:-6px;transform:rotate(135deg)}
html[dir="rtl"] .pgb-bubble.user{align-self:flex-start}
html[dir="rtl"] .pgb-bubble.bot{align-self:flex-end}
