/* ==========================================================================
   Hero + интерактивный AI-демо-панель + модальный конструктор
   ========================================================================== */

.hero {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  padding: 132px 0 84px;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.hero-bg svg { width: 100%; height: 100%; }
.hero-glow {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  width: 900px;
  height: 900px;
  right: -240px;
  top: -380px;
  background: radial-gradient(circle, rgba(216, 250, 75, 0.18) 0%, rgba(216, 250, 75, 0.06) 42%, transparent 66%);
  filter: blur(6px);
}
.hero-glow--2 {
  width: 720px;
  height: 720px;
  right: auto;
  left: -300px;
  top: auto;
  bottom: -420px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.2) 0%, transparent 62%);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 56px;
  align-items: center;
}
.hero-copy { position: relative; z-index: 2; }

.hero-kicker { margin-bottom: 26px; }
.hero-kicker .live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 0 rgba(216, 250, 75, 0.6);
  animation: pulse-dot 2.4s infinite;
  margin-left: 2px;
}
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(216, 250, 75, 0.55); }
  70% { box-shadow: 0 0 0 11px rgba(216, 250, 75, 0); }
  100% { box-shadow: 0 0 0 0 rgba(216, 250, 75, 0); }
}

.hero h1 { max-width: 15ch; }
.hero h1 .h1-strike {
  position: relative;
  white-space: nowrap;
}
.hero h1 .h1-strike svg {
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: -0.14em;
  width: 104%;
  height: 0.26em;
  color: var(--lime);
  overflow: visible;
}
.hero .sub {
  margin-top: 24px;
  max-width: 50ch;
  font-size: clamp(16px, 1.3vw, 18.5px);
  line-height: 1.55;
  color: rgba(242, 243, 240, 0.72);
}
.hero .sub b { color: var(--paper); font-weight: 700; }
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.hero-note {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: rgba(242, 243, 240, 0.44);
}
.hero-note span { display: inline-flex; align-items: center; gap: 6px; }
.hero-note svg { width: 13px; height: 13px; color: var(--lime); }

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: start;
  gap: 0;
  margin-top: 46px;
  padding-top: 24px;
  border-top: 1px solid var(--line-inv);
}
.hero-metrics div { padding-right: 26px; }
.hero-metrics div + div {
  padding-left: 26px;
  border-left: 1px solid var(--line-inv);
}
.hero-metrics b {
  display: block;
  font: 800 26px/1 var(--font);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.hero-metrics b i {
  font-style: normal;
  font-size: 15px;
  color: var(--lime);
  margin-left: 2px;
}
.hero-metrics span {
  display: block;
  margin-top: 7px;
  font-size: 11.5px;
  line-height: 1.35;
  color: rgba(242, 243, 240, 0.46);
  max-width: 14ch;
}

/* --- панель агента -------------------------------------------------------- */

.agent-shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 556px;
  margin-left: auto;
}
.agent-shell::before {
  content: "";
  position: absolute;
  inset: 14px -14px -18px 30px;
  border-radius: 28px;
  background: linear-gradient(150deg, rgba(216, 250, 75, 0.22), rgba(20, 184, 166, 0.14));
  filter: blur(22px);
  z-index: -1;
}
.agent-frame {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f7f8f5 100%);
  color: var(--ink);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-3), 0 0 0 1px rgba(10, 22, 40, 0.35);
  display: flex;
  flex-direction: column;
  height: 700px;
  overflow: hidden;
}
.agent-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.ag-top {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 17px;
  border-bottom: 1px solid rgba(10, 22, 40, 0.09);
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(6px);
  flex: none;
}
.ag-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--ink);
  color: var(--lime);
  display: grid;
  place-items: center;
  flex: none;
}
.ag-mark svg { width: 19px; height: 19px; }
.ag-id { line-height: 1.15; min-width: 0; }
.ag-id b { font-size: 14px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 7px; }
.ag-id b .pro {
  font: 800 8.5px/1 var(--mono);
  letter-spacing: 0.1em;
  background: var(--ink);
  color: var(--lime);
  padding: 3px 5px;
  border-radius: 5px;
}
.ag-id span {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  font-size: 11px;
  color: var(--muted);
}
.ag-id span i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.14);
}
.ag-tools { margin-left: auto; display: flex; gap: 6px; }
.ag-ico-btn {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid rgba(10, 22, 40, 0.1);
  background: rgba(255, 255, 255, 0.7);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--muted);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ag-ico-btn:hover { background: #ffffff; color: var(--ink); border-color: rgba(10, 22, 40, 0.22); }
.ag-ico-btn svg { width: 15px; height: 15px; }

.ag-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 17px 6px;
  scroll-behavior: smooth;
}
.ag-body::-webkit-scrollbar { width: 8px; }
.ag-body::-webkit-scrollbar-thumb {
  background: rgba(10, 22, 40, 0.14);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.msg { margin-bottom: 16px; animation: msg-in 0.45s var(--ease); }
@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.msg-user { display: flex; justify-content: flex-end; }
.msg-user .bubble {
  background: var(--ink);
  color: var(--paper);
  border-radius: 15px 15px 5px 15px;
  padding: 11px 14px;
  max-width: 84%;
  font-size: 13.8px;
  line-height: 1.45;
}
.msg-user .bubble small {
  display: block;
  margin-top: 5px;
  font-size: 10.5px;
  color: rgba(242, 243, 240, 0.5);
}

.msg-ai { display: flex; gap: 9px; align-items: flex-start; }
.ai-ava {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--lime);
  color: var(--ink);
  display: grid;
  place-items: center;
  flex: none;
  margin-top: 1px;
}
.ai-ava svg { width: 13px; height: 13px; }
.ai-col { min-width: 0; flex: 1; }
.ai-name {
  font: 700 9.5px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.ai-name time { letter-spacing: 0.04em; color: rgba(10, 22, 40, 0.32); font-weight: 500; }

.think { display: grid; gap: 7px; margin-bottom: 10px; }
.think-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
  opacity: 0;
  transform: translateY(4px);
  animation: think-in 0.4s var(--ease) forwards;
}
@keyframes think-in {
  to { opacity: 1; transform: none; }
}
.think-row .t-ic {
  width: 14px;
  height: 14px;
  flex: none;
  margin-top: 1px;
  display: grid;
  place-items: center;
  color: var(--teal-ink);
}
.think-row .t-ic svg { width: 13px; height: 13px; }
.think-row.is-wait .t-ic { color: rgba(10, 22, 40, 0.3); }
.think-row.is-wait .t-ic::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.think-row b { color: var(--ink); font-weight: 600; }

.msg-text {
  font-size: 13.8px;
  line-height: 1.5;
  color: #1f2937;
  margin-bottom: 11px;
}
.msg-text b { font-weight: 700; }
.msg-text .hl {
  background: linear-gradient(180deg, transparent 58%, rgba(216, 250, 75, 0.75) 58%);
  font-weight: 600;
}

/* карточка результата */
.res {
  background: #ffffff;
  border: 1px solid rgba(10, 22, 40, 0.11);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 24px -20px rgba(10, 22, 40, 0.4);
}
.res-map {
  position: relative;
  height: 120px;
  background: #e6e9e4;
  overflow: hidden;
  border-bottom: 1px solid rgba(10, 22, 40, 0.08);
}
.res-map svg { width: 100%; height: 100%; }
.res-map[data-tone="sea"] { background: #d5e3e6; }
.res-map[data-tone="mount"] { background: #e9ebdc; }
.res-map[data-tone="bar"] { background: #1b2014; }
.res-map .res-tag {
  position: absolute;
  left: 9px;
  top: 9px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(10, 22, 40, 0.1);
  border-radius: 999px;
  padding: 4px 9px;
  font: 700 9.5px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #3a4222;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.res-map .res-tag i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
}
.res-body { padding: 11px 13px 11px; }
.res-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.res-title b { font-size: 14.5px; letter-spacing: -0.02em; }
.res-title span { font: 600 10px/1 var(--mono); color: var(--muted); }
.res-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px dashed rgba(10, 22, 40, 0.14);
}
.res-stats div b {
  display: block;
  font: 800 15px/1 var(--font);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.res-stats div span { display: block; margin-top: 3px; font-size: 9.5px; color: var(--muted-2); }
.res-days { display: flex; gap: 4px; margin-top: 10px; flex-wrap: wrap; }
.res-days span {
  font-size: 10.5px;
  font-weight: 600;
  background: rgba(216, 250, 75, 0.34);
  border: 1px solid rgba(182, 217, 43, 0.4);
  color: #4c5a10;
  border-radius: 999px;
  padding: 3px 7px;
}
.res-note {
  margin-top: 10px;
  display: flex;
  gap: 7px;
  align-items: flex-start;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
  background: rgba(20, 184, 166, 0.07);
  border-radius: 8px;
  padding: 8px 9px;
}
.res-note svg { width: 12px; height: 12px; flex: none; color: var(--teal-ink); margin-top: 1px; }
.res-actions { display: flex; gap: 6px; margin-top: 9px; }
.res-actions .btn {
  padding: 9px 12px;
  font-size: 12px;
  border-radius: 9px;
  gap: 6px;
}
.res-actions .btn svg { width: 13px; height: 13px; }
.res-actions .btn--line { border-color: rgba(10, 22, 40, 0.18); }

/* списки результатов */
.res-list { display: grid; gap: 6px; }
.res-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  background: #ffffff;
  border: 1px solid rgba(10, 22, 40, 0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.res-item:hover {
  border-color: rgba(10, 22, 40, 0.26);
  transform: translateY(-1px);
  box-shadow: 0 8px 16px -12px rgba(10, 22, 40, 0.4);
}
.res-item .ri-thumb {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  flex: none;
  overflow: hidden;
  background: #e9ecee;
}
.res-item .ri-thumb svg { width: 100%; height: 100%; }
.res-item .ri-body { min-width: 0; flex: 1; }
.res-item .ri-body b {
  display: block;
  font-size: 12.5px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.res-item .ri-body span {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.res-item .ri-rate {
  font-size: 10.5px;
  font-weight: 700;
  color: #55601d;
  background: rgba(216, 250, 75, 0.4);
  border-radius: 5px;
  padding: 3px 5px;
  flex: none;
}
.res-item .ri-go { color: var(--muted-2); flex: none; }
.res-item .ri-go svg { width: 14px; height: 14px; }

.res-group-label {
  font: 700 9.5px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 12px 0 7px;
}

/* ответ «создать маршрут» */
.cta-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 12px;
  padding: 12px 13px;
  margin-top: 9px;
}
.cta-mini b { display: block; font-size: 12.8px; }
.cta-mini span { display: block; font-size: 10.5px; color: rgba(242, 243, 240, 0.55); margin-top: 2px; }
.cta-mini .btn { margin-left: auto; padding: 8px 11px; font-size: 11.5px; border-radius: 8px; }

/* печатает… */
.typing {
  display: inline-flex;
  gap: 4px;
  padding: 9px 12px;
  background: #ffffff;
  border: 1px solid rgba(10, 22, 40, 0.1);
  border-radius: 12px;
}
.typing i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted-2);
  animation: t-bounce 1.1s infinite;
}
.typing i:nth-child(2) { animation-delay: 0.14s; }
.typing i:nth-child(3) { animation-delay: 0.28s; }
@keyframes t-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.45; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* --- вложения / композер -------------------------------------------------- */

.ag-attach {
  display: none;
  gap: 6px;
  padding: 8px 12px 0;
  flex-wrap: wrap;
  flex: none;
}
.ag-attach.has { display: flex; }
.attach {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(10, 22, 40, 0.14);
  background: #ffffff;
  border-radius: 9px;
  padding: 4px 6px 4px 4px;
  font-size: 10.5px;
  font-weight: 600;
  animation: msg-in 0.3s var(--ease);
}
.attach .a-thumb {
  width: 30px;
  height: 24px;
  border-radius: 5px;
  overflow: hidden;
  background: #dfe6ea;
  flex: none;
}
.attach .a-thumb svg { width: 100%; height: 100%; }
.attach .a-meta { line-height: 1.2; }
.attach .a-meta b { display: block; font-size: 10.5px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach .a-meta span { display: block; font-size: 9px; color: var(--muted-2); margin-top: 1px; }
.attach button {
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--muted-2);
  padding: 2px;
  line-height: 0;
}
.attach button:hover { color: var(--ink); }
.attach button svg { width: 11px; height: 11px; }

.ag-quick {
  display: flex;
  gap: 6px;
  padding: 10px 17px 0;
  overflow-x: auto;
  scrollbar-width: none;
  flex: none;
  mask-image: linear-gradient(90deg, #000 70%, transparent 96%);
  -webkit-mask-image: linear-gradient(90deg, #000 70%, transparent 96%);
  padding-right: 26px;
}
.ag-quick::-webkit-scrollbar { display: none; }
.q-chip {
  border: 1px solid rgba(10, 22, 40, 0.14);
  background: rgba(255, 255, 255, 0.7);
  color: #333a24;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.q-chip:hover { background: #ffffff; border-color: rgba(10, 22, 40, 0.3); transform: translateY(-1px); }
.q-chip:disabled { opacity: 0.45; cursor: default; }

.ag-compose {
  flex: none;
  border-top: 1px solid rgba(10, 22, 40, 0.09);
  background: rgba(255, 255, 255, 0.72);
  padding: 10px 12px 9px;
}
.compose-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  border: 1px solid rgba(10, 22, 40, 0.16);
  background: #ffffff;
  border-radius: 13px;
  padding: 6px 6px 6px 4px;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.compose-row:focus-within {
  border-color: rgba(10, 22, 40, 0.42);
  box-shadow: 0 0 0 3px rgba(216, 250, 75, 0.45);
}
.compose-row textarea {
  flex: 1;
  border: 0;
  outline: 0;
  resize: none;
  background: none;
  font-size: 13px;
  line-height: 1.4;
  padding: 8px 2px;
  max-height: 96px;
  min-height: 36px;
  color: var(--ink);
}
.compose-row textarea::placeholder { color: rgba(10, 22, 40, 0.38); }
.comp-btn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--muted);
  flex: none;
  transition: background 0.15s, color 0.15s;
}
.comp-btn:hover { background: rgba(10, 22, 40, 0.06); color: var(--ink); }
.comp-btn svg { width: 17px; height: 17px; }
.comp-btn--send {
  background: var(--lime);
  color: var(--ink);
  border-radius: 10px;
  width: 34px;
  height: 34px;
}
.comp-btn--send:hover { background: var(--lime-deep); }
.comp-btn--send:disabled { background: rgba(10, 22, 40, 0.08); color: rgba(10, 22, 40, 0.3); cursor: default; }
.pro-flag {
  font: 800 8px/1 var(--mono);
  letter-spacing: 0.1em;
  border: 1px solid rgba(10, 22, 40, 0.24);
  border-radius: 4px;
  padding: 3px 4px;
  color: var(--muted);
  margin-right: 2px;
  align-self: center;
  flex: none;
}
.ag-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 7px;
  font-size: 9.5px;
  color: rgba(10, 22, 40, 0.38);
}
.ag-foot a { text-decoration: underline; text-underline-offset: 2px; }

/* --- модальное окно конструктора ----------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal.is-open { display: flex; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 40, 0.62);
  backdrop-filter: blur(6px);
  animation: fade-in 0.25s;
}
@keyframes fade-in { from { opacity: 0; } }
.modal-card {
  position: relative;
  width: min(1080px, 100%);
  max-height: min(88vh, 760px);
  background: var(--paper);
  border-radius: 20px;
  box-shadow: 0 60px 140px -40px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modal-in 0.32s var(--ease);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
}
.modal-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.win-dots { display: flex; gap: 5px; }
.win-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(10, 22, 40, 0.16); }
.modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  min-width: 0;
}
.modal-title span { color: var(--muted); font-weight: 500; }
.modal-bar .btn { margin-left: auto; }
.modal-close {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--muted);
}
.modal-close:hover { color: var(--ink); border-color: rgba(10, 22, 40, 0.3); }
.modal-close svg { width: 14px; height: 14px; }

.builder {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  min-height: 0;
  flex: 1;
}
.builder-left {
  padding: 16px 16px 22px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
}
.builder-right {
  padding: 16px;
  overflow-y: auto;
  background: var(--paper-2);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.b-toolbar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.b-tool {
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 8px;
  padding: 6px 9px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.b-tool.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.b-tool svg { width: 13px; height: 13px; }

.b-day { margin-bottom: 10px; }
.b-day-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 2px 7px;
}
.b-day-head b { font-size: 12.5px; letter-spacing: -0.01em; }
.b-day-head span { font-size: 10.5px; color: var(--muted); margin-left: auto; font-variant-numeric: tabular-nums; }
.b-points { display: grid; gap: 4px; }
.b-point {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 8px;
  cursor: grab;
  transition: box-shadow 0.15s, border-color 0.15s, opacity 0.15s;
}
.b-point:hover { border-color: rgba(10, 22, 40, 0.26); box-shadow: var(--shadow-1); }
.b-point.is-drag { opacity: 0.4; }
.b-point .grip { color: rgba(10, 22, 40, 0.26); line-height: 0; }
.b-point .grip svg { width: 11px; height: 11px; }
.b-point .b-num {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  font: 800 8.5px/17px var(--font);
  text-align: center;
  flex: none;
}
.b-point .b-txt { min-width: 0; flex: 1; }
.b-point .b-txt b {
  display: block;
  font-size: 11.8px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.b-point .b-txt span { font-size: 9.5px; color: var(--muted-2); }
.b-point .b-seg {
  font: 600 9px/1 var(--mono);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 5px;
  flex: none;
}

.b-map {
  background: #e6e9e4;
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: hidden;
  height: 250px;
  flex: none;
}
.b-map svg { width: 100%; height: 100%; }
.b-side {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 13px;
}
.b-side h4 {
  font: 700 9.5px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 9px;
}
.b-money { display: grid; gap: 6px; }
.b-money div { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.b-money div b { color: var(--ink); font-variant-numeric: tabular-nums; }
.b-money div.total {
  border-top: 1px dashed var(--line);
  margin-top: 4px;
  padding-top: 7px;
  font-weight: 700;
  color: var(--ink);
}
.b-who { display: flex; align-items: center; gap: 6px; margin-top: 9px; }
.b-who .ava {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e9ecee;
  border: 2px solid #ffffff;
  font: 800 9px/18px var(--font);
  text-align: center;
  margin-left: -6px;
}
.b-who .ava:first-child { margin-left: 0; }
.b-who span { font-size: 10.5px; color: var(--muted); margin-left: 3px; }

/* анимация проведения линии маршрута в картах */
.wl-draw {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: wl-draw 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes wl-draw {
  to { stroke-dashoffset: 0; }
}

/* развёрнутая панель агента */
body.agent-expanded { overflow: hidden; }
body.agent-expanded .agent-shell {
  position: fixed;
  inset: 0;
  z-index: 95;
  max-width: none;
  margin: 0;
  padding: 22px;
  background: rgba(10, 22, 40, 0.72);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
}
body.agent-expanded .agent-frame {
  width: min(760px, 100%);
  height: min(88vh, 820px);
}
body.agent-expanded .agent-shell::before { display: none; }

@media (max-width: 1080px) {
  .hero { padding: 108px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { max-width: 20ch; }
  .hero-metrics { grid-template-columns: repeat(4, auto); }
  .agent-shell { max-width: 640px; margin: 0 auto; }
  .agent-frame { height: 580px; }  .builder { grid-template-columns: 1fr; }
  .builder-right { border-top: 1px solid var(--line); }
}

@media (max-width: 640px) {
  .top-cta { display: none; }
  .hero-kicker { font-size: 9.5px; letter-spacing: 0.13em; gap: 8px; }
  .hero { padding: 96px 0 46px; }
  .hero h1 { font-size: clamp(32px, 9vw, 40px); }
  .hero .sub { margin-top: 18px; font-size: 15.5px; }
  .hero-cta { margin-top: 24px; }
  .hero-cta .btn { flex: 1 1 auto; }
  .hero-note { font-size: 11.5px; gap: 10px; }
  .hero-metrics {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 30px;
    padding-top: 18px;
    gap: 16px 0;
  }
  .hero-metrics div { padding-right: 12px; }
  .hero-metrics div + div { padding-left: 0; border-left: 0; }
  .hero-metrics div:nth-child(even) {
    padding-left: 16px;
    border-left: 1px solid var(--line-inv);
  }
  .hero-metrics b { font-size: 22px; }
  .agent-frame { height: 666px; border-radius: 18px; }
  .res--intro .res-note { display: none; }
  .res--intro .res-map { height: 88px; }
  .res--intro .res-days { display: none; }
  .res-title { gap: 4px; }
  .res-title b { font-size: 13.5px; }
  .ag-id span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ag-body { padding: 14px 13px 4px; }
  .ag-top { padding: 12px 13px; }
  .ag-quick { padding: 8px 13px 0; }
  .ag-compose { padding: 8px 10px 8px; }
  .modal { padding: 0; }
  .modal-card { max-height: 100vh; height: 100vh; border-radius: 0; }
  body.agent-expanded .agent-shell { padding: 0; }
  body.agent-expanded .agent-frame { height: 100%; border-radius: 0; }
  .modal-bar .btn { display: none; }
  .b-map { height: 190px; }
}

/* чипы-подсказки внутри ответа: переносим, а не обрезаем */
.ag-quick--in {
  padding: 9px 0 0 !important;
  flex-wrap: wrap;
  overflow: visible;
  mask-image: none !important;
  -webkit-mask-image: none !important;
}
