.phs-launcher {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 160;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1rem;
  background: var(--ps-blue, #F0A500);
  color: #111;
  font: inherit;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
.phs-launcher:hover { filter: brightness(1.05); }
.phs-panel {
  position: fixed;
  right: 18px;
  bottom: 76px;
  z-index: 160;
  width: min(380px, calc(100vw - 24px));
  height: min(520px, calc(100vh - 110px));
  display: flex;
  flex-direction: column;
  background: var(--bg-card, #141414);
  color: var(--text-primary, #fff);
  border: 1px solid var(--border, #222);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.phs-panel[hidden] { display: none !important; }
.phs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.8rem 0.9rem;
  background: #111;
  border-bottom: 1px solid var(--border, #222);
}
.phs-title { font-weight: 800; font-size: 0.95rem; }
.phs-sub { font-size: 0.72rem; color: var(--text-secondary, #aaa); margin-top: 0.1rem; }
.phs-x {
  border: none;
  background: transparent;
  color: var(--text-secondary, #aaa);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
}
.phs-log {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.phs-msg {
  max-width: 88%;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  font-size: 0.86rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.phs-msg-bot { background: #1c1c1c; align-self: flex-start; }
.phs-msg-me { background: var(--ps-blue, #F0A500); color: #111; align-self: flex-end; font-weight: 650; }
.phs-msg-wait { background: #1a1408; color: #f0d48a; align-self: flex-start; font-size: 0.78rem; }
.phs-form {
  display: flex;
  gap: 0.4rem;
  padding: 0.65rem;
  border-top: 1px solid var(--border, #222);
  background: #101010;
}
.phs-input {
  flex: 1;
  min-width: 0;
  border-radius: 10px;
  border: 1px solid #333;
  background: #0c0c0c;
  color: inherit;
  font: inherit;
  font-size: 0.86rem;
  padding: 0.6rem 0.7rem;
}
.phs-send {
  border: none;
  border-radius: 10px;
  background: var(--ps-blue, #F0A500);
  color: #111;
  font: inherit;
  font-weight: 800;
  padding: 0 0.85rem;
  cursor: pointer;
}
.phs-send:disabled, .phs-input:disabled { opacity: 0.55; cursor: default; }
.phs-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
body.light-mode .phs-head,
body.light-mode .phs-form { background: #fff; }
body.light-mode .phs-msg-bot { background: #f3f4f6; color: #111; }
body.light-mode .phs-input { background: #fff; border-color: #ddd; color: #111; }

@media (max-width: 820px) {
  .phs-launcher { left: 16px; right: auto; bottom: 16px; }
  .phs-panel { left: 12px; right: 12px; width: auto; bottom: 72px; }
}
