/*
 * Golden Deer — the friendly first step into consultation.
 * The external widget remains the technical owner of AI chat and messenger
 * links; this layer gives visitors a clearer, brand-native starting point.
 */
.scandi-deer {
  position: fixed;
  z-index: 2147483000;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  isolation: isolate;
  pointer-events: none;
}

.scandi-deer__button {
  position: relative;
  display: grid;
  width: 96px;
  height: 104px;
  padding: 0;
  place-items: center;
  cursor: pointer;
  border: 0;
  border-radius: 50%;
  background: transparent;
  filter: drop-shadow(0 12px 17px rgba(35, 25, 14, .3));
  isolation: isolate;
  pointer-events: auto;
  transition: transform .22s ease, filter .22s ease, opacity .18s ease;
  -webkit-tap-highlight-color: transparent;
}

/* A visible, slow golden wave makes the character feel alive and signals that
   it is an interactive element rather than a decorative sticker. */
.scandi-deer__button::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 73%;
  height: 65%;
  border-radius: 50%;
  border: 2px solid rgba(208, 145, 37, .95);
  background: rgba(228, 170, 58, .18);
  content: '';
  box-shadow: 0 0 25px rgba(202, 137, 30, .72), inset 0 0 19px rgba(255, 226, 159, .22);
  animation: scandi-deer-golden-wave 2.15s ease-out infinite;
}

.scandi-deer__button::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 88%;
  height: 78%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 221, 140, .68) 0%, rgba(218, 157, 49, .28) 43%, rgba(193, 133, 37, 0) 72%);
  content: '';
  filter: blur(7px);
  animation: scandi-deer-golden-pulse 2.15s ease-in-out infinite;
}

.scandi-deer__button:hover {
  transform: translateY(-4px) scale(1.045);
  filter: drop-shadow(0 16px 23px rgba(66, 42, 15, .42));
}

.scandi-deer__button:focus-visible {
  outline: 3px solid #e6bc6c;
  outline-offset: 5px;
}

.scandi-deer__canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 5px rgba(255, 215, 135, .28));
  animation: scandi-deer-breathe 3.4s ease-in-out infinite;
}

/* Hide the external launcher at first paint, not after our JavaScript arrives.
   The fallback class is only set if the Deer cannot mount, restoring the
   original widget instead of leaving a visitor without a contact route. */
html body.scandi-deer-enabled:not(.scandi-deer-fallback) #scandi-widget .sw-trigger,
html body.scandi-deer-enabled:not(.scandi-deer-fallback) #scandi-widget .sw-notify,
html body #scandi-widget.scandi-deer-widget-active .sw-trigger.scandi-deer-source-trigger,
html body #scandi-widget.scandi-deer-widget-active .sw-notify {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: scale(.01) !important;
}

html body.scandi-deer-enabled.scandi-deer-fallback #scandi-widget .sw-trigger,
html body.scandi-deer-enabled.scandi-deer-fallback #scandi-widget .sw-notify {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
}

/* The original chat panel takes the corner only after a visitor explicitly
   chooses the AI-chat path from the Deer panel. */
.scandi-deer.scandi-deer--legacy-open {
  pointer-events: none;
}

.scandi-deer.scandi-deer--legacy-open .scandi-deer__button,
.scandi-deer.scandi-deer--legacy-open .scandi-deer__panel {
  opacity: 0;
  transform: scale(.94);
  visibility: hidden;
}

.scandi-deer__panel {
  position: absolute;
  right: 0;
  bottom: 94px;
  box-sizing: border-box;
  display: grid;
  width: min(358px, calc(100vw - 32px));
  max-height: min(548px, calc(100vh - 132px));
  overflow: auto;
  color: #fff7e8;
  border: 1px solid rgba(234, 190, 108, .55);
  border-radius: 25px;
  background:
    radial-gradient(circle at 20% 0%, rgba(197, 142, 57, .2), transparent 36%),
    linear-gradient(145deg, #292017 0%, #17120e 62%, #100d0a 100%);
  box-shadow: 0 24px 64px rgba(19, 12, 5, .45), inset 0 1px 0 rgba(255, 238, 191, .16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(.97);
  pointer-events: none;
  transition: bottom .22s ease, opacity .22s ease, transform .22s ease, visibility .22s step-end;
}

.scandi-deer--welcome-open .scandi-deer__panel {
  bottom: 0;
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  transition: bottom .22s ease, opacity .22s ease, transform .22s ease;
}

/* The launcher becomes the character inside the panel instead of appearing a
   second time below it. Closing the panel brings the animated launcher back. */
.scandi-deer--welcome-open .scandi-deer__button {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(.88);
  pointer-events: none;
}

.scandi-deer__panel-head {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 16px 16px 14px;
  border-bottom: 1px solid rgba(239, 204, 137, .16);
  background: radial-gradient(circle at 13% 45%, rgba(240, 195, 104, .13), transparent 28%);
}

.scandi-deer__panel-canvas {
  display: block;
  width: 76px;
  height: 82px;
  border-radius: 22px;
  background: radial-gradient(circle, rgba(240, 197, 111, .16), transparent 67%);
  filter: drop-shadow(0 0 8px rgba(229, 182, 94, .32));
}

.scandi-deer__title {
  margin: 0;
  color: #fff9ef;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
}

.scandi-deer__subtitle {
  margin: 4px 0 0;
  color: rgba(255, 247, 232, .62);
  font-size: 12px;
  line-height: 1.2;
}

.scandi-deer__close,
.scandi-deer__back {
  display: inline-grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  cursor: pointer;
  color: #f9e8c7;
  border: 1px solid rgba(239, 204, 137, .18);
  border-radius: 50%;
  background: rgba(255, 255, 255, .05);
  font: inherit;
  font-size: 20px;
  line-height: 1;
  transition: background .18s ease, border-color .18s ease;
}

.scandi-deer__close:hover,
.scandi-deer__back:hover {
  border-color: rgba(239, 204, 137, .52);
  background: rgba(216, 165, 76, .16);
}

.scandi-deer__view {
  padding: 13px 14px 14px;
}

.scandi-deer__view[hidden] {
  display: none;
}

.scandi-deer__intro {
  margin: 0 2px 10px;
  color: rgba(255, 247, 232, .76);
  font-size: 14px;
  line-height: 1.45;
}

.scandi-deer__actions,
.scandi-deer__channels {
  display: grid;
  gap: 10px;
}

.scandi-deer__promise {
  display: flex;
  gap: 7px;
  margin: 0 1px 13px;
}

.scandi-deer__promise span {
  display: inline-flex;
  gap: 4px;
  align-items: baseline;
  padding: 6px 9px;
  color: rgba(255, 247, 232, .76);
  border: 1px solid rgba(239, 204, 137, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .045);
  font-size: 10.5px;
  line-height: 1;
}

.scandi-deer__promise strong {
  color: #f3cc7e;
  font-size: 12px;
  font-weight: 700;
}

.scandi-deer__action,
.scandi-deer__channel {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 58px;
  padding: 11px 43px 11px 13px;
  cursor: pointer;
  color: #fff8ea;
  border: 1px solid rgba(239, 204, 137, .17);
  border-radius: 15px;
  background: rgba(255, 255, 255, .045);
  font: inherit;
  text-align: left;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.scandi-deer__action::after,
.scandi-deer__channel::after {
  position: absolute;
  right: 15px;
  align-self: center;
  color: #e3b96e;
  content: '›';
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
}

.scandi-deer__action:hover,
.scandi-deer__channel:hover {
  border-color: rgba(239, 204, 137, .54);
  background: rgba(214, 159, 69, .13);
  transform: translateX(2px);
}

.scandi-deer__action strong,
.scandi-deer__channel strong {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.scandi-deer__action {
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-height: 66px;
  padding: 11px 42px 11px 11px;
}

.scandi-deer__action-copy { min-width: 0; }

.scandi-deer__action-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #efc46f;
  border: 1px solid rgba(239, 204, 137, .22);
  border-radius: 13px;
  background: rgba(255, 255, 255, .055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07);
}

.scandi-deer__action-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html body.scandi-deer-enabled .scandi-deer__panel .scandi-deer__action.scandi-deer__action--primary {
  min-height: 76px;
  color: #27190a !important;
  border-color: rgba(255, 225, 159, .85) !important;
  background: linear-gradient(135deg, #f7dda2 0%, #d59a35 100%) !important;
  box-shadow: 0 12px 26px rgba(172, 105, 18, .25), inset 0 1px 0 rgba(255, 255, 255, .5) !important;
}

html body.scandi-deer-enabled .scandi-deer__panel .scandi-deer__action.scandi-deer__action--primary strong { color: #241608 !important; font-size: 15px; }
html body.scandi-deer-enabled .scandi-deer__panel .scandi-deer__action.scandi-deer__action--primary small { color: rgba(48, 29, 8, .7) !important; }
html body.scandi-deer-enabled .scandi-deer__panel .scandi-deer__action.scandi-deer__action--primary::after { color: #5d3a0c !important; }
html body.scandi-deer-enabled .scandi-deer__panel .scandi-deer__action.scandi-deer__action--primary .scandi-deer__action-icon {
  color: #4b2d09;
  border-color: rgba(75, 45, 9, .18);
  background: rgba(255, 255, 255, .26);
}

html body.scandi-deer-enabled .scandi-deer__panel .scandi-deer__action.scandi-deer__action--primary:hover,
html body.scandi-deer-enabled .scandi-deer__panel .scandi-deer__action.scandi-deer__action--primary:focus-visible {
  border-color: #ffe8b6 !important;
  background: linear-gradient(135deg, #ffe9b8 0%, #dda849 100%) !important;
  transform: translateY(-1px);
}

html body.scandi-deer-enabled .scandi-deer__panel .scandi-deer__action.scandi-deer__action--estimate {
  border-color: rgba(239, 204, 137, .38) !important;
  background: radial-gradient(circle at 8% 50%, rgba(226, 175, 83, .16), transparent 25%), rgba(255, 255, 255, .07) !important;
}

.scandi-deer__quick-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

/* 24.07: компакт-вариант выравнен с большими кнопками — владелец
   отметил «две верхние большие, две нижние узкие». Метрики = базовые. */
.scandi-deer__action--compact {
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 11px;
  min-height: 66px;
  padding: 11px 42px 11px 11px;
  border-radius: 15px;
}

.scandi-deer__action--compact .scandi-deer__action-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
}

.scandi-deer__action--compact .scandi-deer__action-icon svg { width: 22px; height: 22px; }
.scandi-deer__action--compact strong { font-size: 14px; }
.scandi-deer__action--compact small { margin-top: 3px; font-size: 12px; line-height: 1.25; }
.scandi-deer__action--compact::after { right: 15px; font-size: 26px; }

.scandi-deer__action small,
.scandi-deer__channel small {
  display: block;
  margin-top: 3px;
  color: rgba(255, 247, 232, .62);
  font-size: 12px;
  line-height: 1.25;
}

.scandi-deer__footer {
  padding: 0 16px 15px;
  color: rgba(255, 240, 210, .54);
  font-size: 11px;
  letter-spacing: .01em;
  text-align: center;
}

.scandi-deer__channels-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 1px 1px 13px;
}

.scandi-deer__channels-head .scandi-deer__back {
  width: 29px;
  height: 29px;
  font-size: 24px;
}

.scandi-deer__channels-head p {
  margin: 0;
  color: rgba(255, 247, 232, .78);
  font-size: 14px;
}

/* Page templates carry their own form/widget rules. These final scoped rules
   make the Deer panel self-contained, so FAQ, SEO and mobile CSS cannot wash
   it out on a light page background. */
html body.scandi-deer-enabled .scandi-deer__panel {
  color: #fff7e8 !important;
  border-color: rgba(234, 190, 108, .62) !important;
  background-color: #1b1510 !important;
  background-image: radial-gradient(circle at 20% 0%, rgba(197, 142, 57, .24), transparent 36%), linear-gradient(145deg, #2b2118 0%, #19120d 62%, #100c09 100%) !important;
  box-shadow: 0 24px 64px rgba(19, 12, 5, .52), inset 0 1px 0 rgba(255, 238, 191, .16) !important;
  color-scheme: dark;
}

html body.scandi-deer-enabled .scandi-deer__panel-head {
  border-color: rgba(239, 204, 137, .18) !important;
  background: radial-gradient(circle at 13% 45%, rgba(240, 195, 104, .13), transparent 28%) !important;
}

html body.scandi-deer-enabled .scandi-deer__title { color: #fff9ef !important; }
html body.scandi-deer-enabled .scandi-deer__subtitle,
html body.scandi-deer-enabled .scandi-deer__intro,
html body.scandi-deer-enabled .scandi-deer__footer,
html body.scandi-deer-enabled .scandi-deer__channels-head p { color: rgba(255, 247, 232, .76) !important; }

html body.scandi-deer-enabled .scandi-deer__action,
html body.scandi-deer-enabled .scandi-deer__channel {
  color: #fff8ea !important;
  border-color: rgba(239, 204, 137, .25) !important;
  background: rgba(255, 255, 255, .075) !important;
}

html body.scandi-deer-enabled .scandi-deer__action strong,
html body.scandi-deer-enabled .scandi-deer__channel strong { color: #fff8ea !important; }
html body.scandi-deer-enabled .scandi-deer__action small,
html body.scandi-deer-enabled .scandi-deer__channel small { color: rgba(255, 247, 232, .7) !important; }
html body.scandi-deer-enabled .scandi-deer__action::after,
html body.scandi-deer-enabled .scandi-deer__channel::after { color: #e9c275 !important; }

html body.scandi-deer-enabled .scandi-deer__close,
html body.scandi-deer-enabled .scandi-deer__back {
  color: #f9e8c7 !important;
  border-color: rgba(239, 204, 137, .25) !important;
  background: rgba(255, 255, 255, .07) !important;
}

/* ── Golden Deer interaction flow ─────────────────────────────────────── */
.scandi-deer__view {
  min-height: 194px;
  padding: 14px;
}

.scandi-deer__view--entered > * {
  animation: scandi-deer-view-in .24s ease both;
}

.scandi-deer__view-top {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 1px 1px 13px;
}

.scandi-deer__view-top .scandi-deer__back {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  font-size: 24px;
}

.scandi-deer__section-title,
.scandi-deer__question {
  margin: 0;
  color: #fff8ea;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.scandi-deer__progress,
.scandi-deer__lead-copy,
.scandi-deer__legal,
.scandi-deer__form-label,
.scandi-deer__status {
  margin: 3px 0 0;
  color: rgba(255, 247, 232, .72);
  font-size: 12px;
  line-height: 1.4;
}

.scandi-deer__progress-track {
  height: 4px;
  margin: 0 1px 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
}

.scandi-deer__progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b77d2e, #f0ca7b);
  box-shadow: 0 0 12px rgba(232, 183, 91, .55);
  transition: width .24s ease;
}

.scandi-deer__question { margin: 0 2px 13px; }

.scandi-deer__options { display: grid; gap: 8px; }

.scandi-deer__option,
.scandi-deer__primary,
.scandi-deer__secondary {
  box-sizing: border-box;
  width: 100%;
  min-height: 51px;
  border: 1px solid rgba(239, 204, 137, .25);
  border-radius: 14px;
  font: inherit;
  text-align: left;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, opacity .16s ease;
}

.scandi-deer__option {
  position: relative;
  display: block;
  padding: 12px 41px 12px 14px;
  cursor: pointer;
  color: #fff8ea;
  background: rgba(255, 255, 255, .065);
}

.scandi-deer__option::after {
  position: absolute;
  top: 50%;
  right: 15px;
  color: #e9c275;
  content: '›';
  font-size: 25px;
  font-weight: 300;
  line-height: 1;
  transform: translateY(-50%);
}

.scandi-deer__option:hover,
.scandi-deer__option:focus-visible,
.scandi-deer__secondary:hover,
.scandi-deer__secondary:focus-visible {
  border-color: rgba(239, 204, 137, .58);
  background: rgba(214, 159, 69, .14);
  outline: 0;
  transform: translateX(2px);
}

.scandi-deer__option strong { font-size: 14px; line-height: 1.35; }

.scandi-deer__lead-copy { margin: 0 2px 14px; font-size: 13px; }

.scandi-deer__lead-form { display: grid; gap: 7px; }

.scandi-deer__form-label { margin: 2px 2px 0; color: rgba(255, 247, 232, .84); }

.scandi-deer__field input {
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: 46px;
  padding: 0 13px;
  color: #fff8ea;
  border: 1px solid rgba(239, 204, 137, .28);
  border-radius: 12px;
  outline: 0;
  background: rgba(255, 255, 255, .07);
  font: inherit;
  font-size: 14px;
}

.scandi-deer__field input::placeholder { color: rgba(255, 247, 232, .43); }

.scandi-deer__field input:focus {
  border-color: rgba(239, 204, 137, .78);
  box-shadow: 0 0 0 3px rgba(211, 158, 65, .15);
}

.scandi-deer__primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding: 0 14px 0 16px;
  cursor: pointer;
  color: #25180b;
  border-color: #f0c36f;
  background: linear-gradient(135deg, #f3d48d, #c89135);
  box-shadow: 0 9px 20px rgba(192, 132, 37, .2);
  font-weight: 750;
  text-decoration: none;
}

.scandi-deer__primary:hover,
.scandi-deer__primary:focus-visible {
  color: #1b1108;
  border-color: #ffe0a4;
  background: linear-gradient(135deg, #ffdfa1, #d79e42);
  outline: 0;
  transform: translateY(-1px);
}

.scandi-deer__primary span { font-size: 20px; font-weight: 400; }
.scandi-deer__primary:disabled { cursor: wait; opacity: .66; transform: none; }

.scandi-deer__legal { margin: 3px 2px 0; color: rgba(255, 247, 232, .52); font-size: 10px; }
.scandi-deer__legal a { color: #e9c275; text-underline-offset: 2px; }
.scandi-deer__status { min-height: 17px; margin: 0 2px; color: #f4cc77; }

.scandi-deer__success-mark {
  display: grid;
  width: 44px;
  height: 44px;
  margin: 8px auto 11px;
  place-items: center;
  color: #25180b;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffe5ad, #c99034);
  box-shadow: 0 0 0 7px rgba(218, 165, 74, .12), 0 8px 20px rgba(188, 128, 33, .25);
  font-size: 24px;
  font-weight: 800;
}

.scandi-deer__handoff-loader {
  display: flex;
  gap: 7px;
  justify-content: center;
  margin: 20px auto 15px;
}

.scandi-deer__handoff-loader span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #edc46f;
  box-shadow: 0 0 12px rgba(239, 196, 111, .6);
  animation: scandi-deer-handoff-dot 1.1s ease-in-out infinite;
}

.scandi-deer__handoff-loader span:nth-child(2) { animation-delay: .14s; }
.scandi-deer__handoff-loader span:nth-child(3) { animation-delay: .28s; }

.scandi-deer__section-title--success { text-align: center; }
.scandi-deer__lead-copy--center { margin-bottom: 16px; text-align: center; }

.scandi-deer__secondary {
  display: block;
  margin-top: 9px;
  cursor: pointer;
  color: #fff8ea;
  background: rgba(255, 255, 255, .06);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.scandi-deer__panel--handoff {
  opacity: .14 !important;
  pointer-events: none !important;
  transform: translateY(-6px) scale(.975) !important;
}

/* The built-in chat stays the technical chat engine, but only appears after
   the contact gate. This skin uses the same card, colours and motion as the
   Deer panel, so there is no visual jump into the old widget. */
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-panel {
  position: fixed !important;
  z-index: 2147483002 !important;
  right: max(20px, env(safe-area-inset-right)) !important;
  bottom: max(20px, env(safe-area-inset-bottom)) !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  width: min(430px, calc(100vw - 40px)) !important;
  height: min(650px, calc(100vh - 32px)) !important;
  max-height: min(650px, calc(100vh - 32px)) !important;
  overflow: hidden !important;
  color: #fff7e8 !important;
  border: 1px solid rgba(234, 190, 108, .62) !important;
  border-radius: 22px !important;
  background: radial-gradient(circle at 20% 0%, rgba(197, 142, 57, .24), transparent 36%), linear-gradient(145deg, #2b2118 0%, #19120d 62%, #100c09 100%) !important;
  box-shadow: 0 24px 64px rgba(19, 12, 5, .52), inset 0 1px 0 rgba(255, 238, 191, .16) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(12px) scale(.97) !important;
  transition: opacity .24s ease, transform .24s ease, visibility .24s step-end !important;
}

html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-panel.sw-open {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) scale(1) !important;
  transition: opacity .24s ease, transform .24s ease !important;
}

html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-header {
  display: flex !important;
  flex: 0 0 auto !important;
  gap: 10px !important;
  align-items: center !important;
  min-height: 72px !important;
  padding: 14px 16px !important;
  color: #fff8ea !important;
  border-bottom: 1px solid rgba(239, 204, 137, .16) !important;
  background: rgba(255, 255, 255, .025) !important;
}

html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-header-avatar {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  box-shadow: 0 0 12px rgba(236, 185, 91, .28) !important;
}

html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-header-brand { color: #fff9ef !important; font-size: 15px !important; font-weight: 700 !important; }
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-header-status { color: rgba(255, 247, 232, .64) !important; font-size: 11px !important; }
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-header-close { color: #f9e8c7 !important; border: 1px solid rgba(239, 204, 137, .25) !important; border-radius: 50% !important; background: rgba(255,255,255,.07) !important; }

html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-tabs {
  display: flex !important;
  flex: 0 0 auto !important;
  gap: 8px !important;
  padding: 10px 14px !important;
  border-bottom: 1px solid rgba(239, 204, 137, .13) !important;
  background: transparent !important;
}

html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-tab {
  flex: 1 1 0 !important;
  min-height: 36px !important;
  color: rgba(255, 247, 232, .7) !important;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  background: transparent !important;
  font: inherit !important;
  font-size: 12px !important;
}

html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-tab.sw-active {
  color: #291b0b !important;
  border-color: #edc46f !important;
  background: linear-gradient(135deg, #f3d48d, #c89135) !important;
}

html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-view { flex: 1 1 auto !important; min-height: 0 !important; overflow: hidden !important; background: transparent !important; }
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-messages {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  gap: 14px !important;
  padding: 18px 16px 20px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  background: transparent !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(239, 204, 137, .28) transparent !important;
}
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-messages::-webkit-scrollbar { width: 5px !important; }
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-messages::-webkit-scrollbar-thumb { background: rgba(239, 204, 137, .28) !important; border-radius: 8px !important; }
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-msg {
  width: auto !important;
  max-width: 100% !important;
  color: #fff8ea !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-msg-bot { align-self: flex-start !important; }
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-msg-user { align-self: flex-end !important; max-width: 88% !important; color: #24170a !important; }
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-msg-avatar {
  width: 30px !important;
  height: 30px !important;
  margin-top: 3px !important;
  border: 1px solid rgba(239,204,137,.38) !important;
  box-shadow: 0 3px 10px rgba(0,0,0,.2) !important;
}
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-msg-bot .sw-msg-body { flex: 0 1 auto !important; max-width: calc(100% - 40px) !important; }
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-msg-bubble {
  padding: 13px 15px !important;
  font-size: 13.5px !important;
  line-height: 1.58 !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-msg-bot .sw-msg-bubble {
  color: #fff8eb !important;
  border: 1px solid rgba(239,204,137,.22) !important;
  border-radius: 5px 16px 16px 16px !important;
  background: linear-gradient(145deg, rgba(255,255,255,.105), rgba(255,255,255,.055)) !important;
  box-shadow: 0 7px 22px rgba(0,0,0,.14) !important;
}
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-msg-user .sw-msg-bubble {
  color: #24170a !important;
  border: 1px solid rgba(255,224,157,.58) !important;
  border-radius: 16px 16px 5px 16px !important;
  background: linear-gradient(145deg, #f2cf80 0%, #d49b36 100%) !important;
  box-shadow: 0 8px 22px rgba(131,82,17,.24) !important;
}
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-msg-meta { color: rgba(255,247,232,.44) !important; padding: 0 5px !important; }
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-msg-user .sw-msg-meta { color: rgba(255,239,203,.58) !important; }
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-msg-link {
  margin: 11px 0 3px !important;
  padding: 11px 12px !important;
  color: #ffe7ad !important;
  border-color: rgba(239,196,111,.38) !important;
  background: rgba(237,196,111,.09) !important;
  box-shadow: none !important;
}
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-msg-link:hover { border-color: rgba(239,196,111,.7) !important; background: rgba(237,196,111,.14) !important; }
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-typing { gap: 10px !important; padding: 0 !important; }
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-typing-wrap {
  gap: 8px !important;
  padding: 9px 12px !important;
  color: rgba(255,247,232,.65) !important;
  border: 1px solid rgba(239,204,137,.18) !important;
  border-radius: 5px 14px 14px 14px !important;
  background: rgba(255,255,255,.065) !important;
}
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-typing-avatar { width: 30px !important; height: 30px !important; border: 1px solid rgba(239,204,137,.35) !important; }
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-typing-dots { gap: 4px !important; padding: 0 !important; border: 0 !important; background: transparent !important; }
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-typing-dots span { width: 5px !important; height: 5px !important; background: #e5ba67 !important; }
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-typing-label { color: rgba(255,247,232,.62) !important; font-size: 11px !important; }
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-input-area { flex: 0 0 auto !important; gap: 10px !important; padding: 12px 14px 14px !important; border-top: 1px solid rgba(239, 204, 137, .14) !important; background: rgba(255,255,255,.025) !important; }
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-input {
  min-height: 44px !important;
  max-height: 112px !important;
  padding: 11px 14px !important;
  color: #fff8ea !important;
  border: 1px solid rgba(239,204,137,.28) !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,.07) !important;
  line-height: 20px !important;
  overflow-y: hidden !important;
  scrollbar-width: none !important;
}
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-input::-webkit-scrollbar { display: none !important; }
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-input.sw-input-scroll { overflow-y: auto !important; scrollbar-width: thin !important; }
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-input.sw-input-scroll::-webkit-scrollbar { display: block !important; width: 4px !important; }
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-input.sw-input-scroll::-webkit-scrollbar-thumb { background: rgba(239,204,137,.28) !important; border-radius: 5px !important; }
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-input::placeholder { color: rgba(255,247,232,.44) !important; }
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-send-btn { width: 44px !important; height: 44px !important; color: #281a0b !important; background: linear-gradient(135deg, #f3d48d, #c89135) !important; box-shadow: 0 5px 13px rgba(190,131,36,.2) !important; }
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-quiz-summary { display: flex !important; flex-direction: column !important; gap: 8px !important; }
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-quiz-title { display: flex !important; align-items: center !important; gap: 7px !important; margin-bottom: 2px !important; font-size: 13px !important; font-weight: 800 !important; }
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-quiz-title::before { content: "✓"; display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 19px; border-radius: 50%; color: #2b1a08; background: rgba(255,255,255,.48); font-size: 11px; }
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-quiz-param { padding: 8px 10px !important; border: 1px solid rgba(73,43,8,.13) !important; border-radius: 10px !important; background: rgba(255,255,255,.2) !important; }
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-quiz-label { display: block !important; margin-bottom: 2px !important; color: rgba(43,26,8,.68) !important; font-size: 10.5px !important; line-height: 1.35 !important; }
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-quiz-value { display: block !important; color: #2b1a08 !important; font-size: 13px !important; font-weight: 700 !important; line-height: 1.38 !important; }
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-channels { padding: 12px !important; background: transparent !important; }
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-channel,
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-phone-section { color: #fff8ea !important; border: 1px solid rgba(239,204,137,.22) !important; border-radius: 13px !important; background: rgba(255,255,255,.065) !important; }
html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-footer { display: none !important; }

@keyframes scandi-deer-golden-wave {
  0% { opacity: .94; transform: scale(.58); }
  55% { opacity: .28; transform: scale(1.55); }
  100% { opacity: 0; transform: scale(1.54); }
}

@keyframes scandi-deer-golden-pulse {
  0%, 100% { opacity: .44; transform: scale(.72); }
  46% { opacity: 1; transform: scale(1.22); }
  66% { opacity: .65; transform: scale(.92); }
}

@keyframes scandi-deer-breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-1px) scale(1.012); }
}

@keyframes scandi-deer-view-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scandi-deer-handoff-dot {
  0%, 100% { opacity: .38; transform: translateY(0) scale(.84); }
  45% { opacity: 1; transform: translateY(-5px) scale(1.08); }
}

@media (max-width: 768px) {
  /* mobile.css deliberately hides the old launcher. Re-enable its root only
     after the Deer has taken control, otherwise the AI chat could not open. */
  html body #scandi-widget.scandi-deer-widget-active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .scandi-deer {
    right: max(11px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
  }

  .scandi-deer__button {
    width: 82px;
    height: 90px;
  }

  .scandi-deer__panel {
    bottom: 78px;
    width: min(348px, calc(100vw - 22px));
    max-height: min(530px, calc(100vh - 102px));
    border-radius: 22px;
  }

  html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-panel {
    right: max(11px, env(safe-area-inset-right)) !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    width: min(430px, calc(100vw - 22px)) !important;
    height: min(650px, calc(100vh - 20px)) !important;
    max-height: min(650px, calc(100vh - 20px)) !important;
    border-radius: 20px !important;
  }
}

@media (max-width: 480px) {
  .scandi-deer__quick-actions { grid-template-columns: minmax(0, 1fr); }

  .scandi-deer__action--compact {
    grid-template-columns: 31px minmax(0, 1fr);
    gap: 7px;
    padding-right: 20px;
  }

  .scandi-deer__action--compact .scandi-deer__action-icon { width: 30px; height: 30px; }

  html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-panel {
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-left: 0 !important;
    border-radius: 18px 18px 0 0 !important;
  }

  html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-messages { padding: 16px 12px 20px !important; }
  html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-msg-user { max-width: 92% !important; }
  html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-msg-bubble { font-size: 14px !important; }
  html body.scandi-deer-enabled #scandi-widget.scandi-deer-chat-skin .sw-input-area { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important; }
}

@media (max-width: 350px) {
  .scandi-deer__quick-actions { grid-template-columns: minmax(0, 1fr); }
  .scandi-deer__action--compact { grid-template-columns: 34px minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .scandi-deer__button,
  .scandi-deer__button:hover,
  .scandi-deer__panel,
  .scandi-deer__action,
  .scandi-deer__channel,
  .scandi-deer__option,
  .scandi-deer__primary,
  .scandi-deer__secondary {
    transition: none;
    transform: none;
  }

  .scandi-deer__button::before,
  .scandi-deer__button::after,
  .scandi-deer__canvas,
  .scandi-deer__handoff-loader span {
    animation: none;
  }
}

/* 24.07: единая высота всех вторичных кнопок панели — контент разной длины
   давал разнобой (верхние 78, нижние 64), владелец просил ровно. */
.scandi-deer__action--estimate,
.scandi-deer__action--compact { min-height: 78px; }
