.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 {
  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;
}
.v2-app-shell .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 {
  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 {
  font-family: "Caveat", cursive;
  font-size: 1.3rem;
  font-weight: 700;
  color: #1F2F2A;
  margin: 0 0 16px 0;
}
.v2-app-shell .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 {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.v2-app-shell .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;
}
.v2-app-shell .modal-btn:hover {
  background-color: #88C4B3;
}

/* Онбординг: шире обычного модального окна, поверх 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 {
    bottom: 88px;
    right: 18px;
  }
}
@media (max-width: 768px) {
  .support-floating-btn {
    width: 48px;
    height: 48px;
    font-size: 24px;
    bottom: 88px;
    right: 16px;
  }
}

/* Модалка техподдержки — на весь экран, выше UpsellCard */
.v2-app-shell .support-modal-app.upsell-card {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(8, 12, 10, 0.42);
  z-index: 10055;
  animation: none;
}
.v2-app-shell .support-modal-app.upsell-card .upsell-card-container {
  width: min(420px, 100%);
  max-height: 90vh;
  overflow: auto;
}
