.shop-advisor {
  --advisor-ink: #20362c;
  --advisor-gold: #d7bd87;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 120;
  color: #28372e;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0;
}
.shop-advisor button, .shop-advisor input { font-family: inherit; }
.advisor-launch {
  display: flex;
  align-items: center;
  gap: 11px;
  background: #fcfbf7;
  color: var(--advisor-ink);
  border: 1px solid #e1dacb;
  border-radius: 30px;
  padding: 9px 19px 9px 9px;
  box-shadow: 0 4px 20px #15281e12, 0 1px 3px #15281e0a;
  font-weight: 500;
  font-size: 14px;
  transition: box-shadow .2s, transform .2s;
}
.advisor-launch:hover { box-shadow: 0 7px 26px #15281e20; transform: translateY(-2px); }
.advisor-launch-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: var(--advisor-ink);
  color: #ead7ae;
  border-radius: 50%;
}
.advisor-launch-icon svg { width: 19px; height: 19px; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.advisor-panel {
  position: absolute;
  right: 0;
  bottom: 70px;
  width: 350px;
  max-width: calc(100vw - 32px);
  height: 510px;
  max-height: calc(100dvh - 118px);
  display: flex;
  flex-direction: column;
  background: #f8f7f2;
  border: 1px solid #e4dfd2;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 32px #15271f18, 0 2px 6px #15271f08;
}
.advisor-panel[hidden] { display: none; }
.advisor-panel .advisor-header {
  position: static;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  height: auto;
  min-height: 68px;
  padding: 14px 17px;
  background: linear-gradient(120deg, #1d3228, #344b3d);
  border: 0;
  border-bottom: 1px solid #d7bd8780;
  box-shadow: none;
}
.advisor-identity { display: flex; align-items: center; gap: 11px; }
.advisor-monogram {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid #d7bd875c;
  border-radius: 10px;
  background: #ffffff08;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1px;
  color: #f0dfba;
}
.advisor-monogram span { position: absolute; right: -5px; top: -10px; font-size: 15px; color: #dfc591; }
.advisor-header h2 { color: #fcfaf4; font-size: 18px; font-weight: 500; line-height: 1.3; letter-spacing: -.4px; margin: 0; }
.advisor-close { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid #ffffff26; border-radius: 50%; background: #ffffff05; color: #eee8da; font-size: 21px; font-weight: 300; line-height: 1; padding: 0 0 2px; }
.advisor-close:hover { background: #ffffff15; }
.advisor-messages { flex: 1; overflow: auto; padding: 17px 16px 10px; min-height: 90px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #d9dbd0 transparent; }
.advisor-message { margin: 0 12px 16px 0; background: #fffefa; border: 1px solid #e8e5da; border-radius: 5px 17px 17px 17px; padding: 12px 14px; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; box-shadow: 0 2px 5px #20362c04; }
.advisor-message.user { margin-left: 30px; margin-right: 0; border-color: transparent; background: #e8ede6; color: #263d30; border-radius: 17px 5px 17px 17px; }
.advisor-speaker { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; color: #82775e; }
.advisor-message p { margin: 7px 0 0; white-space: pre-wrap; }
.advisor-product { display: block; margin-top: 12px; padding: 12px; background: #f6f7f1; border: 1px solid #e1e4d8; border-radius: 10px; color: #263d30; text-decoration: none; transition: border-color .2s; }
.advisor-product:hover { border-color: #9cae93; }
.advisor-product strong, .advisor-product span { display: block; }
.advisor-product strong { font-size: 13px; font-weight: 600; line-height: 1.5; }
.advisor-product span { font-size: 12px; color: #66725e; margin-top: 4px; line-height: 1.5; }
.advisor-status { font-size: 11px; line-height: 1.4; color: #747c6b; padding: 0 20px; margin: 0 0 9px; min-height: 0; }
.advisor-status:empty { display: none; }
.advisor-form { padding: 14px 20px 0; border-top: 1px solid #e7e3d8; }
.advisor-form label { display: block; font-size: 12px; font-weight: 500; color: #53604e; margin: 0 0 8px; }
.advisor-form>div { display: flex; gap: 8px; }
.advisor-form input { min-width: 0; flex: 1; border: 1px solid #dedfd3; border-radius: 12px; padding: 12px; font-size: 14px; line-height: 1.5; background: #fffefa; color: #28372e; }
.advisor-form input::placeholder { color: #8b9082; }
.advisor-form button { flex: 0 0 44px; border: 1px solid #345240; border-radius: 12px; background: var(--advisor-ink); color: #e8d5ab; font-size: 23px; line-height: 1; }
.advisor-form button:disabled { opacity: .5; }
.advisor-note { font-size: 11px; line-height: 1.6; color: #78806e; margin: 10px 20px 5px; }
.advisor-note a { color: #526345; text-decoration: underline; text-underline-offset: 2px; }
.advisor-reset { align-self: flex-start; border: 0; background: transparent; font-size: 11px; color: #748168; margin: 0 20px 14px; padding: 3px 0; text-decoration: underline; text-underline-offset: 3px; }
.shop-advisor button:focus-visible, .shop-advisor a:focus-visible, .shop-advisor input:focus-visible { outline: 2px solid #b59d68; outline-offset: 3px; }
@media (max-width: 600px) {
  html.advisor-open, html.advisor-open body { overflow: hidden; overscroll-behavior: none; }
  .shop-advisor { right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); }
  .advisor-launch { min-height: 48px; gap: 9px; padding: 7px 14px 7px 7px; font-size: 12px; box-shadow: 0 5px 20px #15281e1c; }
  .advisor-launch-icon { width: 34px; height: 34px; }
  .advisor-panel {
    position: fixed;
    inset: auto 10px max(10px, env(safe-area-inset-bottom));
    width: auto;
    max-width: none;
    height: min(620px, calc(100dvh - 28px));
    max-height: calc(100dvh - 20px);
    border: 1px solid #e4dfd2;
    border-radius: 20px;
    box-shadow: 0 14px 50px #15271f2b, 0 2px 8px #15271f12;
  }
  .advisor-panel.is-mobile-positioned { top: var(--advisor-mobile-top); bottom: auto; height: var(--advisor-mobile-height); }
  .advisor-panel .advisor-header { min-height: 58px; padding: 9px 14px; }
  .advisor-header h2 { font-size: 17px; }
  .advisor-monogram { width: 32px; height: 32px; flex-basis: 32px; }
  .advisor-close { width: 42px; height: 42px; flex: 0 0 42px; font-size: 26px; }
  .advisor-messages { padding: 13px 12px 7px; scroll-padding-bottom: 12px; }
  .advisor-message { margin: 0 26px 12px 0; padding: 11px 13px; font-size: 14px; line-height: 1.6; }
  .advisor-message.user { margin-left: 34px; }
  .advisor-product { padding: 11px; }
  .advisor-status { padding: 0 14px; margin-bottom: 6px; }
  .advisor-form { flex: 0 0 auto; padding: 10px 12px 0; background: #f8f7f2; }
  .advisor-form label { margin-bottom: 5px; font-size: 11px; }
  .advisor-form>div { gap: 7px; }
  .advisor-form input { min-height: 48px; padding: 11px 13px; font-size: 16px; border-radius: 11px; }
  .advisor-form button { flex-basis: 48px; min-height: 48px; border-radius: 11px; }
  .advisor-note { margin: 7px 14px 2px; font-size: 9px; line-height: 1.4; }
  .advisor-reset { min-height: 31px; margin: 0 14px max(5px, env(safe-area-inset-bottom)); font-size: 10px; }
  html.advisor-keyboard .advisor-note { display: none; }
  html.advisor-keyboard .advisor-reset { margin-top: 2px; }
}
@media (prefers-reduced-motion: reduce) { .shop-advisor * { transition: none; } }

.advisor-typing { width: fit-content; min-width: 85px; }
.advisor-typing-dots { display: flex; align-items: center; gap: 5px; height: 23px; margin-top: 8px; }
.advisor-typing-dots i { display: block; width: 6px; height: 6px; border-radius: 50%; background: #78866e; animation: advisor-typing-pulse 1.25s ease-in-out infinite; }
.advisor-typing-dots i:nth-child(2) { animation-delay: .16s; }
.advisor-typing-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes advisor-typing-pulse { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .advisor-typing-dots i { animation: none; opacity: .65; } }
