#pz-chat-root {
  position: fixed;
  right: var(--sp-5, 1.5rem);
  bottom: var(--sp-5, 1.5rem);
  z-index: 190;
  font-family: var(--font-sans);
}

#pz-chat-bubble {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: var(--primary, #194a37);
  color: var(--cream, #faf6ee);
  box-shadow: var(--shadow-lg, 0 20px 50px rgba(15,45,32,.14));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: transform .2s ease, background .2s ease;
}

#pz-chat-bubble:hover {
  background: var(--primary-light, #2a6b52);
  transform: translateY(-2px);
}

#pz-chat-bubble svg {
  width: 26px;
  height: 26px;
}

#pz-chat-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent, #c9a961);
  border: 2px solid var(--cream, #faf6ee);
}

#pz-chat-panel {
  position: absolute;
  bottom: 74px;
  right: 0;
  width: 340px;
  max-width: calc(100vw - 2rem);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: var(--white, #fff);
  border-radius: var(--radius-lg, 18px);
  box-shadow: var(--shadow-lg, 0 20px 50px rgba(15,45,32,.14));
  overflow: hidden;
}

#pz-chat-panel[hidden] {
  display: none;
}

.pz-chat-header {
  background: var(--primary-dark, #0f2d20);
  color: var(--cream, #faf6ee);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pz-chat-header strong {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.05rem;
  display: block;
}

.pz-chat-header span {
  display: block;
  font-size: .78rem;
  color: var(--accent-light, #e0c88a);
  margin-top: 2px;
}

.pz-chat-header button {
  background: none;
  border: none;
  color: var(--cream, #faf6ee);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
}

#pz-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 180px;
  background: var(--off-white, #f5f1e8);
}

.pz-msg {
  display: flex;
  flex-direction: column;
  max-width: 82%;
}

.pz-msg-in {
  align-self: flex-start;
  align-items: flex-start;
}

.pz-msg-out {
  align-self: flex-end;
  align-items: flex-end;
}

.pz-msg-label {
  font-size: .72rem;
  color: var(--gray-500, #7a7a7a);
  margin-bottom: 3px;
  padding: 0 4px;
}

.pz-msg-bubble {
  padding: 9px 13px;
  border-radius: var(--radius, 10px);
  font-size: .92rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.pz-msg-in .pz-msg-bubble {
  background: var(--white, #fff);
  color: var(--ink, #1c1c1c);
  border-bottom-left-radius: 3px;
}

.pz-msg-out .pz-msg-bubble {
  background: var(--primary, #194a37);
  color: var(--cream, #faf6ee);
  border-bottom-right-radius: 3px;
}

#pz-chat-precontent {
  border-top: 1px solid var(--gray-200, #e6e2d8);
  background: var(--white, #fff);
}

#pz-chat-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
}

#pz-chat-form input {
  border: 1px solid var(--gray-300, #c9c9c9);
  border-radius: var(--radius-sm, 4px);
  padding: 10px 12px;
  font-family: var(--font-sans);
  font-size: .9rem;
}

#pz-chat-form button {
  background: var(--accent, #c9a961);
  color: var(--primary-darker, #0a1f16);
  border: none;
  border-radius: var(--radius-sm, 4px);
  padding: 10px 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s ease;
}

#pz-chat-form button:hover {
  background: var(--accent-dark, #a68949);
}

.pz-chat-error {
  color: var(--danger, #c14444);
  font-size: .8rem;
}

.pz-chat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
}

.pz-chat-input-row input {
  flex: 1;
  border: 1px solid var(--gray-300, #c9c9c9);
  border-radius: 20px;
  padding: 9px 14px;
  font-family: var(--font-sans);
  font-size: .9rem;
}

.pz-chat-input-row button {
  background: var(--primary, #194a37);
  color: var(--cream, #faf6ee);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 1rem;
}

.pz-chat-input-row button:hover {
  background: var(--primary-light, #2a6b52);
}

@media (max-width: 480px) {
  #pz-chat-panel {
    width: calc(100vw - 2rem);
    bottom: 72px;
  }
}
