:root {
  color-scheme: light;
  --ink: #231a38;
  --muted: #675d79;
  --purple: #6239ca;
  --purple-dark: #4d26ad;
  --line: #e9e2f4;
  --surface: #fff;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { background: #f8f6fc; color: var(--ink); }
body { font-family: "Segoe UI", system-ui, sans-serif; line-height: 1.5; }
button, select, textarea { font: inherit; }
button:not(:disabled), select { cursor: pointer; }
a { color: var(--purple-dark); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid #8559ec; outline-offset: 3px; }

#wrapper, #contacts-send-form {
  max-width: 1160px;
  width: calc(100% - 48px);
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 23px 0;
}
.brand, .voice-link { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand { color: var(--ink); font-weight: 800; font-size: 25px; letter-spacing: -.055em; }
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--purple);
  color: #fff;
  font-size: 17px;
  letter-spacing: 0;
}
.voice-link { font-size: 14px; font-weight: 700; padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; }
.voice-link:hover { background: #eee7fa; }
.lobby {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 24px 65px #38245912;
}
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  padding: clamp(26px, 5vw, 62px);
  background: radial-gradient(ellipse at 84% 86%, #d5baff 0, transparent 52%), linear-gradient(150deg, #eee4ff, #e3d5fb);
  overflow: hidden;
}
.hero h1 { font-size: clamp(44px, 6vw, 82px); line-height: .96; letter-spacing: -.075em; margin: 0 0 23px; }
.hero h1 span { display: block; color: var(--purple-dark); }
.hero p { max-width: 29ch; margin: 0; color: #514365; font-size: 18px; }
#statistic { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
#statistic span.counter { border: 1px solid #bba2e1; border-radius: 999px; padding: 4px 11px; font-size: 14px; color: #483660; }
#statistic .counter:has(b:empty) { display: none; }
.hero-art { position: relative; flex: 1; min-height: 205px; margin-top: 21px; }
.hero-art::before, .hero-art::after {
  content: "";
  position: absolute;
  border: 1px solid #9570d758;
  border-radius: 50%;
  width: 220px;
  height: 160px;
  left: 50%;
  top: 54%;
  transform: translate(-50%, -50%) rotate(-24deg);
}
.hero-art::after { width: 285px; height: 205px; }
.bubble {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  border-radius: 28px;
  box-shadow: 0 18px 34px #4b257b38;
  font-weight: 850;
  letter-spacing: -.06em;
}
.bubble::after { content: ""; position: absolute; bottom: -7px; width: 22px; height: 22px; background: inherit; border-radius: 4px; transform: skewY(-32deg); }
.bubble-hello { width: 160px; height: 87px; top: 25%; left: calc(50% - 130px); transform: rotate(-12deg); background: #fff; font-size: 31px; color: #4d26ad; }
.bubble-hello::after { left: 22px; }
.bubble-reply { width: 140px; height: 81px; top: 49%; left: calc(50% + 4px); transform: rotate(11deg); background: #6135c7; color: #fff; font-size: 28px; }
.bubble-reply::after { right: 21px; transform: skewY(32deg); }
.spark { position: absolute; z-index: 1; font-size: 29px; color: var(--purple-dark); right: 15%; top: 16%; }

#search-container { padding: clamp(24px, 4vw, 49px); height: auto; max-width: none; text-align: left; }
#search-container h2 { margin: 0 0 22px; font-size: clamp(24px, 3vw, 34px); line-height: 1.12; letter-spacing: -.045em; }
.search-item { margin: 0 0 17px; min-width: 0; }
.search-item .question { color: var(--ink); font-size: 15px; font-weight: 650; margin: 0 0 8px; }
.segment-group { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 4px; padding: 4px; border-radius: 13px; background: #f3eff9; }
.search-item .option {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 10px;
  padding: 7px 4px;
  margin: 0;
  min-height: 40px;
  font-size: 14px;
}
.search-item .option:hover { color: var(--purple-dark); }
.search-item .option.selected { background: #fff; border-color: #dbccf5; color: var(--purple-dark); font-weight: 700; box-shadow: 0 2px 5px #3824590e; }
.search-item .slider { margin: 28px 13px 23px; }
.noUi-target { border: 0; border-radius: 999px; background: #ece4f7; box-shadow: none; }
.noUi-horizontal { height: 7px; }
.noUi-connect { border-radius: inherit; background: #9569ed; box-shadow: none; }
.noUi-horizontal .noUi-handle { width: 24px; height: 24px; top: -8px; left: -12px; border: 2px solid #7145d1; border-radius: 50%; box-shadow: 0 2px 5px #44248132; cursor: grab; }
.noUi-handle::before, .noUi-handle::after { display: none; }
.noUi-horizontal .noUi-tooltip { bottom: 110%; color: var(--purple-dark); background: #f2ebfc; border: 0; border-radius: 6px; padding: 0 5px; font-size: 12px; }
.distance { width: 100%; min-height: 44px; padding: 7px 13px; color: var(--ink); background: #fff; border: 1px solid #dcd1ed; border-radius: 12px; }
#search-container .start-search, #send-msg-button {
  border: 0;
  border-radius: 13px;
  background: var(--purple);
  color: #fff;
  font-size: 16px;
  font-weight: 750;
}
#search-container .start-search { width: 100%; min-height: 50px; margin: 0; }
#search-container .start-search:hover, #send-msg-button:not(:disabled):hover { background: var(--purple-dark); }
#banner_top { align-self: center; max-width: 100%; }
#banner_top:empty { display: none; }

#footer { gap: 10px 18px; margin: 22px 0 28px; }
#footer a { margin: 0; color: var(--muted); font-size: 14px; text-decoration: none; }
#footer a:hover { color: var(--purple-dark); text-decoration: underline; }
#contacts-send-form {
  height: auto;
  margin: 0 auto 30px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 24px;
  padding: clamp(20px, 4vw, 40px);
}
#contacts-send-form h2 { margin: 0 0 10px; letter-spacing: -.035em; font-size: 29px; }
#contacts-send-form > p { color: var(--muted); margin: 0 0 14px; }
#contacts-send-form details { border-top: 1px solid var(--line); scroll-margin-top: 20px; }
#contacts-send-form summary { cursor: pointer; padding: 13px 0; font-weight: 650; }
#contacts-send-form details p { color: var(--muted); margin: 0 0 15px; max-width: 78ch; }

#chat-container { width: 100%; max-width: 840px; height: auto; min-height: 0; flex: 1; margin: 0 auto 16px; padding: 12px; border: 1px solid var(--line); border-radius: 22px; background: #fff; }
#chat-container-buttons { flex-wrap: wrap; align-items: center; gap: 6px; height: auto; }
#chat-container button.action { min-height: 40px; padding: 6px 11px; border: 1px solid #ddd1f0; border-radius: 10px; color: var(--purple-dark); background: #f6f0ff; font-size: 14px; }
#chat-container button.action:hover { background: #eadcfc; }
#chat-container button.negative { color: #a3264c; background: #fff1f5; border-color: #f6d8e3; }
#messages { min-height: 0; flex: 1; height: auto; padding: 10px; border: 1px solid var(--line); border-radius: 15px; background: #f9f6fd; }
.msg { margin: 0; gap: 6px; align-items: center; }
.msg span.delived, .msg span.nondelived { flex: 0 0 12px; margin: 0; }
.msg span.nondelived { min-height: 15px; background-size: contain; }
.msg span.msg-text { min-width: 0; width: auto; max-width: min(78%, 58ch); padding: 7px 12px; margin: 0; overflow-wrap: anywhere; }
.msg span.atTime { width: auto; margin-left: auto; color: var(--muted); font-size: 12px; }
.msg .mp_MY { background: #eadfff; }
.msg .mp_HIS { background: #fff; border: 1px solid var(--line); }
.msg .mp_SYSTEM { color: var(--muted); }
#send-msg-container { height: auto; gap: 8px; padding: 10px 0 0; }
#send-msg { min-width: 0; min-height: 48px; resize: vertical; border: 1px solid #dcd1ed; border-radius: 12px; padding: 9px 11px; }
#send-msg-button { display: grid; place-items: center; width: auto; padding: 8px 12px; margin: 0; }
#send-msg-button:disabled { opacity: .6; }
.loader-popup { z-index: 2; pointer-events: none; top: 42%; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); min-height: 0; padding: 18px 24px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 12px 30px #38245923; font-weight: 700; }
.loader { margin: 13px auto 0; width: 24px; height: 24px; border: 3px solid #e8dcfb; border-top-color: var(--purple); animation: spin .85s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 720px) {
  #wrapper, #contacts-send-form { width: calc(100% - 24px); }
  .site-header { padding: 14px 0; }
  .lobby { grid-template-columns: 1fr; border-radius: 22px; }
  .hero { padding: 25px; }
  .hero h1 { margin-bottom: 12px; }
  .hero h1 span { display: inline; }
  .hero p { font-size: 16px; }
  #statistic { margin-top: 12px; }
  .hero-art { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .loader { animation: none; }
}

.interior-shell {
  width: calc(100% - 48px);
  max-width: 960px;
  margin: 0 auto;
}
.section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.section-nav a {
  padding: 7px 12px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
}
.section-nav a:hover, .section-nav a[aria-current="page"] {
  color: var(--purple-dark);
  background: #ebe0fa;
}
.interior #contacts-send-form {
  max-width: 960px;
  padding: clamp(22px, 5vw, 56px);
  overflow-wrap: anywhere;
}
.interior h1 {
  margin: 0 0 22px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.05;
  letter-spacing: -.055em;
}
.interior #contacts-send-form h2 { font-size: clamp(20px, 3vw, 25px); margin: 20px 0 10px; }
.interior #contacts-send-form > div + div { margin-top: 14px; }
.interior li + li { margin-top: 8px; }
.interior li::marker { color: var(--purple); font-weight: 750; }
.interior li span { color: var(--muted); }
.interior #contacts-send-form label { display: block; margin-bottom: 5px; color: var(--ink); font-weight: 650; }
.interior #contacts-send-form > span { margin-bottom: 18px; color: var(--muted); }
.interior #contacts-send-form input[type="text"], .interior #contacts-send-form textarea {
  width: min(100%, 550px);
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #dcd1ed;
  border-radius: 12px;
  color: var(--ink);
  background: #fcfbff;
  font: inherit;
}
.interior #contacts-send-form textarea { min-height: 115px; resize: vertical; }
#contact-send-button {
  padding: 10px 20px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--purple);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}
#contact-send-button:hover { background: var(--purple-dark); }
.news-item { border-top: 1px solid var(--line); padding: 16px 0 0; }
.interior #contacts-send-form .news-item h2 { margin-top: 7px; }
.news-item .date { color: var(--purple-dark); font-size: 14px; font-weight: 700; }
.news-body { color: var(--muted); }
#coomeet_container {
  width: min(100%, 700px);
  min-height: min(580px, 80vh);
  margin: 0 auto;
  border-radius: 16px;
  background: #f5effc;
  overflow: hidden;
}
#coomeet_container iframe { max-width: 100%; }
.chat-variant .hero h1 { font-size: clamp(37px, 5vw, 68px); overflow-wrap: anywhere; }
.chat-variant .search-item span.option { display: grid; place-items: center; }
.chat-variant #contacts-send-form .q { color: var(--ink); font-weight: 700; }
.chat-variant #contacts-send-form .a { color: var(--muted); }
.chat-variant #contacts-send-form h3 { margin: 0 0 12px; font-size: 26px; }

@media (max-width: 720px) {
  .interior-shell { width: calc(100% - 24px); }
  .interior .site-header, .chat-variant .site-header { padding: 9px 0; }
  .interior .site-header a, .chat-variant .site-header a { min-height: 44px; }
  .interior .voice-link, .chat-variant .voice-link { padding-inline: 12px; text-align: center; }
  .section-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 12px;
  }
  .section-nav a {
    display: grid;
    place-items: center;
    min-height: 44px;
    padding: 5px 2px;
    background: #f0eaf8;
    text-align: center;
  }
  .interior #contacts-send-form { padding: 18px 16px; border-radius: 18px; }
  .interior h1 { margin-bottom: 16px; }
  .interior :is(ul, ol) { padding-inline-start: 22px; }
  .interior #contacts-send-form input[type="text"], .interior #contacts-send-form textarea {
    width: 100%;
    font-size: 16px;
  }
  #contact-send-button { width: 100%; min-height: 44px; }
  .interior #contacts-send-form.video-page { padding: 16px 10px 10px; }
  .video-page h1 { padding-inline: 6px; }
  #coomeet_container { min-height: min(580px, 75svh); }
  .chat-variant .hero, .chat-variant #search-container { padding: 18px 16px; }
  .chat-variant .hero h1 {
    font-size: clamp(32px, 7vw, 45px);
    line-height: 1.04;
    overflow-wrap: normal;
  }
  .chat-variant #search-container h2 { margin-bottom: 16px; }
  .chat-variant .search-item { margin-bottom: 15px; }
  .chat-variant .search-item .option { min-height: 44px; }
  .chat-variant .search-item .slider { margin-inline: 16px; }
  .chat-variant .noUi-horizontal .noUi-handle { width: 32px; height: 32px; top: -12px; left: -16px; }
  .chat-variant #chat-container { padding: 8px; margin-bottom: 8px; border-radius: 16px; }
  .chat-variant #chat-container button.action { min-height: 44px; }
  .chat-variant #send-msg { font-size: 16px; }
  .chat-variant #footer a { display: inline-flex; align-items: center; min-height: 44px; }
  .chat-variant #footer { gap: 0 15px; margin-block: 10px 16px; }
  .chat-variant #contacts-send-form { padding: 18px 16px; overflow-wrap: anywhere; }
  .chat-variant #contacts-send-form ul { padding-inline-start: 22px; }
  .chat-variant #contacts-send-form li a { display: inline-block; padding-block: 7px; }
  .chat-variant #banner_top { min-width: 0; overflow-x: clip; }
}
