.sylvie-widget {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  color: #082b42;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sylvie-widget *, .sylvie-widget *::before, .sylvie-widget *::after { box-sizing: border-box; }
.sylvie-launcher[hidden], .sylvie-panel[hidden], .sylvie-suggestions[hidden] { display: none; }

.sylvie-launcher {
  min-height: 62px;
  padding: 7px 19px 7px 9px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #fffaf0;
  background: #082b42;
  border: 1px solid rgba(217, 170, 63, .65);
  border-radius: 11px;
  box-shadow: 0 12px 32px rgba(8, 43, 66, .18);
  text-align: left;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease;
}

.sylvie-launcher:hover { background: #124261; border-color: #d9aa3f; }

.sylvie-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: block;
  overflow: hidden;
  background: #082b42;
  border: 1px solid rgba(217, 170, 63, .68);
  border-radius: 50%;
}

.sylvie-mark img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); }

.sylvie-launcher-desktop { display: grid; gap: 3px; }
.sylvie-launcher-desktop strong {
  font-size: 14px;
  font-weight: 750;
  letter-spacing: .06em;
  line-height: 1.1;
  text-transform: uppercase;
}
.sylvie-launcher-desktop small { color: rgba(255, 250, 240, .78); font-size: 12px; line-height: 1.15; }
.sylvie-launcher-mobile { display: none; }

.sylvie-panel {
  width: min(392px, calc(100vw - 28px));
  height: min(638px, calc(100dvh - 28px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fcfaf5;
  border: 1px solid rgba(8, 43, 66, .22);
  border-radius: 14px;
  box-shadow: 0 22px 56px rgba(8, 43, 66, .2);
}

.sylvie-header {
  padding: 16px 17px 14px;
  display: grid;
  grid-template-columns: 42px 1fr 30px;
  align-items: center;
  gap: 10px;
  color: #fffaf0;
  background: #082b42;
  border-bottom: 2px solid #d9aa3f;
}

.sylvie-header-mark { width: 40px; height: 40px; flex-basis: 40px; }
.sylvie-heading { display: grid; gap: 3px; }
.sylvie-heading strong { font-size: 17px; font-weight: 750; line-height: 1.15; }
.sylvie-heading small { color: rgba(255, 250, 240, .75); font-size: 11px; line-height: 1.25; }
.sylvie-close {
  width: 30px;
  height: 30px;
  padding: 0;
  color: #fffaf0;
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.sylvie-close:hover { background: rgba(255, 250, 240, .12); }
.sylvie-header p {
  grid-column: 1 / -1;
  margin: 1px 0 0;
  color: rgba(255, 250, 240, .86);
  font-size: 12px;
  line-height: 1.4;
}

.sylvie-messages {
  min-height: 0;
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.sylvie-message {
  max-width: 93%;
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.sylvie-message p { margin: 0 0 9px; }
.sylvie-message p:last-child { margin-bottom: 0; }
.sylvie-message-assistant { align-self: flex-start; background: white; border: 1px solid rgba(8, 43, 66, .13); }
.sylvie-message-visitor { align-self: flex-end; background: #e7f0f4; border: 1px solid rgba(8, 43, 66, .1); }
.sylvie-message-status { align-self: flex-start; color: #476272; font-style: italic; }
.sylvie-message-error { align-self: flex-start; color: #723e29; background: #fff1e8; border: 1px solid #e4c4ae; }
.sylvie-message a { display: inline-block; margin-top: 8px; color: #006aa8; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }

.sylvie-suggestions {
  max-height: 180px;
  padding: 0 16px 12px;
  display: grid;
  gap: 4px;
  overflow-y: auto;
}
.sylvie-suggestions button {
  padding: 6px 10px;
  color: #082b42;
  background: #fff;
  border: 1px solid rgba(8, 43, 66, .16);
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}
.sylvie-suggestions button:hover { border-color: #006aa8; background: #f2f7fa; }

.sylvie-form { padding: 11px 16px 9px; border-top: 1px solid rgba(8, 43, 66, .12); }
.sylvie-form > label { display: block; margin-bottom: 7px; color: #35505f; font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.sylvie-composer { display: flex; align-items: flex-end; gap: 6px; background: #fff; border: 1px solid rgba(8, 43, 66, .22); border-radius: 8px; }
.sylvie-composer:focus-within { border-color: #006aa8; box-shadow: 0 0 0 2px rgba(0, 106, 168, .12); }
.sylvie-composer textarea { min-width: 0; max-height: 115px; flex: 1; padding: 10px 0 10px 10px; resize: vertical; color: #082b42; background: transparent; border: 0; outline: 0; font: inherit; font-size: 13px; line-height: 1.4; }
.sylvie-composer textarea::placeholder { color: #637886; }
.sylvie-composer button { min-height: 38px; margin: 4px; padding: 0 10px; color: #fff; background: #006aa8; border: 0; border-radius: 6px; font: inherit; font-size: 12px; font-weight: 750; cursor: pointer; }
.sylvie-composer button:hover { background: #082b42; }
.sylvie-composer button:disabled, .sylvie-suggestions button:disabled { opacity: .55; cursor: wait; }
.sylvie-privacy { margin: 0; padding: 0 16px 12px; color: #59707d; font-size: 10.5px; line-height: 1.35; }
.sylvie-privacy a { color: #006aa8; text-underline-offset: 2px; }
.sylvie-widget button:focus-visible, .sylvie-widget a:focus-visible { outline: 3px solid #d9aa3f; outline-offset: 2px; }

@media (max-width: 620px) {
  .sylvie-widget { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); }
  .sylvie-launcher { min-height: 54px; padding: 6px 13px 6px 7px; }
  .sylvie-launcher .sylvie-mark { width: 38px; height: 38px; flex-basis: 38px; }
  .sylvie-launcher-desktop { display: none; }
  .sylvie-launcher-mobile { display: block; font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
  .sylvie-panel { width: calc(100vw - 24px); height: min(620px, calc(100dvh - 24px - env(safe-area-inset-bottom))); }
}

@media (prefers-reduced-motion: reduce) {
  .sylvie-launcher { transition: none; }
}
