.product-chat {
  --pc-blue: #0a62e8;
  --pc-ink: #14243b;
  --pc-line: #d8e4f2;
  --pc-muted: #50627b;
  position: fixed;
  z-index: 1035;
  inset-inline-end: max(1rem, env(safe-area-inset-right));
  inset-block-end: max(1rem, env(safe-area-inset-bottom));
  color: var(--pc-ink);
  font-size: .95rem;
  line-height: 1.5;
}
.product-chat [hidden] { display: none !important; }
.product-chat, .product-chat * { box-sizing: border-box; }
.product-chat button, .product-chat input, .product-chat select { font: inherit; }
.product-chat button { cursor: pointer; }
.product-chat button:disabled { cursor: wait; opacity: .62; }
.product-chat button:focus-visible, .product-chat a:focus-visible, .product-chat input:focus-visible, .product-chat select:focus-visible {
  outline: 3px solid #186dcc;
  outline-offset: 2px;
}
.pc-launch, .pc-send button, .pc-calc button {
  border: 0;
  background: var(--pc-blue);
  color: #fff;
  font-weight: 650 !important;
}
.pc-launch {
  display: flex;
  align-items: center;
  gap: .55rem;
  border-radius: 99px;
  padding: .8rem 1.15rem;
  box-shadow: 0 8px 24px #13395b36;
}
.pc-panel {
  width: min(26rem, calc(100vw - 2rem));
  max-height: min(43rem, calc(100vh - 2rem));
  max-height: min(43rem, calc(100dvh - 2rem));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--pc-line);
  border-radius: 1.15rem;
  background: #fff;
  box-shadow: 0 16px 52px #162d5338;
}
.pc-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .9rem 1rem;
  background: #102846;
  color: #fff;
}
.pc-header strong { display: block; font-size: 1.08rem; }
.pc-header div span { display: block; color: #cfdef1; font-size: .78rem; }
.pc-avatar { flex: none; width: 2.75rem; height: 2.75rem; border-radius: 50%; object-fit: cover; background: #b4dff5; }
.pc-icon {
  display: grid;
  place-items: center;
  width: 2.45rem;
  aspect-ratio: 1;
  border-radius: .75rem;
  color: #fff;
  background: #1465d1;
}
.pc-close { margin-inline-start: auto; border: 0; border-radius: .4rem; background: transparent; color: #fff; width: 2.25rem; font-size: 1.65rem !important; }
.pc-modes {
  display: flex;
  gap: .5rem;
  padding: .65rem .85rem;
  border-bottom: 1px solid var(--pc-line);
}
.pc-modes button, .pc-suggestions button {
  padding: .4rem .65rem;
  border: 1px solid var(--pc-line);
  border-radius: .6rem;
  background: #fff;
  color: var(--pc-ink);
  font-size: .84rem;
}
.pc-modes button[aria-pressed="true"] { background: #eaf3ff; border-color: #bbd7ff; color: #074caa; font-weight: 650; }
.pc-view { min-height: 0; }
#pc-advice { display: flex; flex-direction: column; }
.pc-history { display: flex; flex-direction: column; gap: .65rem; min-height: 4rem; height: min(19rem, 34vh); height: min(19rem, 34dvh); overflow-y: auto; padding: .85rem; }
.pc-message { align-self: flex-start; min-width: 0; max-width: 94%; overflow-wrap: anywhere; white-space: pre-wrap; padding: .65rem .75rem; border-radius: .8rem; background: #eef4fa; }
.pc-message.is-visitor { align-self: flex-end; background: #0e60d7; color: #fff; }
.pc-message.is-typing { color: var(--pc-muted); font-size: .86rem; }
.pc-links { display: flex; flex-direction: column; gap: .25rem; margin-top: .5rem; white-space: normal; }
.pc-links a, .pc-note a, .pc-guide { color: #0754b8; text-decoration: underline; }
.pc-message .pc-inline-link, .pc-calc-summary .pc-inline-link, .pc-result .pc-inline-link { color: #0754b8; text-decoration: underline; text-underline-offset: 2px; }
.pc-suggestions, .pc-send { display: flex; flex-wrap: wrap; gap: .4rem; padding: .45rem .85rem; }
.pc-send { flex-wrap: nowrap; }
.pc-send input, .pc-calc input, .pc-calc select {
  color: var(--pc-ink);
  border: 1px solid #aebfd2;
  background: #fff;
  border-radius: .55rem;
  min-width: 0;
  padding: .55rem .65rem;
  min-height: 2.65rem;
}
.pc-send input { flex: 1; }
.pc-send button { min-width: 2.7rem; border-radius: .55rem; }
.pc-note { padding: .15rem .85rem .65rem; color: var(--pc-muted); font-size: .76rem; margin: 0; }
.pc-reset { float: right; border: 0; padding: 0; background: transparent; color: #0754b8; text-decoration: underline; }
.pc-power { overflow-y: auto; padding: .9rem 1rem 1rem; }
.pc-power p { margin: 0 0 .7rem; }
.pc-calc { display: grid; grid-template-columns: minmax(0, 1fr); gap: .3rem; }
.pc-calc label { font-weight: 600; }
.pc-calc small, .pc-power .pc-example { color: var(--pc-muted); font-size: .78rem; }
.pc-power .pc-example { margin: .75rem 0 0; }
.pc-calc input, .pc-calc select { margin-bottom: .35rem; width: 100%; }
.pc-calc button { margin-top: .3rem; padding: .6rem; border-radius: .55rem; }
.pc-result:empty { display: none; }
.pc-result, .pc-calc-summary { background: #eaf3ff; border-radius: .65rem; padding: .65rem; margin-top: .65rem; white-space: normal; }
.pc-result p, .pc-calc-summary p { margin: .25rem 0; }
.pc-result small, .pc-calc-summary small { display: block; color: var(--pc-muted); }
.pc-guide { display: inline-block; margin-top: .75rem; }
.pc-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
@media (max-width: 480px) {
  .product-chat { inset-inline-end: max(.65rem, env(safe-area-inset-right)); inset-block-end: max(.65rem, env(safe-area-inset-bottom)); }
  .pc-panel { width: calc(100vw - 1.3rem); }
  .pc-send input, .pc-calc input { font-size: 1rem; }
}
