  .hb-glass-chat {
    display: flex;
    flex-direction: column;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 340px;
    height: 460px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
    border-radius: 18px;
    background:
      radial-gradient(1100px 620px at 18% -8%, #0b1226 0%, transparent 60%),
      radial-gradient(850px 540px at 92% 108%, #120b22 0%, transparent 55%),
      #05080f;
    border: 1px solid rgba(190, 210, 255, 0.14);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    z-index: 10000;
    overflow: hidden;
  }

  /* Galaxy backdrop: star layer + soft nebula glows behind everything */
  .hb-glass-chat .hb-chat-stars {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
  }

  .hb-glass-chat .hb-chat-stars i {
    position: absolute;
    background: #cfe2ff;
    border-radius: 50%;
    opacity: .7;
    animation: hbChatTwk var(--d, 4s) ease-in-out infinite;
  }

  @keyframes hbChatTwk {
    0%, 100% { opacity: .10; }
    50%      { opacity: .85; }
  }

  .hb-glass-chat .hb-chat-stars .neb {
    position: absolute;
    border-radius: 50%;
    filter: blur(55px);
    opacity: .10;
  }

  @media (prefers-reduced-motion: reduce) {
    .hb-glass-chat .hb-chat-stars i { animation: none; opacity: .35; }
  }

  .hb-glass-chat .hb-chat-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(190, 210, 255, 0.12);
    backdrop-filter: blur(14px) saturate(1.35);
    -webkit-backdrop-filter: blur(14px) saturate(1.35);
  }

  .hb-glass-chat .hb-chat-title {
    color: #fff;
    font-weight: 700;
    font-size: 14px;
  }

  .hb-glass-chat .hb-chat-title i {
    color: #e5c158;
    margin-right: 8px;
    text-shadow: 0 0 10px rgba(229, 193, 88, 0.45);
  }

  .hb-glass-chat .hb-chat-close {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background .25s;
  }

  .hb-glass-chat .hb-chat-close:hover {
    background: rgba(255, 255, 255, 0.18);
  }

  .hb-glass-chat .hb-chat-head-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  .hb-glass-chat .hb-chat-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* small glass back button — returns to the conversations inbox */
  .hb-glass-chat .hb-chat-back {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
    transition: background .25s, border-color .25s;
  }

  .hb-glass-chat .hb-chat-back:hover {
    background: rgba(229, 193, 88, 0.22);
    border-color: rgba(229, 193, 88, 0.45);
  }

  .hb-glass-chat .hb-chat-messages {
    position: relative;
    z-index: 1;
    flex: 1;
    overflow-y: auto;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  /* liquid-glass bubbles: translucent blur over the galaxy backdrop,
     a top "wet" highlight sheen, and a soft glow hugging the border */
  .hb-glass-chat .hb-bubble {
    position: relative;
    max-width: 80%;
    font-size: 13.5px;
    line-height: 1.55;
    padding: 10px 14px;
    border-radius: 18px;
    color: #eef2fb;
    word-break: break-word;
    backdrop-filter: blur(14px) saturate(1.35);
    -webkit-backdrop-filter: blur(14px) saturate(1.35);
    overflow: hidden;
  }

  .hb-glass-chat .hb-bubble::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
      radial-gradient(130% 65% at 18% -8%, rgba(255, 255, 255, 0.13), transparent 55%),
      radial-gradient(90% 45% at 85% 110%, rgba(255, 255, 255, 0.05), transparent 60%);
  }

  /* SENT bubble — warm gold glass */
  .hb-glass-chat .hb-bubble.self {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(229, 193, 88, 0.20), rgba(229, 193, 88, 0.05) 60%, rgba(229, 193, 88, 0.13));
    border: 1px solid rgba(229, 193, 88, 0.48);
    border-bottom-right-radius: 6px;
    box-shadow:
      0 0 16px rgba(229, 193, 88, 0.20),
      0 8px 24px rgba(0, 0, 0, 0.35),
      inset 0 1px 0 rgba(255, 232, 170, 0.25);
    color: #f6efdc;
  }

  /* RECEIVED bubble — glass glowing in the sender's own accent color (--pc) */
  .hb-glass-chat .hb-bubble.other {
    align-self: flex-start;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--pc, #4aa9ff) 15%, transparent),
        rgba(255, 255, 255, 0.02) 55%,
        color-mix(in srgb, var(--pc, #4aa9ff) 8%, transparent));
    border: 1px solid color-mix(in srgb, var(--pc, #4aa9ff) 45%, transparent);
    border-bottom-left-radius: 6px;
    box-shadow:
      0 0 16px color-mix(in srgb, var(--pc, #4aa9ff) 24%, transparent),
      0 8px 24px rgba(0, 0, 0, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.16);
  }

  .hb-glass-chat .hb-chat-form {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid rgba(190, 210, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(14px) saturate(1.35);
    -webkit-backdrop-filter: blur(14px) saturate(1.35);
  }

  .hb-glass-chat .hb-chat-input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(190, 210, 255, 0.20);
    background: rgba(9, 14, 26, 0.55);
    color: #fff;
    font-size: 13px;
    outline: none;
    transition: border-color .25s, box-shadow .25s;
  }

  .hb-glass-chat .hb-chat-input::placeholder { color: #93a1b8; }

  .hb-glass-chat .hb-chat-input:focus {
    border-color: rgba(229, 193, 88, 0.55);
    box-shadow: 0 0 12px rgba(229, 193, 88, 0.18);
  }

  .hb-glass-chat .hb-chat-send {
    background: linear-gradient(135deg, #d4af37 0%, #ebd8b0 100%);
    color: #0b1120;
    border: none;
    border-radius: 12px;
    width: 42px;
    cursor: pointer;
    box-shadow: 0 0 14px rgba(229, 193, 88, 0.35);
    transition: transform .2s, box-shadow .25s;
  }

  .hb-glass-chat .hb-chat-send:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 20px rgba(229, 193, 88, 0.5);
  }

  /* Conversations inbox — same glass shell, liquid-glass thread cards */
  #guestConversationsPanel.hb-glass-chat {
    bottom: 158px;
    width: 320px;
    height: 420px;
    max-height: calc(100vh - 200px);
    z-index: 9999;
  }

  .hb-glass-chat .hb-conv-list {
    position: relative;
    z-index: 1;
    flex: 1;
    overflow-y: auto;
    padding: 10px;
  }

  .hb-glass-chat .hb-conv-item {
    position: relative;
    padding: 12px;
    border-radius: 14px;
    margin-bottom: 8px;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(148, 178, 255, 0.08), rgba(255, 255, 255, 0.02) 55%, rgba(148, 178, 255, 0.05));
    border: 1px solid rgba(190, 210, 255, 0.16);
    backdrop-filter: blur(14px) saturate(1.35);
    -webkit-backdrop-filter: blur(14px) saturate(1.35);
    overflow: hidden;
    transition: border-color .25s, box-shadow .25s;
  }

  .hb-glass-chat .hb-conv-item::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(130% 65% at 18% -8%, rgba(255, 255, 255, 0.10), transparent 55%);
  }

  .hb-glass-chat .hb-conv-item:hover {
    border-color: rgba(229, 193, 88, 0.45);
    box-shadow: 0 0 14px rgba(229, 193, 88, 0.16);
  }
