.v2-app-title {
  margin: 0 0 12px;
}

/* APP-ONLY typography (does not affect public landing) */
.v2-app-shell {
  font-family: var(--font-body);
  font-size: 16px;
}

.v2-app-shell h1.page-title,
.v2-app-shell .page-title {
  font-family: var(--font-note);
  font-weight: 700;
  font-size: 2rem; /* вернуть к норме */
  text-align: center;
  margin-top: 10px !important;
  margin-bottom: 10px !important;
}

/* App pages: reduce top whitespace in main column */
.v2-app-shell .v2-center {
  padding-top: 10px !important;
}

/* Increase only the smallest text */
.v2-app-shell .small,
.v2-app-shell small,
.v2-app-shell .text-muted.small {
  font-size: 0.95rem;
}

/* 5) Specific labels: 1.6rem Caveat 600 */
.v2-app-shell #streak-card .v2-title,
.v2-app-shell .card-header h2.m-0 {
  font-family: var(--font-note) !important;
  font-weight: 600 !important;
  font-size: 1.6rem !important;
}

/* Ideas: "Сохранить" button in add-idea form */
.v2-app-shell form[action="/app/ideas"] button[type="submit"].btn.btn-primary {
  font-family: var(--font-note) !important;
  font-weight: 600 !important;
  font-size: 1.6rem !important;
}

/* ---------- Dashboard-only fixes (do not affect public landing) ---------- */

/* 1) Buttons: handwritten, bold, a bit larger */
.v2-app-shell .v2-btn,
.v2-app-shell .btn,
.v2-app-shell button {
  font-family: var(--font-note);
  font-weight: 700;
  font-size: 1.2rem;
}

/* Primary actions: keep bold but not heavier */
.v2-app-shell .v2-btn--primary,
.v2-app-shell .btn-primary {
  font-weight: 700;
}

/* Progress bars: force standard LTR fill */
.v2-app-shell .progress {
  direction: ltr !important;
}
.v2-app-shell .progress .progress-bar {
  float: left;
  transform: none !important;
}

/* ЮЛИ editor buttons: extra compact so they never eat the panel */
.v2-app-shell .v2-yuli__editor-actions {
  gap: 6px;
}
.v2-app-shell .v2-yuli__editor-actions .v2-btn,
.v2-app-shell .v2-yuli__editor-actions button {
  padding: 3px 8px;
  font-size: 1rem;
  font-weight: 700;
}

/* Единая модалка действий (переключение этапа, удаление и др.) */
.v2-app-shell .modal-overlay,
#nodeSwitchModal.modal-overlay,
#v2ActionModal.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 12px;
  box-sizing: border-box;
}

/*
 * Поверх шапки, сайдбара и всех float (SOS 10060, ЮЛИ 10055, проект 10050).
 * Модалка при показе переносится в document.body.
 */
#nodeSwitchModal.modal-overlay,
#v2ActionModal.modal-overlay {
  z-index: 11000;
}
.v2-app-shell .modal-container,
#nodeSwitchModal .modal-container,
#v2ActionModal .modal-container {
  background-color: #F5F9EF;
  width: 300px;
  max-width: calc(100vw - 24px);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  position: relative;
  padding: 20px 16px 24px;
  text-align: center;
}
.v2-app-shell .modal-close,
#nodeSwitchModal .modal-close,
#v2ActionModal .modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #1F2F2A;
  background: none;
  border: none;
  padding: 0;
}
.v2-app-shell .modal-title,
#nodeSwitchModal .modal-title,
#v2ActionModal .modal-title {
  font-family: "Caveat", cursive;
  font-size: 1.3rem;
  font-weight: 700;
  color: #1F2F2A;
  margin: 0 0 16px 0;
}
.v2-app-shell .modal-message,
#nodeSwitchModal .modal-message,
#v2ActionModal .modal-message {
  font-family: "Roboto", sans-serif;
  font-size: 0.9rem;
  color: #1F2F2A;
  margin: 0 0 24px 0;
  line-height: 1.4;
}
.v2-app-shell .modal-buttons,
#nodeSwitchModal .modal-buttons,
#v2ActionModal .modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.v2-app-shell .modal-btn,
#nodeSwitchModal .modal-btn,
#v2ActionModal .modal-btn {
  font-family: "Caveat", cursive;
  font-weight: 400;
  font-size: 1rem;
  background-color: #A8D5CC;
  color: #1F2F2A;
  border: none;
  padding: 8px 12px;
  width: 80%;
  border-radius: 30px;
  cursor: pointer;
  transition: background 0.2s;
  pointer-events: auto;
}
.v2-app-shell .modal-btn:hover,
#nodeSwitchModal .modal-btn:hover,
#v2ActionModal .modal-btn:hover {
  background-color: #88C4B3;
}

/* Опасное действие (удаление) */
#v2ActionModal .modal-btn.modal-btn--danger {
  background-color: #C24935;
  color: #fff;
}
#v2ActionModal .modal-btn.modal-btn--danger:hover {
  background-color: #a33a29;
}
#v2ActionModal .modal-btn.modal-btn--secondary {
  background-color: #e4ebe3;
  color: #1F2F2A;
}
#v2ActionModal .modal-btn.modal-btn--secondary:hover {
  background-color: #d2ddd0;
}
#v2ActionModal .modal-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

/* Онбординг: шире обычного модального окна, поверх UpsellCard */
.v2-app-shell #v2-onboarding-modal {
  z-index: 10050;
}
.v2-app-shell .modal-container.modal-container--onboarding {
  width: min(420px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  text-align: left;
}
.v2-app-shell .modal-onboarding-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 4px;
}
.v2-app-shell .modal-onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(31, 47, 42, 0.22);
}
.v2-app-shell .modal-onboarding-dot.is-active {
  background: #2f8f7a;
}
.v2-app-shell .modal-buttons--row {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.v2-app-shell .modal-buttons--row .modal-btn {
  width: auto;
  min-width: calc(33% - 6px);
  flex: 1 1 auto;
}
.v2-app-shell .modal-btn--ghost {
  background-color: transparent;
  border: 1px solid #a8d5cc;
}
.v2-app-shell .modal-btn--ghost:hover {
  background-color: rgba(168, 213, 204, 0.35);
}

/* UpsellCard (task 4.1): toast card in top-right corner */
.v2-app-shell .upsell-card {
  position: fixed;
  top: 20px;
  right: 20px;
  width: min(360px, calc(100vw - 32px));
  z-index: 10001;
  animation: fadeInDown 0.3s ease;
}
.v2-app-shell .upsell-card-container {
  background-color: #F5F9EF;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 16px;
  position: relative;
}
.v2-app-shell .upsell-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #1F2F2A;
}
.v2-app-shell .upsell-title {
  font-family: "Caveat", cursive;
  font-size: 1.3rem;
  font-weight: 700;
  color: #1F2F2A;
  margin-bottom: 12px;
  padding-right: 20px;
}
.v2-app-shell .upsell-message {
  font-family: "Roboto", sans-serif;
  font-size: 0.9rem;
  color: #1F2F2A;
  margin-bottom: 8px;
  line-height: 1.4;
}

/* Несколько CTA (Level 3: «Перейти на Pro» + «Сразу оплатить») */
.v2-app-shell .upsell-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
@media (max-width: 480px) {
  .v2-app-shell .upsell-buttons {
    flex-direction: column;
  }
}
.v2-app-shell .upsell-buttons .upsell-btn {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  width: auto;
}

.v2-app-shell .upsell-btn {
  background-color: #a8d5cc;
  color: #1f2f2a;
  border: none;
  padding: 8px 16px;
  border-radius: 30px;
  cursor: pointer;
  font-family: "Caveat", cursive;
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.2s, border-color 0.2s;
  width: 100%;
}
.v2-app-shell .upsell-btn--primary {
  background-color: #a8d5cc;
}
.v2-app-shell .upsell-btn--secondary {
  background-color: #fff;
  border: 2px solid #2f8f7a;
  color: #1f2f2a;
}
.v2-app-shell .upsell-btn:hover {
  background-color: #88c4b3;
}
.v2-app-shell .upsell-btn--secondary:hover {
  background-color: #e8f4f0;
}

.v2-app-shell .upsell-later-row {
  margin-top: 10px;
  text-align: right;
}
.v2-app-shell .upsell-later {
  background: none;
  border: none;
  color: #5a6e68;
  font-family: "Roboto", sans-serif;
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px 0;
}
.v2-app-shell .upsell-later:hover {
  color: #1f2f2a;
}
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.v2-app-shell .upsell-card.hiding {
  animation: fadeOut 0.3s ease forwards;
}
@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* 2) Restore default body/text font: Roboto for content texts */
.v2-app-shell p,
.v2-app-shell div,
.v2-app-shell li,
.v2-app-shell .v2-yuli__messages,
.v2-app-shell .v2-yuli__message,
.v2-app-shell .v2-yuli__messages *,
.v2-app-shell .text-muted,
.v2-app-shell .small {
  font-family: var(--font-body);
  font-weight: 400;
}

/* But keep navigation/title elements handwritten */
.v2-app-shell .v2-brand,
.v2-app-shell .v2-nav-link,
.v2-app-shell .page-title {
  font-family: var(--font-note);
}

/* 3) Header: shrink further */
.v2-app-shell .v2-app-header {
  padding-top: 0.2rem !important;
  padding-bottom: 0.2rem !important;
  min-height: 40px !important;
  gap: 0.5rem !important;
}
.v2-app-shell .v2-app-header .v2-brand {
  font-size: 24px !important;
  font-family: "Caveat", cursive !important;
  font-weight: 700 !important;
}
.v2-app-shell .v2-app-header__nav {
  gap: 0.5rem !important;
}
.v2-app-shell .v2-app-header .v2-app-header__nav .v2-nav-link {
  padding: 4px 8px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  font-family: "Caveat", cursive !important;
}

/* Header: force handwritten on all header text */
.v2-app-header,
.v2-app-header * {
  font-family: var(--font-note) !important;
}

/* 3) ЮЛИ: labels handwritten */
.v2-app-shell .v2-yuli__editor label,
.v2-app-shell .yuli-field-label {
  font-family: var(--font-note);
  font-weight: 600;
  font-size: 1.1rem;
}

/* 4) Mindmap + tree node titles handwritten */
.v2-app-shell .mindmap-node__title,
.v2-app-shell .v2-tree__title {
  font-family: var(--font-note);
  font-weight: 600;
  font-size: 1.1rem;
}

/* 5) All headings handwritten inside app */
.v2-app-shell h1,
.v2-app-shell h2,
.v2-app-shell h3,
.v2-app-shell h4,
.v2-app-shell h5,
.v2-app-shell h6,
.v2-app-shell .subtitle,
.v2-app-shell .section-title {
  font-family: var(--font-note);
  font-weight: 600;
}

/* 6) Reduce spacing further (app only) */
.v2-app-shell .v2-left,
.v2-app-shell .v2-center,
.v2-app-shell .v2-right {
  padding: 8px;
}
.v2-app-shell .v2-card {
  padding: 10px;
}
.v2-app-shell .v2-yuli__editor,
.v2-app-shell .v2-yuli__chat {
  padding: 8px;
}
.v2-app-shell .v2-yuli__editor-form {
  gap: 3px;
  padding-bottom: 6px;
}
.v2-app-shell .v2-yuli__editor-actions {
  margin-top: 8px;
  padding-top: 8px;
}

/* 7) Project top info block: narrow it */
.v2-app-shell .v2-app-title {
  max-width: 55%;
}
.v2-app-shell .v2-app-title + p {
  max-width: 55%;
}

/* 4) Tree markers: aggressively remove circles everywhere in Steps + tree view */
.v2-app-shell .task-tree,
.v2-app-shell .task-tree ul,
.v2-app-shell #tree-container ul,
.v2-app-shell .v2-tree ul,
.v2-app-shell .v2-tree li,
.v2-app-shell .task-tree li,
.v2-app-shell .task-node {
  list-style: none !important;
}
.v2-app-shell .task-tree li::marker,
.v2-app-shell .task-node::marker,
.v2-app-shell #tree-container li::marker,
.v2-app-shell .v2-tree li::marker {
  content: "" !important;
}
.v2-app-shell .task-tree li::before,
.v2-app-shell .task-node::before,
.v2-app-shell #tree-container li::before,
.v2-app-shell .v2-tree li::before {
  content: none !important;
  display: none !important;
}

/* Steps: remove the “candy on a stick” icon (task-knot) */
.v2-app-shell .task-knot,
.v2-app-shell .task-knot svg {
  display: none !important;
}

/* Mindmap knot "●" */
.v2-app-shell .mindmap-node__knot {
  display: none !important;
}

/* ---------- Живой бейдж тарифа в шапке /app (док. 12, задача №8) ---------- */
.v2-app-header .tariff-badge {
  display: inline-block;
  align-self: center;
  background-color: #e2ecdc;
  border-radius: 20px;
  padding: 6px 12px;
  margin-left: 15px;
  font-family: "Roboto", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.v2-app-header .tariff-badge-link {
  text-decoration: none;
  color: #1f2f2a;
  font-weight: 700;
}

.v2-app-header .tariff-badge.pro-expiring,
.v2-app-header .tariff-badge.pro-expired {
  background-color: #c24935;
}

.v2-app-header .tariff-badge.pro-expiring .tariff-badge-link,
.v2-app-header .tariff-badge.pro-expired .tariff-badge-link {
  color: #fff;
  font-weight: 700;
}

/* Плавающая «СОС» (не перекрывает FAB чата ЮЛИ на планшетах/мобильных) */
.support-floating-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  background-color: #2f8f7a;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}
.support-floating-btn:hover {
  transform: scale(1.05);
}

/* Модалка входа / регистрации */
.auth-modal-card {
  background: #f5f9ef;
}
.auth-modal-card .btn-primary {
  background: #2f8f7a;
  border-color: #2f8f7a;
}
.auth-modal-card .btn-primary:hover {
  background: #287a68;
  border-color: #287a68;
}
.auth-link {
  color: #2f8f7a;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
}
.auth-link:hover,
.auth-link:focus-visible {
  color: #c24935;
  text-decoration: underline;
  outline: none;
}
.auth-modal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}
.auth-modal-links__sep {
  color: rgba(31, 47, 42, 0.35);
  user-select: none;
}
.auth-modal-switch {
  text-align: center;
}
.toggle-password-link {
  display: inline-block;
  font-size: 0.875rem;
}
@media (max-width: 480px) {
  .auth-modal-links {
    flex-direction: column;
    gap: 4px;
  }
  .auth-modal-links__sep {
    display: none;
  }
}

@media (min-width: 768px) and (max-width: 1200px) {
  .support-floating-btn:not(.support-floating-btn--sidebar) {
    bottom: 88px;
    right: 18px;
  }
}
@media (max-width: 768px) {
  .support-floating-btn:not(.support-floating-btn--sidebar) {
    width: 48px;
    height: 48px;
    font-size: 24px;
    bottom: 88px;
    right: 16px;
  }
}

/* Модалка техподдержки — устаревший full-screen стиль */
.v2-app-shell .support-modal-app.upsell-card {
  display: none !important;
}

/* ===== Единый каркас плавающих окон (SOS + «Поболтать с ЮЛИ») ===== */
.v2-float-window {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: transparent;
}
.v2-float-window--z-sos { z-index: 10060; }
.v2-float-window--z-yuli { z-index: 10055; }
.v2-float-window--z-project { z-index: 10050; }
.v2-float-window:not([hidden]) {
  display: block;
  pointer-events: auto;
}
.v2-float-window__backdrop {
  display: none;
}
.v2-float-window:not([hidden]) > .v2-float-window__backdrop {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 0;
  background: rgba(31, 47, 42, 0.16);
  pointer-events: auto;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: default;
}
.v2-float-window__panel {
  pointer-events: auto;
  position: fixed;
  z-index: 1;
  /* JS (V2FloatWindowLayout) задаёт точный центр и 66%×75%; здесь запасной вид */
  left: 17%;
  top: 12.5%;
  right: auto;
  bottom: auto;
  width: min(66vw, 960px);
  height: min(75vh, 800px);
  min-width: 320px;
  min-height: 380px;
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  resize: both;
}
.v2-float-window__header {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  cursor: grab;
  user-select: none;
  flex-shrink: 0;
}
.v2-float-window__decor {
  position: absolute;
  right: -6px;
  bottom: -18px;
  width: 150px;
  height: 120px;
  opacity: 0.32;
  pointer-events: none;
  z-index: 0;
}
.v2-float-window__brand,
.v2-float-window__close {
  position: relative;
  z-index: 1;
}
.v2-float-window__header:active { cursor: grabbing; }
.v2-float-window__brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.v2-float-window__badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  flex-shrink: 0;
  font-size: 11px; font-weight: 800;
}
.v2-float-window__titles { display: flex; flex-direction: column; min-width: 0; }
.v2-float-window__title {
  font-family: "Caveat", cursive;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
}
.v2-float-window__subtitle {
  font-size: 11px;
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v2-float-window__close {
  width: 32px; height: 32px; border: none; border-radius: 50%;
  font-size: 1.25rem; line-height: 1; cursor: pointer; flex-shrink: 0;
}
.v2-float-window__mode {
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.v2-float-window__messages {
  flex: 1 1 auto;
  overflow: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
.v2-float-msg { display: flex; max-width: 92%; }
.v2-float-msg--bot { align-self: flex-start; }
.v2-float-msg--user { align-self: flex-end; }
.v2-float-msg__bubble {
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.v2-float-window__route,
.v2-float-window__actions {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 10px; flex-shrink: 0;
}
.v2-float-window__route[hidden] { display: none !important; }
.v2-float-window__route-btn,
.sos-route-btn {
  appearance: none;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.v2-float-window__status {
  padding: 0 14px 8px; font-size: 12px; flex-shrink: 0;
}
.v2-float-window__status[hidden] { display: none !important; }
.v2-float-window__composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px 12px 12px;
  align-items: end;
  flex-shrink: 0;
}
.v2-float-window__input {
  width: 100%;
  min-height: 44px;
  max-height: 120px;
  resize: vertical;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
}
.v2-float-window__send {
  border: 1.5px solid currentColor;
  border-radius: 999px;
  padding: 8px 16px;
  font-family: "Caveat", cursive !important;
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  background: #fff;
  box-shadow: 0 1px 3px rgba(31, 47, 42, 0.08);
}
.v2-float-window__send:disabled { opacity: 0.55; cursor: wait; }
.v2-float-window__resize {
  position: absolute; right: 2px; bottom: 2px; width: 16px; height: 16px; cursor: nwse-resize;
  border-bottom-right-radius: 16px;
}
@media (max-width: 768px) {
  .v2-float-window__panel {
    left: 8px !important;
    right: 8px !important;
    top: auto !important;
    bottom: 8px !important;
    width: calc(100vw - 16px) !important;
    height: min(75vh, 620px) !important;
    resize: none !important;
  }
  /* Уголок resize на телефоне не работает — прячем у всех окон */
  .v2-float-window__resize {
    display: none !important;
  }
  .v2-float-window__header {
    cursor: default;
  }
  .v2-float-window__header:active {
    cursor: default;
  }

  /* Поле ввода в раскрытом диалоге проекта должно принимать нажатия */
  .v2-float-window--project .v2-float-window__slot {
    flex: 1 1 auto;
    min-height: 0;
    pointer-events: auto !important;
    position: relative;
    z-index: 2;
  }
  .v2-float-window--project .v2-yuli-chat-home,
  .v2-float-window--project .v2-yuli__composer,
  .v2-float-window--project #yuli-chat-input,
  .v2-float-window--project #yuli-send-message {
    pointer-events: auto !important;
  }
  .v2-float-window--project .v2-yuli__composer {
    position: relative;
    z-index: 3;
  }
  .v2-float-window--project #yuli-chat-input {
    -webkit-user-select: text;
    user-select: text;
  }
  .v2-float-window--project .v2-float-window__subtitle {
    display: block !important;
    font-family: "Caveat", cursive !important;
    font-size: 1.45rem !important;
    font-weight: 700 !important;
    color: #C24935 !important;
    opacity: 1;
    line-height: 1.15;
  }
}

/* --- Тема SOS: эталон (тёплая насыщенная) --- */
.v2-float-window--sos .v2-float-window__panel {
  background: #fffaf5;
  border: 1px solid rgba(194, 120, 62, 0.22);
  box-shadow: 0 18px 48px rgba(120, 70, 30, 0.2);
}
.v2-float-window--sos .v2-float-window__header {
  background: linear-gradient(135deg, #E8914A 0%, #D97A36 55%, #C96A2F 100%);
  color: #fff;
}
.v2-float-window--sos .v2-float-window__badge {
  background: rgba(255, 255, 255, 0.22);
}
.v2-float-window--sos .v2-float-window__close {
  background: rgba(255, 255, 255, 0.18); color: #fff;
}
.v2-float-window--sos .v2-float-window__close:hover { background: rgba(255, 255, 255, 0.3); }
.v2-float-window--sos .v2-float-window__messages,
.v2-float-window--sos .v2-float-window__route,
.v2-float-window--sos .v2-float-window__status {
  background: #fffaf5;
}
.v2-float-window--sos .v2-float-msg--bot .v2-float-msg__bubble,
.v2-float-window--sos .sos-msg--bot .sos-msg__bubble {
  background: #fff;
  color: #1F2F2A;
  border: 1px solid rgba(194, 120, 62, 0.18);
  border-bottom-left-radius: 4px;
}
.v2-float-window--sos .v2-float-msg--user .v2-float-msg__bubble,
.v2-float-window--sos .sos-msg--user .sos-msg__bubble {
  background: #E8914A;
  color: #fff;
  border: none;
  border-bottom-right-radius: 4px;
}
.v2-float-window--sos .sos-route-btn,
.v2-float-window--sos .v2-float-window__route-btn {
  border: 1px solid rgba(194, 120, 62, 0.35);
  background: #fff;
  color: #C96A2F;
}
.v2-float-window--sos .sos-route-btn:hover { background: #fff3e8; }
.v2-float-window--sos .sos-route-btn--warn {
  border-color: rgba(194, 73, 53, 0.45);
  color: #C24935;
}
.v2-float-window--sos .v2-float-window__status { color: #8a5a32; }
.v2-float-window--sos .v2-float-window__composer {
  border-top: 1px solid rgba(194, 120, 62, 0.15);
  background: #fff;
}
.v2-float-window--sos .v2-float-window__input {
  border: 1px solid rgba(194, 120, 62, 0.28);
  background: #fffaf5;
  color: #1F2F2A;
}
.v2-float-window--sos .v2-float-window__input:focus {
  outline: 2px solid rgba(232, 145, 74, 0.35);
  border-color: #E8914A;
}
.v2-float-window--sos .v2-float-window__send {
  background: #fff;
  color: #C96A2F;
  border-color: #E8914A;
}
.v2-float-window--sos .v2-float-window__send:hover {
  background: rgba(232, 145, 74, 0.1);
  color: #C96A2F;
}
.v2-float-window--sos .v2-float-window__resize {
  background: linear-gradient(135deg, transparent 50%, rgba(232, 145, 74, 0.55) 50%);
}

/* --- Тема «Поболтать»: светлая морская волна + оранжевая/красная рамка SOS --- */
.v2-float-window--yuli .v2-float-window__panel {
  background: #f7fbfb;
  border: 2px solid #C24935;
  box-shadow:
    0 18px 48px rgba(44, 142, 142, 0.12),
    0 0 0 4px rgba(224, 122, 95, 0.14);
}
.v2-float-window--yuli .v2-float-window__header {
  background: linear-gradient(135deg, #5AAEAE 0%, #3D9A9A 55%, #2C8E8E 100%);
  color: #fff;
}
.v2-float-window--yuli .v2-float-window__badge {
  background: rgba(255, 255, 255, 0.22);
  font-size: 1.05rem;
}
.v2-float-window--yuli .v2-float-window__close {
  background: rgba(255, 255, 255, 0.18); color: #fff;
}
.v2-float-window--yuli .v2-float-window__close:hover { background: rgba(255, 255, 255, 0.3); }
.v2-float-window--yuli .v2-float-window__mode {
  color: #247878;
  background: #eef7f7;
  border-bottom: 1px solid rgba(44, 142, 142, 0.14);
}
.v2-float-window--yuli .v2-float-window__messages,
.v2-float-window--yuli .v2-float-window__actions,
.v2-float-window--yuli .v2-float-window__status {
  background: #f7fbfb;
}
.v2-float-window--yuli .v2-float-msg--bot .v2-float-msg__bubble {
  background: #fff;
  color: #1F2F2A;
  border: 1px solid rgba(44, 142, 142, 0.16);
  border-bottom-left-radius: 4px;
}
.v2-float-window--yuli .v2-float-msg--user .v2-float-msg__bubble {
  background: rgba(44, 142, 142, 0.16);
  color: #1F2F2A;
  border: 1px solid rgba(44, 142, 142, 0.2);
  border-bottom-right-radius: 4px;
}
.v2-float-window--yuli .v2-float-window__status { color: #3d6b6b; }
.v2-float-window--yuli .v2-float-window__composer {
  border-top: 1px solid rgba(44, 142, 142, 0.14);
  background: #fff;
}
.v2-float-window--yuli .v2-float-window__input {
  border: 1px solid rgba(44, 142, 142, 0.28);
  background: #fff;
  color: #1F2F2A;
}
.v2-float-window--yuli .v2-float-window__input:focus {
  outline: 2px solid rgba(44, 142, 142, 0.35);
  border-color: #2C8E8E;
}
.v2-float-window--yuli .v2-float-window__send {
  background: #fff;
  color: #2C8E8E;
  border-color: #2C8E8E;
}
.v2-float-window--yuli .v2-float-window__send:hover {
  background: rgba(44, 142, 142, 0.06);
  color: #2C8E8E;
}
.v2-float-window--yuli .v2-float-window__resize {
  background: linear-gradient(135deg, transparent 50%, rgba(194, 73, 53, 0.55) 50%);
}

/* --- Тема «Диалог по проекту»: как статичный блок (welcome-градиент + листочки) --- */
.v2-float-window--project .v2-float-window__panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(105deg, #DDE8D6 0%, #E8F0E0 30%, #F5F9EF 58%, #F3EBDF 100%);
  border: 1px solid rgba(44, 142, 142, 0.16);
  border-radius: 24px;
  box-shadow: 0 8px 24px rgba(31, 47, 42, 0.07);
}
.v2-float-window--project .v2-float-window__header {
  position: relative;
  z-index: 1;
  background: transparent;
  color: #1F2F2A;
  border-bottom: none;
  padding: 12px 14px 8px;
}
.v2-float-window--project .v2-float-window__decor {
  right: -8px;
  bottom: auto;
  top: auto;
  width: 180px;
  height: 150px;
  opacity: 0.28;
  /* Листочки внизу панели, как в статичном блоке */
  position: absolute;
  bottom: -20px;
  z-index: 0;
  pointer-events: none;
}
.v2-float-window--project .v2-float-window__brand,
.v2-float-window--project .v2-float-window__close {
  position: relative;
  z-index: 1;
}
.v2-float-window--project .v2-float-window__title {
  font-family: "Inter", "Roboto", sans-serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #2C8E8E !important;
  line-height: 1.25;
}
.v2-float-window--project .v2-float-window__title .v2-yuli-chat-static__yuli {
  font-family: "Caveat", cursive !important;
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  color: #C24935 !important;
  letter-spacing: 0.02em;
}
.v2-float-window--project .v2-float-window__subtitle {
  display: none;
}
.v2-float-window--project .v2-float-window__badge {
  display: none;
}
.v2-float-window--project .v2-float-window__close {
  background: rgba(44, 142, 142, 0.1);
  color: #2C8E8E;
}
.v2-float-window--project .v2-float-window__close:hover {
  background: rgba(44, 142, 142, 0.18);
}
.v2-float-window--project .v2-float-window__mode-hint {
  padding: 8px 14px 0;
  flex-shrink: 0;
  background: transparent;
}
.v2-float-window--project .v2-float-window__slot {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: transparent;
  padding: 0 14px 12px;
}
.v2-float-window--project .v2-float-window__status {
  background: transparent;
  color: #3d6b6b;
}
.v2-float-window--project .v2-float-window__resize {
  background: linear-gradient(135deg, transparent 50%, rgba(44, 142, 142, 0.45) 50%);
  z-index: 2;
}

/* Общий слот: пузыри и композер как в статичном разделе */
.v2-float-window__slot {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: transparent;
  padding: 0 14px 10px;
}
.v2-float-window__slot .v2-yuli-chat-home {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.v2-float-window__slot .v2-yuli__messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  background: transparent;
  gap: 12px;
}
.v2-float-window__slot .v2-yuli__message--user .v2-yuli__bubble {
  background: rgba(255, 255, 255, 0.38) !important;
  border: 1px solid rgba(44, 142, 142, 0.22) !important;
  border-bottom-right-radius: 4px !important;
  backdrop-filter: blur(2px);
}
.v2-float-window__slot .v2-yuli__message--assistant .v2-yuli__bubble {
  background: #f5f0eb !important;
  border: 1px solid rgba(31, 47, 42, 0.08) !important;
  border-bottom-left-radius: 4px !important;
  box-shadow: 0 1px 4px rgba(31, 47, 42, 0.06);
}
.v2-float-window__slot .v2-yuli__composer {
  flex-shrink: 0;
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-end !important;
  gap: 8px !important;
  background: #fff !important;
  border: 1px solid rgba(31, 47, 42, 0.1);
  border-radius: 16px !important;
  padding: 8px !important;
  box-shadow: 0 4px 14px rgba(31, 47, 42, 0.06);
  margin: 0 !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.v2-float-window__slot .v2-yuli__composer:hover {
  border-color: rgba(194, 73, 53, 0.45);
  box-shadow: 0 4px 14px rgba(194, 73, 53, 0.1);
}
.v2-float-window__slot .v2-yuli__composer:focus-within {
  border-color: #C24935;
  box-shadow: 0 4px 16px rgba(194, 73, 53, 0.14);
}
.v2-float-window__slot .v2-yuli__composer .v2-input,
.v2-float-window__slot #yuli-chat-input {
  flex: 1 1 auto;
  min-width: 0;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  resize: none;
  min-height: 44px !important;
  padding: 8px 10px !important;
  outline: none !important;
}
.v2-float-window__slot #yuli-chat-input::placeholder {
  font-family: var(--font-body, "Inter", "Roboto", sans-serif) !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  color: rgba(31, 47, 42, 0.45) !important;
  opacity: 1;
  text-decoration: none !important;
}
.v2-float-window--project .v2-float-window__messages,
.v2-float-window--project .v2-float-window__actions,
.v2-float-window--project .v2-float-window__status {
  background: transparent;
}
.v2-float-window--project .v2-float-window__messages {
  gap: 12px;
}
.v2-float-window--project .v2-float-window__composer {
  border-top: none;
  background: transparent;
}
.v2-float-window--project .v2-float-window__input {
  border: none;
  background: transparent;
  color: #1F2F2A;
}
.v2-float-window--project .v2-float-window__input:focus {
  outline: none;
  border-color: transparent;
}
.v2-float-window--project .v2-float-window__send {
  background: #fff;
  color: #2C8E8E;
  border-color: #2C8E8E;
}
.v2-float-window--project .v2-float-window__send:hover {
  background: rgba(44, 142, 142, 0.06);
  color: #2C8E8E;
}
.v2-float-window--project .v2-float-window__resize {
  background: linear-gradient(135deg, transparent 50%, rgba(44, 142, 142, 0.5) 50%);
}
.v2-float-window--project .v2-float-window__actions .v2-btn,
.v2-float-window--project .v2-float-window__actions button {
  border-color: #2C8E8E;
  color: #2C8E8E;
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Кнопка «?» — инструкция в шапке */
.v2-user-guide-btn {
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1;
}

.v2-mobile-topbar__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .v2-mobile-topbar {
    grid-template-columns: 48px 1fr auto;
  }
}

/* Краткая инструкция на главной */
.v2-home-guide {
  border: 1px solid rgba(31, 47, 42, 0.12);
  border-radius: var(--radius-lg, 12px);
  background: #fff;
  overflow: hidden;
}
.v2-home-guide__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: none;
  background: transparent;
  font-family: "Caveat", cursive;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text, #1f2f2a);
  cursor: pointer;
  text-align: left;
}
.v2-home-guide__chevron {
  transition: transform 0.2s ease;
}
.v2-home-guide__toggle[aria-expanded="true"] .v2-home-guide__chevron {
  transform: rotate(180deg);
}
.v2-home-guide__body {
  padding: 0 14px 14px;
  border-top: 1px solid rgba(31, 47, 42, 0.08);
}
.v2-home-guide__steps {
  padding-left: 1.2rem;
  margin-top: 10px;
  color: rgba(31, 47, 42, 0.85);
  font-size: 0.92rem;
}

/* Модалка инструкции: кнопки тем же шрифтом Caveat, что и в приложении */
#userGuideModal .v2-btn,
.v2-user-guide-modal .v2-btn,
#userGuideModal button.v2-btn {
  font-family: var(--font-note), "Caveat", cursive !important;
  font-weight: 700 !important;
  font-size: 1.2rem !important;
}

/* «+ Создать проект» — рукописный шрифт как у остальных кнопок */
body.v2-page-mosaic .v2-projects-head__create,
.v2-projects-head__create {
  font-family: "Caveat", cursive !important;
  font-weight: 700 !important;
  font-size: 1.2rem !important;
}

/* Модалка инструкции: стиль как у окна ЮЛИ (градиент + листочки) */
#userGuideModal[hidden],
.v2-user-guide-modal[hidden] {
  display: none !important;
}

#userGuideModal:not([hidden]),
.v2-user-guide-modal:not([hidden]) {
  display: flex;
  z-index: 11000;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(8, 12, 10, 0.42);
}

.v2-user-guide__panel {
  position: relative;
  overflow: hidden;
  width: min(640px, 96vw);
  max-height: 88vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  /* Тёплый градиент как у .yuli-welcome */
  background: linear-gradient(105deg, #DDE8D6 0%, #E8F0E0 30%, #F5F9EF 58%, #F3EBDF 100%);
  border: 1px solid rgba(44, 142, 142, 0.16);
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(31, 47, 42, 0.14);
}

.v2-user-guide__decor {
  position: absolute;
  right: -12px;
  bottom: -24px;
  width: 200px;
  height: 160px;
  opacity: 0.26;
  pointer-events: none;
  z-index: 0;
}

.v2-user-guide__header,
.v2-user-guide__body,
.v2-user-guide__footer,
.v2-modal-close {
  position: relative;
  z-index: 1;
}

.v2-user-guide__header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 48px 12px 20px;
}

.v2-user-guide__logo {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 18px rgba(44, 142, 142, 0.16);
  display: grid;
  place-items: center;
}

.v2-user-guide__logo img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: block;
}

.v2-user-guide__header-text {
  min-width: 0;
}

.v2-user-guide__title {
  margin: 0;
  font-family: "Caveat", cursive !important;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.15;
  color: #2C8E8E !important;
}

.v2-user-guide__subtitle {
  margin: 4px 0 0;
  font-family: "Caveat", cursive !important;
  font-size: 1.05rem;
  font-weight: 600;
  color: #C24935;
  line-height: 1.2;
}

.v2-user-guide__footer {
  display: flex;
  justify-content: center;
  padding: 12px 16px 18px;
  border-top: 1px solid rgba(44, 142, 142, 0.14);
  background: rgba(255, 255, 255, 0.28);
}

.v2-user-guide__body {
  min-height: 0;
  overflow: auto;
  padding: 4px 18px 16px;
}

.v2-user-guide__intro {
  margin: 0 0 4px;
  font-family: "Inter", "Roboto", sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #1F2F2A;
}

.v2-user-guide__accordion {
  display: grid;
  gap: 8px;
  margin: 12px 0 16px;
}

.v2-user-guide__item {
  border: 1px solid rgba(44, 142, 142, 0.16);
  border-radius: 14px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 2px 8px rgba(31, 47, 42, 0.04);
}

.v2-user-guide__summary {
  cursor: pointer;
  font-family: "Caveat", cursive !important;
  font-weight: 700;
  font-size: 1.2rem;
  color: #1F2F2A;
  padding: 10px 4px;
  list-style: none;
}

.v2-user-guide__summary::-webkit-details-marker {
  display: none;
}

.v2-user-guide__section-body {
  padding: 0 4px 12px;
  font-family: "Inter", "Roboto", sans-serif;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #1F2F2A;
}

.v2-user-guide__ask {
  border-top: 1px solid rgba(44, 142, 142, 0.14);
  padding-top: 14px;
}

.v2-user-guide__ask-title {
  font-family: "Caveat", cursive !important;
  font-size: 1.25rem;
  font-weight: 700;
  color: #2C8E8E;
  margin: 0 0 8px;
}

.v2-user-guide__question {
  width: 100%;
  margin-bottom: 8px;
  min-height: 64px;
  resize: vertical;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(44, 142, 142, 0.22);
  border-radius: 12px;
}

.v2-user-guide__answer {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(44, 142, 142, 0.18);
}

.v2-user-guide__answer-meta {
  font-size: 0.8rem;
  color: rgba(31, 47, 42, 0.65);
  margin-bottom: 4px;
}

.v2-user-guide__answer-text {
  white-space: pre-wrap;
  font-size: 0.92rem;
  color: #1F2F2A;
  line-height: 1.45;
}

.v2-user-guide__miss {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(194, 73, 53, 0.2);
}

.v2-user-guide__miss-text {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: #1F2F2A;
  line-height: 1.4;
}

.v2-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  color: #1f2f2a;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 8px rgba(31, 47, 42, 0.08);
}

.v2-modal-close:hover {
  background: rgba(255, 255, 255, 0.9);
}

.v2-user-guide__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 160px;
  color: rgba(31, 47, 42, 0.7);
}

.v2-user-guide__loading-text {
  font-family: "Caveat", cursive;
  font-size: 1.15rem;
  color: #2C8E8E;
}

/* hidden + display:flex — иначе лоадер остаётся видимым поверх контента */
.v2-user-guide__loading[hidden],
#userGuideLoader[hidden] {
  display: none !important;
}

.v2-user-guide__error[hidden] {
  display: none !important;
}

.v2-user-guide__content[hidden] {
  display: none !important;
}

.v2-user-guide__loader {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(44, 142, 142, 0.25);
  border-top-color: #2C8E8E;
  border-radius: 50%;
  animation: v2-user-guide-spin 0.8s linear infinite;
}

@keyframes v2-user-guide-spin {
  to {
    transform: rotate(360deg);
  }
}

.v2-user-guide__error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 160px;
  padding: 12px;
  text-align: center;
}

.v2-user-guide__error-text {
  margin: 0;
  color: #1F2F2A;
  font-size: 0.95rem;
  line-height: 1.45;
  max-width: 420px;
}

@media (max-width: 560px) {
  .v2-user-guide__panel {
    width: min(96vw, 640px);
    border-radius: 18px;
    max-height: 92vh;
  }
  .v2-user-guide__header {
    padding: 16px 44px 10px 14px;
    gap: 10px;
  }
  .v2-user-guide__logo {
    width: 48px;
    height: 48px;
  }
  .v2-user-guide__title {
    font-size: 1.55rem;
  }
  .v2-user-guide__decor {
    width: 140px;
    height: 110px;
    opacity: 0.2;
  }
}

