.cw-back {
  border: 0; background: transparent; padding: 0; color: var(--ns-color-muted);
  font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: .22em;
}
.cw-launch, .cw-panel, .cw-inline { font: 400 1rem/1.45 var(--ns-font); color: var(--ns-color-ink); }
.cw-launch svg, .cw-panel svg, .cw-inline svg {
  flex: none; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.65;
  stroke-linecap: round; stroke-linejoin: round;
}
.cw-launch {
  position: fixed; z-index: 30;
  right: max(24px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 23px 0 18px; border: 1px solid rgb(255 255 255 / .45);
  border-radius: var(--ns-radius-pill); background: var(--ns-color-brand); color: white;
  font-size: 1rem; font-weight: 700; cursor: pointer; box-shadow: 0 5px 20px #38161638;
}
.cw-launch:hover { background: var(--ns-color-brand-hover); }
body:has(.cw-panel[open]) .cw-launch { visibility: hidden; }
.cw-panel {
  border: 1px solid var(--ns-color-line); border-radius: var(--ns-radius-surface);
  background: white; padding: 0; overflow: auto; overscroll-behavior: contain;
  box-shadow: 0 20px 70px #15211d30, 0 2px 10px #15211d12;
}
.cw-panel {
  position: fixed; inset: auto max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) auto;
  margin: 0; width: min(372px, calc(100vw - 32px)); max-height: calc(100dvh - 48px);
}
.cw-panel::backdrop { background: rgb(26 31 30 / .09); }
body:has(dialog[open]) { overflow: hidden; }
.cw-head { padding: 18px 24px 23px; background: var(--ns-color-ink); color: white; }
.cw-brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cw-brand img { width: 89px; height: auto; }
.cw-close {
  width: 44px; height: 44px; padding: 0; display: grid; place-items: center; flex: none;
  border: 1px solid currentColor; border-radius: var(--ns-radius-circle); color: inherit; cursor: pointer; background: transparent;
}
.cw-brand .cw-close { border-color: var(--ns-color-footer-line); color: var(--ns-color-footer-muted); }
.cw-close svg { width: 18px; height: 18px; }
.cw-head h2, .cw-inline h3 {
  margin: 0; font: 650 1.65rem/1.15 var(--ns-font); letter-spacing: var(--ns-tracking-heading);
}
.cw-head h2 { color: white; margin-top: 16px; }
.cw-body { padding: 21px 23px 19px; }
.cw-body[hidden], .cw-form [hidden] { display: none; }
.cw-callback-choice {
  display: flex; width: 100%; min-height: 52px; align-items: center; justify-content: center; gap: 11px;
  padding: 10px; border: 1px solid transparent; border-radius: var(--ns-radius-control);
  background: #dceee1; color: #285b3b; font: 700 .97rem/1.4 var(--ns-font); cursor: pointer;
}
.cw-callback-choice:hover { background: #cee5d5; }
.cw-direct { margin: 12px 0 16px; border-bottom: 1px solid var(--ns-color-line); }
.cw-direct a {
  display: flex; gap: 16px; align-items: center; min-height: 61px; padding: 7px 4px;
  text-decoration: none; color: inherit;
}
.cw-direct svg { color: var(--ns-color-muted); width: 21px; height: 21px; }
.cw-direct span { display: grid; gap: 1px; }
.cw-direct small, .cw-footnote { color: var(--ns-color-muted); font-size: .8125rem; }
.cw-direct strong { font-size: 1.06rem; font-weight: 650; }
.cw-direct a:hover strong { color: var(--ns-color-brand); text-decoration: underline; }
.cw-subtitle { margin: 0 0 10px; font: 650 .875rem/1.4 var(--ns-font); letter-spacing: 0; }
.cw-channels { display: grid; grid-template-columns: repeat(auto-fit,minmax(85px,1fr)); gap: 8px; }
.cw-tile {
  min-height: 69px; display: grid; align-content: center; justify-items: center; gap: 4px;
  border: 1px solid var(--ns-color-line); border-radius: var(--ns-radius-control);
  background: white; font: 650 .875rem/1.4 var(--ns-font); cursor: pointer; color: inherit; text-decoration: none;
}
.cw-tile:hover, .cw-tile:focus-visible { background: var(--ns-color-surface); border-color: var(--ns-color-control-border); }
.cw-tile[data-channel="vk"] svg { color: #0077ff; }
.cw-tile[data-channel="max"] svg { color: #6147d9; }
.cw-tile[data-channel="telegram"] svg { color: #238db9; }
.cw-footnote { margin-top: 10px; }
.cw-back { min-height: 44px; margin: -9px 0 8px; font-size: .875rem; }
.cw-inline {
  margin-top: 26px; max-width: 510px; padding: 22px 24px 20px;
  border: 1px solid var(--ns-color-line); border-radius: var(--ns-radius-surface);
  background: white; scroll-margin-top: 100px;
}
.cw-inline-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.cw-inline-heading svg { color: var(--ns-color-brand); }
.cw-inline h3 { font-size: 1.4rem; }
.cw-label { display: block; font-weight: 650; font-size: .875rem; margin: 0 0 7px; }
.cw-entry { display: flex; flex-wrap: wrap; gap: 8px; }
.cw-entry input, .cw-entry button {
  min-width: 0; min-height: var(--ns-control-height); border-radius: var(--ns-radius-control);
  padding: 10px 14px; font: inherit;
}
.cw-entry input {
  flex: 5 1 160px; width: 100%; border: 1px solid var(--ns-color-control-border);
  background: white; color: var(--ns-color-ink); font-size: max(1rem,16px);
}
.cw-entry input::placeholder { color: var(--ns-color-muted); }
.cw-entry button {
  flex: 3 1 auto; border: 0; background: var(--ns-color-ink); color: white;
  font-weight: 650; font-size: .9375rem; cursor: pointer;
}
.cw-entry button:hover { background: var(--ns-color-ink-hover); }
.cw-panel .cw-entry { flex-direction: column; }
.cw-panel .cw-entry > * { flex: auto; }
.cw-consent {
  display: flex; align-items: flex-start; gap: 9px; margin-top: 13px;
  color: var(--ns-color-muted); font: 400 .8125rem/1.5 var(--ns-font);
}
.cw-consent input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ns-color-brand); cursor: pointer; }
.cw-consent a { color: var(--ns-color-ink); text-decoration: underline; text-underline-offset: 2px; }
.cw-error, .cw-result { margin: 8px 0 0; font-size: .875rem; }
.cw-error { color: var(--ns-color-error); }
.cw-result { padding: 10px 12px; background: var(--ns-color-success-surface); border-radius: var(--ns-radius-control); }
@media(max-width:639px) {
  .cw-launch { min-height: 48px; right: 14px; bottom: max(14px, env(safe-area-inset-bottom)); padding: 0 17px; }
  .cw-panel {
    width: 100%; max-width: 100%; max-height: calc(100dvh - max(12px, env(safe-area-inset-top)));
    inset: auto 0 0; border: 0; border-radius: var(--ns-radius-surface) var(--ns-radius-surface) 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .cw-panel::backdrop { background: rgb(22 29 27 / .4); }
  .cw-head { padding: 15px 22px 19px; }
  .cw-head h2 { margin-top: 8px; }
  .cw-body { padding: 18px 22px; }
  .cw-inline { padding: 20px; }
  .contact-copy { display: flex; flex-direction: column; align-items: stretch; }
  .cw-inline { order: 1; }
  .cw-inline .cw-entry { flex-direction: column; }
  .cw-inline .cw-entry > * { flex: auto; }
  body:has(:is(.cw-inline, .request-form) :is(input,textarea):focus) .cw-launch { visibility: hidden; }
  .footer { padding-bottom: max(65px, env(safe-area-inset-bottom)); }
}

.cw-launch[hidden], .cw-inline[hidden] { display: none; }
.cw-form[aria-busy="true"] button { cursor: wait; }
.cw-result[data-error] { background: transparent; color: var(--ns-color-error); }
