.smart-chat { position: fixed; right: 18px; bottom: 18px; z-index: 1050; font-size: 16px; color: #302137; }
body:has(.hr-edit-toggle) .smart-chat { bottom: 78px; }
.smart-launch, .smart-heading button, .smart-input button { border: 0; background: #63317b; color: white; font: inherit; cursor: pointer; }
.smart-launch { border-radius: 30px; padding: 4px 16px 4px 4px; display: flex; align-items: center; gap: 6px; box-shadow: 0 3px 16px #39214b33; }
.smart-launch img { width: 48px; height: 48px; background: #f8f0fa; border-radius: 50%; object-fit: contain; }
#smart-dialog {
  position: absolute; bottom: calc(100% + 8px); right: 0;
  width: min(490px, calc(100vw - 36px)); height: min(620px, calc(100dvh - 155px));
  box-sizing: border-box; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto;
  background: white; border: 1px solid #e2d4e9; border-radius: 17px;
  box-shadow: 0 12px 40px #39214b30; overflow: hidden;
}
#smart-dialog[hidden] { display: none; }
.smart-heading { display: flex; align-items: center; justify-content: space-between; background: #542967; color: white; padding: 10px 16px; }
.smart-heading small, .smart-heading strong { display: block; }
.smart-heading button { font-size: 24px; width: 40px; border-radius: 8px; }
.smart-thread { min-height: 0; overflow: auto; padding: 16px; overscroll-behavior: contain; font-size: 17px; line-height: 1.65; }
.smart-thread p { margin: 0; font: inherit; white-space: pre-line; overflow-wrap: anywhere; color: inherit; }
.smart-thread article { margin: 12px 0 0; padding: 14px; background: #f5f1f7; border-radius: 12px; }
.smart-thread article p + p { margin-top: 8px; }
.smart-thread ol { list-style: decimal; padding-inline-start: 1.75em; margin: 8px 0; }
.smart-thread li { list-style: decimal; padding: 8px 0; }
.smart-thread li + li { border-top: 1px solid #dfd3e3; }
.smart-thread li strong { display: block; color: #532768; }
.smart-thread .smart-question { margin: 12px 0 0 auto; width: fit-content; background: #64347b; color: white; padding: 7px 12px; border-radius: 12px; }
.smart-thread small, .smart-thread details { display: block; margin-top: 10px; color: #593968; }
.smart-thread summary { cursor: pointer; }
.smart-thread a { display: block; margin-top: 8px; text-decoration: underline; color: #613275; }
.smart-prompts, .smart-input { display: flex; gap: 6px; padding: 10px; flex-wrap: wrap; }
.smart-prompts button { font: inherit; font-size: 14px; border: 1px solid #d9cce0; border-radius: 16px; padding: 5px 9px; color: #532768; background: white; }
.smart-thread:has(.smart-question) + .smart-prompts { display: none; }
.smart-input { grid-row: 4; border-top: 1px solid #e5dce9; flex-wrap: nowrap; }
.smart-input input { flex: 1; min-width: 0; padding: 8px; border: 1px solid #cfbfd8; border-radius: 8px; font: inherit; }
.smart-input button { border-radius: 8px; padding: 6px 14px; }
@media (max-width: 560px), (max-height: 450px) {
  #smart-dialog { position: fixed; inset: auto 8px 8px; width: auto; height: min(620px, calc(100dvh - 16px)); }
}
@media (prefers-reduced-motion: reduce) { .smart-launch img { display: none; } .smart-launch { padding: 12px 16px; } }
