/* PureGlow assistant */
.pg-chat { position: fixed; right: 16px; bottom: 16px; z-index: 55; font-family: var(--sans); }
@media (max-width: 979px) { .pg-chat { bottom: 84px; right: 12px; } }
.pg-chat-fab { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 20px 0 10px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--ink); color: var(--porcelain); font: 700 .95rem var(--sans); box-shadow: 0 18px 40px -14px rgba(32, 30, 27, .6); }
.pg-chat-orb { width: 34px; height: 34px; border-radius: 50%; position: relative;
  background: radial-gradient(circle at 35% 30%, #FFF6E2, var(--glow) 45%, #B98A4A 100%); box-shadow: 0 0 18px rgba(232, 196, 138, .8); animation: orb 3.2s ease-in-out infinite; }
.pg-chat-orb::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid rgba(232, 196, 138, .55); animation: ring 3.2s ease-out infinite; }
@keyframes orb { 50% { transform: scale(1.08); box-shadow: 0 0 28px rgba(232, 196, 138, 1); } }
@keyframes ring { from { transform: scale(.8); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.pg-chat.open .pg-chat-fab-t { display: none; }
.pg-chat.open .pg-chat-fab { padding: 0 10px; }
@media (max-width: 520px) { .pg-chat-fab-t { display: none; } .pg-chat-fab { padding: 0 10px; } }

.pg-chat-panel { position: absolute; right: 0; bottom: 66px; width: min(380px, calc(100vw - 24px)); height: min(560px, calc(100dvh - 170px));
  display: flex; flex-direction: column; border-radius: 26px; overflow: hidden; background: var(--veil);
  box-shadow: 0 40px 80px -30px rgba(32, 30, 27, .55), 0 0 0 1px var(--line); transform-origin: 90% 100%; }
.pg-chat-panel[hidden] { display: none; }
.pg-chat-panel header { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 14px 16px;
  background: linear-gradient(135deg, var(--ink), #3a342d); color: var(--porcelain); }
.pg-chat-who { display: flex; gap: 10px; align-items: center; }
.pg-chat-who b { display: block; font: 400 1.15rem var(--serif); }
.pg-chat-who small { display: flex; align-items: center; gap: 6px; color: #CFC5BC; font-size: .78rem; }
.pg-chat-who .dot { width: 7px; height: 7px; border-radius: 50%; background: #8FBF6A; box-shadow: 0 0 0 3px rgba(143, 191, 106, .25); }
.pg-chat-logo { width: 28px; height: 36px; color: var(--glow); }
.pg-chat-x { width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .08); color: inherit; cursor: pointer; display: grid; place-items: center; }
.pg-chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.pg-chat-log .m { max-width: 86%; padding: 10px 14px; border-radius: 18px; font-size: .95rem; line-height: 1.5; overflow-wrap: anywhere; }
.pg-chat-log .a { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.pg-chat-log .u { align-self: flex-end; background: var(--olive); color: #fff; border-bottom-right-radius: 6px; }
.pg-chat-log .a a { color: var(--olive); font-weight: 700; }
.pg-chat-log .typing { display: flex; gap: 5px; padding: 14px 16px; }
.pg-chat-log .typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--glow); animation: blink 1.1s infinite ease-in-out; }
.pg-chat-log .typing i:nth-child(2) { animation-delay: .15s; } .pg-chat-log .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-5px); opacity: 1; } }
.pg-chat-chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 10px; }
.pg-chat-chips[hidden] { display: none; }
.pg-chat-chips button { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 12px; font: 600 .82rem var(--sans); cursor: pointer; color: var(--ink); }
.pg-chat-chips button:hover { border-color: var(--olive); color: var(--olive); }
.pg-chat-in { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--line); background: #fff; }
.pg-chat-in textarea { flex: 1; resize: none; border: 0; outline: none; font: 500 16px/1.4 var(--sans); padding: 8px 4px; max-height: 120px; background: transparent; color: var(--ink); }
.pg-chat-in button { width: 42px; height: 42px; flex: none; border-radius: 50%; border: 0; background: var(--ink); color: var(--porcelain); cursor: pointer; display: grid; place-items: center; }
.pg-chat-note { margin: 0; padding: 6px 14px 10px; font-size: .7rem; color: var(--mute); background: #fff; max-width: none; }
@media (prefers-reduced-motion: reduce) { .pg-chat-orb, .pg-chat-orb::after, .typing i { animation: none !important; } }
