:root {
  --bg: #e4ebf5;
  --bg-elevated: #ecf2ff;
  --accent: #8b5cf6;
  --accent-soft: rgba(139, 92, 246, 0.12);
  --border: #cfd8e7;
  --text-main: #111827;
  --text-muted: #6b7280;
  --danger: #f97373;
  --success: #22c55e;
  --radius-lg: 24px;
  --radius-md: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: radial-gradient(circle at top left, #f5f7fb, #dfe7f3 55%);
  color: var(--text-main);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 100%;
  overflow-x: hidden;
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

html {
  scroll-behavior: smooth;
}
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

.header {
  border-bottom: 1px solid rgba(207, 216, 231, 0.9);
  backdrop-filter: blur(16px);
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.98));
  position: sticky;
  top: 0;
  z-index: 10;
}

.tg-miniapp .header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  padding-top: calc(14px + env(safe-area-inset-top, 0));
}

.tg-miniapp .header-inner {
  padding-top: calc(14px + env(safe-area-inset-top, 0) + 32px);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 999px;
  background: #eef3ff;
  box-shadow: 4px 4px 8px rgba(163, 177, 198, 0.6),
    -4px -4px 8px rgba(255, 255, 255, 0.9);
}

.lang-btn {
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
  color: var(--text-muted);
  transition: 0.18s ease-out;
}

.lang-btn-active {
  background: var(--accent);
  color: #f9fafb;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-link {
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: 0.2s ease;
  text-decoration: none;
}

.nav-link:hover {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: 6px 6px 12px rgba(163, 177, 198, 0.6),
    -6px -6px 12px rgba(255, 255, 255, 0.9);
}

.nav-link-secondary {
  border: 1px solid rgba(248, 250, 252, 0.1);
}

.nav-toggle {
  display: none;
  position: relative;
  width: 32px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  cursor: pointer;
  padding: 5px 4px;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #4b5563;
  margin: 0;
}

/* Profile */
.profile-wrapper {
  position: relative;
  margin-left: 12px;
}

.profile-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #eef3ff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 4px 4px 8px rgba(163, 177, 198, 0.6),
    -4px -4px 8px rgba(255, 255, 255, 0.9);
  transition: 0.2s ease;
  padding: 0;
  overflow: hidden;
}

.profile-btn:hover {
  box-shadow: 6px 6px 12px rgba(163, 177, 198, 0.7),
    -6px -6px 12px rgba(255, 255, 255, 1);
}

.profile-avatar {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 600;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-avatar-letter {
  background: var(--accent);
  color: white;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--bg);
  border-radius: var(--radius-md);
  box-shadow: 9px 9px 18px rgba(163, 177, 198, 0.6),
    -9px -9px 18px rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.8);
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: 0.2s ease;
  z-index: 100;
}

.profile-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.profile-info-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}

.profile-info-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info-text {
  overflow: hidden;
}

.profile-info-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-info-username {
  font-size: 12px;
  color: var(--text-muted);
}

.profile-menu-item {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: 8px;
  text-align: left;
  font-size: 13px;
  color: var(--text-main);
  cursor: pointer;
  transition: 0.15s ease;
}

.profile-menu-item:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.profile-menu-item.logout {
  color: var(--danger);
}

.profile-menu-item.logout:hover {
  background: rgba(249, 115, 115, 0.1);
}

.profile-tabs {
  margin-bottom: 20px;
}

.profile-tabs-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--bg-soft);
  border-radius: 14px;
  padding: 4px;
  box-shadow: inset 2px 2px 4px rgba(163, 177, 198, 0.4);
}

/* Админка: три вкладки в одну строку */
#admin .profile-tabs-split {
  grid-template-columns: 1fr 1fr 1fr;
}

.profile-tabs-split .profile-tab-btn {
  padding: 12px 16px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.profile-tabs-split .profile-tab-btn:hover {
  color: var(--accent);
}

.profile-tabs-split .profile-tab-btn.active {
  background: var(--bg);
  color: var(--accent);
  box-shadow: 4px 4px 10px rgba(163, 177, 198, 0.5),
    -2px -2px 6px rgba(255, 255, 255, 0.9);
}

.profile-tab-btn {
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  background: var(--bg-soft);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.profile-tab-btn:hover {
  color: var(--accent);
}

.profile-tab-btn.active {
  background: var(--accent);
  color: #f9fafb;
}

.profile-tab-pane {
  min-height: 80px;
}

.main {
  flex: 1;
  padding: 32px 16px 48px;
}

.tg-miniapp .main {
  padding-top: calc(92px + env(safe-area-inset-top, 0) + 32px);
  padding-bottom: calc(48px + env(safe-area-inset-bottom, 0) + 56px);
}

.tg-miniapp .pill-row {
  gap: 14px;
  margin: 24px 0 32px;
}

.tg-miniapp .pill {
  padding: 12px 18px;
  font-size: 14px;
}

.tg-miniapp .btn-row {
  gap: 18px;
  margin-top: 32px;
}

.tg-miniapp .btn-row .primary-btn,
.tg-miniapp .btn-row .secondary-btn {
  min-height: 52px;
  padding: 16px 28px;
  font-size: 16px;
}

.footer {
  border-top: 1px solid rgba(207, 216, 231, 0.9);
  padding: 16px 0 22px;
  background: rgba(244, 247, 252, 0.96);
}

.tg-miniapp .footer {
  padding-bottom: calc(22px + env(safe-area-inset-bottom, 0) + 56px);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 12px;
}

.link-like {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  cursor: pointer;
  font-size: 12px;
  text-decoration: none;
}

/* Компактные кнопки в админ-панели */
.admin-order-card .secondary-btn,
.admin-order-card .primary-btn {
  padding: 6px 12px;
  font-size: 12px;
}

.admin-order-card .admin-comment-input {
  padding: 6px 10px;
  font-size: 12px;
  min-width: 140px;
}

.admin-order-card .admin-revision-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.admin-order-card .admin-revision-row .input {
  flex: 1;
  min-width: 0;
}

.admin-order-card .admin-revision-row .secondary-btn {
  flex-shrink: 0;
}

/* Контейнер блога: отступ сверху под фикс. нав, кнопка + в потоке страницы и уезжает под нав при скролле */
.blog-page-wrap {
  position: relative;
  padding: 80px 0 24px;
  min-height: 100vh;
}

.blog-hero-card-with-add {
  position: relative;
  padding: 40px 30px;
  text-align: center;
}

.blog-add-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 6px 6px 12px rgba(163, 177, 198, 0.6), -4px -4px 12px rgba(255, 255, 255, 0.9);
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 1;
}

.blog-add-btn:hover {
  transform: scale(1.05);
  box-shadow: 8px 8px 16px rgba(163, 177, 198, 0.7), -6px -6px 14px rgba(255, 255, 255, 1);
}

.back-link {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 8px;
}

.back-link:hover { opacity: 0.8; }

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 20px;
}

@media (max-width: 840px) {
  .page-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.card {
  border-radius: var(--radius-lg);
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.8);
  padding: 20px 18px;
  box-shadow: 9px 9px 18px rgba(163, 177, 198, 0.75),
    -9px -9px 18px rgba(255, 255, 255, 0.9);
}

.card-muted {
  background: var(--bg);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  background: #eef3ff;
  border: 1px solid rgba(207, 216, 231, 0.9);
  color: var(--text-muted);
  margin-bottom: 10px;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.25);
}

.page-title {
  font-size: 26px;
  font-weight: 650;
  margin: 0 0 8px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 520px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0 24px;
}

.pill {
  padding: 10px 16px;
  border-radius: 999px;
  background: #eef3ff;
  border: 1px solid rgba(207, 216, 231, 0.9);
  font-size: 13px;
  color: var(--text-muted);
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 500;
  transition: 0.18s ease-out;
}

.primary-btn {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: #f9fafb;
  box-shadow: 8px 8px 16px rgba(163, 177, 198, 0.7),
    -4px -4px 12px rgba(255, 255, 255, 0.9);
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 10px 10px 20px rgba(163, 177, 198, 0.85),
    -6px -6px 14px rgba(255, 255, 255, 1);
}

.secondary-btn {
  background: var(--bg);
  color: var(--text-main);
  border: 1px solid rgba(207, 216, 231, 0.9);
  box-shadow: 6px 6px 12px rgba(163, 177, 198, 0.6),
    -6px -6px 12px rgba(255, 255, 255, 0.9);
}

.ghost-btn {
  background: transparent;
  color: var(--text-muted);
}

.btn-row {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
  align-items: stretch;
}

.btn-row .primary-btn,
.btn-row .secondary-btn {
  width: 100%;
  min-height: 48px;
}

.muted-text {
  font-size: 12px;
  color: var(--text-muted);
}

.timeline {
  margin-top: 14px;
}

.timeline-item {
  display: flex;
  gap: 10px;
  padding: 8px 0;
}

.timeline-bullet {
  width: 8px;
  margin-top: 6px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-body {
  font-size: 13px;
}

.timeline-title {
  font-weight: 500;
  margin-bottom: 2px;
}

.timeline-desc {
  color: var(--text-muted);
}

.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.chip {
  border-radius: 999px;
  border: 1px solid rgba(207, 216, 231, 0.9);
  padding: 3px 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.section-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid rgba(207, 216, 231, 0.9);
  margin-bottom: 8px;
}

.price-main {
  font-size: 18px;
  font-weight: 700;
}

.price-caption {
  font-size: 12px;
  color: var(--text-muted);
}

.stacked-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.input,
.textarea,
.select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(207, 216, 231, 0.9);
  background: var(--bg);
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.5);
}

.textarea {
  min-height: 80px;
  resize: vertical;
}

.field-row {
  display: flex;
  gap: 10px;
}

.field {
  margin-bottom: 10px;
}

.field-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(207, 216, 231, 0.9);
  cursor: pointer;
  font-size: 12px;
  background: var(--bg);
}

.checkbox-pill input {
  accent-color: var(--accent);
}

.preview-letter {
  border-radius: var(--radius-lg);
  background: #f9fafb;
  color: #111827;
  padding: 18px 18px 20px;
  font-size: 13px;
  line-height: 1.5;
  max-height: 480px;
  overflow: auto;
  box-shadow: inset 0 0 0 1px #e5e7eb;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.preview-letter h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 14px;
}

.tagline {
  font-size: 12px;
  color: var(--text-muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
}

.status-pill.ok {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.status-pill.wait {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
}

.status-pill.draft {
  background: rgba(148, 163, 184, 0.18);
  color: #4b5563;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th,
.table td {
  padding: 8px 6px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.table th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 500;
}

.table-actions {
  display: flex;
  gap: 6px;
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.article-item {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid rgba(207, 216, 231, 0.9);
  cursor: pointer;
}

.article-title {
  font-size: 14px;
  font-weight: 500;
}

.article-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

.comment {
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #eef3ff;
}

.comment-author {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.comment-body {
  font-size: 13px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.tag {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef3ff;
  border: 1px solid rgba(207, 216, 231, 0.9);
  font-size: 11px;
  color: var(--text-muted);
}

.divider {
  height: 1px;
  background: rgba(148, 163, 184, 0.35);
  margin: 10px 0;
}

.alert {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
}

.alert-info {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #4c1d95;
}

.alert-warning {
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.5);
  color: #fef9c3;
}

.alert-success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.5);
  color: #dcfce7;
}

.small {
  font-size: 11px;
}

.centered {
  text-align: center;
}

/* Лэндинг и неоморфизм */

.landing {
  max-width: 1120px;
  margin: 0 auto;
}

.section {
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.section-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-section {
  margin-bottom: 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
}

@media (max-width: 880px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.neo-card {
  border-radius: var(--radius-lg);
  background: var(--bg);
  box-shadow: 9px 9px 18px rgba(163, 177, 198, 0.75),
    -9px -9px 18px rgba(255, 255, 255, 0.9);
  padding: 22px 20px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  max-width: 100%;
  box-sizing: border-box;
}

.hero-main {
  position: relative;
}

.hero-side {
  align-self: stretch;
}

.hero-steps {
  padding-left: 18px;
  line-height: 1.6;
}

.section-header {
  margin-bottom: 18px;
}

.section-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 520px;
}

.cards-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 840px) {
  .cards-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.constructor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 20px;
}

@media (max-width: 880px) {
  .constructor-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.preview-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preview-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}

.section-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.price-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.price-card-accent {
  position: relative;
}

.price-card-accent::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.24), transparent);
  z-index: -1;
}

.price-title {
  font-size: 16px;
  font-weight: 600;
  margin: 4px 0 2px;
}

.legal-content {
  line-height: 1.6;
}

.legal-content p {
  margin: 0 0 10px;
}

.legal-content p:last-child {
  margin-bottom: 0;
}

.legal-content h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 20px 0 10px;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content ul {
  margin: 0 0 10px;
  padding-left: 20px;
}

.legal-content li {
  margin-bottom: 4px;
}

.legal-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-content a:hover {
  color: var(--accent-dark, #6d28d9);
}

.legal-page-content {
  max-width: 700px;
  margin-top: 16px;
}

/* Modal */
.modal-overlay .modal-content {
  background: var(--bg);
  border-radius: 18px;
  padding: 24px;
  max-width: 500px;
  width: 100%;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-overlay .modal-title {
  margin: 0 0 16px;
  font-size: 18px;
}

.modal-overlay .modal-preview {
  flex: 1;
  overflow: auto;
  background: #f9fafb;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
  font-size: 12px;
  line-height: 1.5;
}

.modal-overlay .modal-preview pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
}

.modal-overlay .modal-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.modal-overlay .modal-actions .primary-btn,
.modal-overlay .modal-actions .secondary-btn {
  padding: 8px 14px;
  font-size: 13px;
}

.price-list {
  margin: 6px 0 8px;
  padding-left: 18px;
}

.full-width {
  width: 100%;
  justify-content: center;
}

.badge-soft {
  background: #f3f5ff;
}

.float-up {
  animation: floatUp 1.2s ease-out forwards;
}

.float-up-delayed {
  animation: floatUp 1.2s ease-out 0.12s forwards;
}

@keyframes floatUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* Адаптация под мобильные устройства */

@media (max-width: 640px) {
  .container {
    padding-inline: 20px;
  }

  .header-inner {
    gap: 8px;
  }

  .nav-dropdown-wrap {
    position: relative;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    min-width: 180px;
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 10px 10px 8px;
    border-radius: 18px;
    background: var(--bg);
    box-shadow: 10px 10px 20px rgba(163, 177, 198, 0.7),
      -8px -8px 18px rgba(255, 255, 255, 0.96);
    z-index: 20;
  }

  .nav.nav-open {
    display: flex;
  }

  .nav-link {
    width: 100%;
    justify-content: flex-start;
  }

  .main {
    padding-inline: 20px;
  }

  .page-title {
    font-size: 22px;
  }

  .page-subtitle {
    font-size: 13px;
  }

  .btn-row {
    flex-direction: column;
  }

  .btn-row .primary-btn,
  .btn-row .secondary-btn {
    width: 100%;
    justify-content: center;
  }

  /* Profile mobile */
  .profile-wrapper {
    margin-left: 8px;
  }

  .profile-btn {
    width: 36px;
    height: 36px;
  }

  .profile-dropdown {
    right: -8px;
    min-width: 200px;
  }
}

/* Экран загрузки при возврате с оплаты */
.payment-return-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-elevated, #ecf2ff);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.payment-return-loader__spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border, #cfd8e7);
  border-top-color: var(--accent, #8b5cf6);
  border-radius: 50%;
  animation: payment-return-spin 0.9s linear infinite;
}
.payment-return-loader__text {
  color: var(--text-muted, #6b7280);
  font-size: 14px;
}
@keyframes payment-return-spin {
  to { transform: rotate(360deg); }
}
