#phd-widget, #phd-widget * { box-sizing: border-box; }

#phd-bubble {
  position: fixed; right: 20px; bottom: 20px; z-index: 9998;
  width: 58px; height: 58px; border-radius: 50%;
  background: #0a0a0a; color: #fff; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(10,10,10,.28);
  transition: transform .18s ease, box-shadow .18s ease;
}
#phd-bubble:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(10,10,10,.34); }
#phd-bubble svg { width: 26px; height: 26px; }
#phd-bubble .dot {
  position: absolute; top: 6px; right: 6px; width: 11px; height: 11px;
  border-radius: 50%; background: #d8ff3e; border: 2px solid #0a0a0a;
}

#phd-panel {
  position: fixed; right: 20px; bottom: 88px; z-index: 9999;
  width: 366px; max-width: calc(100vw - 32px);
  height: 520px; max-height: calc(100vh - 110px);
  background: #fff; border: 1px solid #e4e4e2; border-radius: 16px;
  box-shadow: 0 24px 60px rgba(10,10,10,.20);
  display: none; flex-direction: column; overflow: hidden;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
#phd-panel.open { display: flex; }

#phd-panel .head {
  background: #0a0a0a; color: #fff; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
#phd-panel .head .t { font-family: "Inter Tight", "Inter", sans-serif; font-weight: 600; font-size: 15px; line-height: 1.2; }
#phd-panel .head .s { font-size: 11px; color: #a7a7a5; margin-top: 3px; letter-spacing: .02em; }
#phd-panel .head button {
  background: transparent; border: 0; color: #a7a7a5; font-size: 22px;
  line-height: 1; cursor: pointer; padding: 0 2px;
}
#phd-panel .head button:hover { color: #fff; }

#phd-body { flex: 1; overflow-y: auto; padding: 16px; background: #f4f4f2; }
#phd-body .msg { margin-bottom: 10px; display: flex; }
#phd-body .msg.me { justify-content: flex-end; }
#phd-body .bub {
  max-width: 84%; padding: 10px 13px; border-radius: 12px;
  font-size: 13.5px; line-height: 1.5; color: #0a0a0a; background: #fff;
  border: 1px solid #e4e4e2; white-space: pre-wrap;
}
#phd-body .msg.me .bub { background: #0a0a0a; color: #fff; border-color: #0a0a0a; }
#phd-body .note { font-size: 11px; color: #8c8c8a; text-align: center; margin: 14px 0 4px; line-height: 1.5; }

#phd-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #e4e4e2; background: #fff; }
#phd-input {
  flex: 1; border: 1px solid #cbcbc8; border-radius: 10px; padding: 10px 12px;
  font-size: 13.5px; font-family: inherit; color: #0a0a0a; outline: none;
}
#phd-input:focus { border-color: #0a0a0a; }
#phd-send {
  border: 0; border-radius: 10px; background: #0a0a0a; color: #fff;
  padding: 0 14px; font-size: 13px; font-weight: 500; cursor: pointer; font-family: inherit;
}
#phd-send:hover { background: #262626; }

@media (max-width: 480px) {
  #phd-panel { right: 12px; left: 12px; width: auto; bottom: 84px; height: 68vh; }
  #phd-bubble { right: 14px; bottom: 14px; }
}
