/* ============================================================
   Слогометр — постановочный макет сервиса подсчёта слогов
   Дизайн: из макетов Figma (палитра, компоненты)
   ============================================================

   Палитра взята из макетов (hex-значения слоёв Figma/Lunacy):
   --accent:       #5091FE  (синий — кнопки, ссылки, логотип)
   --bg:           #EEF1F6  (фон страниц)
   --surface:      #FFFFFF  (карточки, шапка, футер)
   --border:       #E9EDF4  (рамки, разделители)
   --text:         #1A2A44  (основной текст, заголовки)
   --muted:        #7A8AA5  (вторичный текст, иконки)
   --muted-border: #B6C4DB  (рамки неактивных кнопок/чипов)
   --star:         #FEAD50  (оранжевая звезда "Больше опций", часы)
   --danger:       #FF4D4F  (удаление, "Выйти")
   --danger-bg:    #FEE     (розовый фон иконок удаления)
   --info-bg:      #EEF4FF  (голубой фон иконок)

   Шрифтовая пара:
   - Интерфейс + заголовки: Inter (400/500/600/700/800)
   - Рукописный логотип "Слогометр": Bad Script (Google Fonts)
   ============================================================ */

:root {
  --accent: #5091FE;
  --accent-dark: #3F80F0;
  --accent-soft: #EEF4FF;
  --bg: #EEF1F6;
  --surface: #FFFFFF;
  --border: #E9EDF4;
  --text: #1A2A44;
  --muted: #7A8AA5;
  --muted-border: #B6C4DB;
  --star: #FEAD50;
  --danger: #FF4D4F;
  --danger-bg: #FEE;
  --info-bg: #EEF4FF;
  --radius-card: 28px;
  --radius-btn: 8px;
  --shadow-card: 0 4px 24px rgba(26, 42, 68, 0.05);
  --font: 'Inter', 'Arial', sans-serif;
  --font-logo: 'Bad Script', cursive;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  display: block;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid transparent;
  border-radius: var(--radius-btn);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  padding: 11px 18px;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease, opacity .15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-dark); }

.btn-outline {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--accent);
}
.btn-outline:hover { background: var(--accent-soft); }

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

.btn-muted {
  background: transparent;
  color: var(--muted);
  border-color: var(--muted-border);
  cursor: default;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover { opacity: .9; }

.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-block { width: 100%; }

.btn:disabled,
.btn[disabled] {
  cursor: not-allowed;
  opacity: .55;
}

.btn[aria-disabled="true"] {
  pointer-events: none;
  opacity: .5;
}

/* ---------- Шапка ---------- */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 90;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 210px;
  height: 50px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo { display: flex; align-items: center; flex: 0 0 auto; }
.logo-text {
  font-family: var(--font-logo);
  font-size: 26px;
  color: var(--accent);
  line-height: 1;
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  gap: 8px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 14px;
  border: none;
  background: none;
  font-family: var(--font);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .15s;
}
.nav-link:hover { color: var(--text); }
.nav-link.is-active {
  color: var(--muted);
  border-bottom-color: var(--muted);
}
.nav-more { color: var(--accent); }
.nav-more-mobile { display: none; }
.nav-caret {
  margin-left: 2px;
  opacity: .8;
}
.nav-caret path { fill: var(--accent); }

/* Выпадающий список "Больше опций" */
.more-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(26, 42, 68, .12);
  padding: 8px;
  z-index: 100;
}
.more-dropdown[hidden] {
  display: none !important;
}
.header-nav { position: relative; }
.nav-more { position: relative; }

.header-account {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

/* Аватар + выпадающее меню (наведение на аватар — выпадающий список) */
.account-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: var(--font);
}

.account-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  line-height: 1;
  position: relative;
  padding-right: 16px;
}
.account-name::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  border: 4px solid transparent;
  border-top-color: var(--muted);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--muted-border);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
}

.account-pill .avatar {
  width: 34px;
  height: 34px;
}

/* Аватар-картинка (загруженное фото) */
.avatar.has-img {
  color: transparent;
  background-size: cover;
  background-position: center;
  background-color: var(--muted-border);
  overflow: hidden;
}
.avatar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.account-user { position: relative; }

.account-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(26, 42, 68, .12);
  padding: 8px;
  display: none;
  z-index: 100;
}
.account-dropdown::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}
.account-dropdown.show { display: block; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font);
}
.dropdown-item:hover { background: var(--bg); }
.dropdown-item.is-danger { color: var(--danger); }

/* Бургер (мобильное меню) */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.burger span {
  display: block;
  height: 2px;
  background: var(--muted);
  border-radius: 2px;
}

/* ---------- Мобильное меню ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  padding: 18px 24px 30px;
  overflow-y: auto;
}
.mobile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: none;
  border-radius: 14px;
  padding: 13px 18px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
}
.mobile-menu-item.is-active { color: var(--accent); }
.mobile-menu-item.is-danger { color: var(--danger); }
.mobile-menu-account {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.mobile-menu-features { margin-top: 30px; }

.features-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.features-title.is-wip { color: var(--text); }

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  color: var(--muted);
}
.feature-list.is-blue li { color: var(--accent); }
.feature-list .check {
  color: var(--accent);
  font-weight: 600;
  display: inline-flex;
}
.feature-list.is-blue .check { color: var(--accent); }
.feature-list .check.gold { color: var(--star); }

/* ---------- Страница ---------- */
.page {
  flex: 1 1 auto;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 210px 60px;
}

.view { padding-top: 0; }

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 44px 0 26px;
}
.hero-title {
  font-size: 43px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.hero-subtitle {
  margin-top: 8px;
  font-size: 16px;
  font-weight: 500;
  color: var(--muted);
}

/* ---------- Карточка редактора ---------- */
.editor-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 26px 28px 20px;
  box-shadow: var(--shadow-card);
  max-width: 860px;
  margin: 0 auto;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolbar-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: none;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
}
.toolbar-select:hover { background: var(--bg); }
.toolbar-select.readonly { cursor: default; }
.toolbar-select.readonly:hover { background: none; }
.toolbar-gap { flex: 1; }

.toolbar-fontmenu {
  position: absolute;
  top: 130px;
  left: calc(50% - 210px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(26, 42, 68, .12);
  padding: 6px;
  z-index: 60;
  display: flex;
  flex-direction: column;
}
.fontmenu-item {
  font-family: var(--font);
  font-size: 14px;
  padding: 8px 14px;
  border: none;
  background: none;
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted);
}
.fontmenu-item.is-selected { color: var(--accent); font-weight: 600; }
.fontmenu-item:hover { background: var(--bg); }

.toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  background: none;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
}
.toolbar-btn:hover { background: var(--bg); }
.toolbar-btn.is-danger:hover svg path { fill: var(--danger); }
.icon-a {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1;
}
.icon-a.is-big { font-size: 19px; }

/* Кнопка «Сохранить» в тулбаре редактора */
.toolbar-save {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  transition: background .15s ease;
  white-space: nowrap;
}
.toolbar-save:hover { background: var(--accent); color: #fff; }
.toolbar-save.is-saved {
  background: #EAF7EF;
  color: #2F9E5F;
}
.toolbar-save:disabled { opacity: .6; cursor: default; }

/* Тултипы при наведении */
[data-tooltip] {
  position: relative;
}
[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 280px;
  background: var(--text);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 120;
  white-space: normal;
  text-align: left;
  pointer-events: none;
}
[data-tooltip]:hover::before {
  content: '';
  position: absolute;
  top: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: var(--text);
  z-index: 120;
  pointer-events: none;
}

/* Название стихотворения */
.poem-title {
  display: block;
  width: 100%;
  margin: 22px 0 20px;
  border: none;
  background: none;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  color: var(--text);
}
.poem-title::placeholder { color: var(--text); opacity: 1; }
.poem-title:focus { outline: none; }

/* Секции */
.sections {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
/* Без внутренней прокрутки: полосы появлялись из-за тултипов кнопок строк,
   и форма «дрожала». Длинное стихотворение скроллится вместе со страницей. */

.section {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px 16px;
  background: #fff;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}
.section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  border: none;
  background: none;
  font-family: var(--font);
  min-width: 0;
}
.section-title:focus { outline: none; color: var(--accent); }
.section-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  background: none;
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted);
}
.icon-btn:hover { background: var(--bg); }

.line-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 4px 0;
  flex-wrap: wrap;
}
.line-num {
  width: 22px;
  font-size: 13px;
  color: var(--muted);
  text-align: right;
  padding-top: 6px;
  flex: 0 0 22px;
}
.line-input {
  flex: 1 1 auto;
  border: none;
  background: none;
  font-family: var(--font);
  font-size: 16px;
  color: var(--text);
  padding: 5px 0;
  border-radius: 6px;
  resize: none;
  min-height: 34px;
}
.line-input:focus { outline: none; background: #fff; }
.line-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  padding-top: 8px;
  min-width: 32px;
  text-align: right;
  flex: 0 0 auto;
}
.line-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-top: 2px;
}
.line-actions .icon-btn {
  width: 26px;
  height: 26px;
}

/* Кнопка добавления секции */
.add-section-wrap {
  display: flex;
  justify-content: center;
  margin: 18px 0 6px;
}
.add-section-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px dashed var(--muted-border);
  background: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.add-section-btn:hover { border-color: var(--accent); }
.add-section-btn:hover svg path { fill: var(--accent); }

/* Счётчики редактора */
.editor-stats {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.stats-left {
  display: flex;
  gap: 26px;
}
.stats-count-wrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.stats-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}
.stats-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}
.stats-right {
  text-align: right;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.35;
}

/* Плавающее меню внизу экрана при скролле */
.editor-toolbar.is-floating {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(26, 42, 68, .16);
  padding: 8px 12px;
  border-bottom: none;
  z-index: 80;
  width: max-content;
  gap: 4px;
}

/* ---------- SEO-блок ---------- */
.seo-block {
  max-width: 860px;
  margin: 48px auto 0;
}
.seo-h2 {
  font-size: 26px;
  font-weight: 600;
  margin: 28px 0 12px;
}
.seo-block p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}
.seo-list {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.faq {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}
.faq-item {
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  padding: 15px 18px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '';
  width: 12px;
  height: 7px;
  background: transparent;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform .15s ease;
}
.faq-item[open] summary::after {
  transform: rotate(225deg) translateY(-2px);
}
.faq-item p {
  padding: 0 18px 16px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}

/* Схема ритма (подсветка слогов, тариф «Профессиональный») */
.syllable-scheme {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 32px;
  margin-top: 4px;
  flex-wrap: wrap;
  width: 100%;
}
.syllable-box {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 4px;
}

/* ---------- Мои работы ---------- */
.works-list-wrap {
  max-width: 860px;
  margin: 0 auto;
}
.works-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.search-box {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 18px;
}
.search-box input {
  flex: 1 1 auto;
  border: none;
  background: none;
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
}
.search-box input::placeholder { color: var(--muted); }
.search-box input:focus { outline: none; }

.works-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.work-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px 22px;
  position: relative;
}
.work-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.work-left {
  min-width: 0;
}
.work-title {
  font-size: 18px;
  font-weight: 700;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  line-height: 1.3;
}
.work-title:hover {
  color: var(--accent);
  text-decoration: underline;
}
.work-date {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}
.work-badges {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}
.work-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.4;
}
.work-badge .badge-num {
  color: var(--text);
  font-weight: 600;
}
.work-badge .badge-name {
  color: #51607a;
}

.work-excerpt {
  display: flex;
  gap: 14px;
  margin: 16px 0;
}
.work-excerpt::before {
  content: '';
  width: 3px;
  flex: 0 0 3px;
  border-radius: 2px;
  background: var(--accent);
}
.work-excerpt p {
  font-style: italic;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.55;
}
.work-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}
.work-footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.work-save-txt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--muted-border);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  background: none;
  cursor: pointer;
  font-family: var(--font);
}
.work-save-txt:hover { border-color: var(--accent); color: var(--accent); }
.work-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.action-oval {
  width: 39px;
  height: 39px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.action-oval.is-info { background: var(--info-bg); }
.action-oval.is-danger { background: var(--danger-bg); }
.action-oval:hover svg path { opacity: .8; }

/* Ограничение доступа */
.works-limits {
  max-width: 400px;
  margin: 30px auto;
}
.limit-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 32px 28px;
  text-align: center;
}
.limit-emoji { margin-bottom: 14px; }
.limit-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}
.limit-text {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 22px;
  line-height: 1.5;
}

/* Пагинация */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 26px;
}
.page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--muted-border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.page-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.page-btn:disabled { opacity: .5; cursor: default; }
.page-gap { color: var(--muted); }

/* ---------- Тарифы ---------- */
.billing-switch {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 34px;
}
.billing-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  border: 2px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.billing-btn.is-active {
  border-color: var(--text);
  color: var(--text);
}
.badge-discount {
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1080px;
  margin: 0 auto;
}
.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
}
.plan.is-featured {
  border: 2px solid var(--accent);
  position: relative;
}
.plan-title {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}
.plan-desc {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin: 10px 0 18px;
  line-height: 1.45;
  min-height: 40px;
}
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  justify-content: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.price-num {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
}
.price-period-suffix {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  margin-left: 4px;
}
.price-period {
  font-size: 13px;
  color: var(--muted);
}
.plan .feature-list {
  flex: 1 1 auto;
  margin-bottom: 22px;
}
.plan .feature-list li {
  font-size: 14px;
  color: var(--accent);
}
.plan .feature-list .is-wip {
  color: var(--text);
  font-weight: 500;
  margin-top: 4px;
}
.plan .feature-list .is-wip .check { color: var(--star); }

.plans-note {
  max-width: 720px;
  margin: 34px auto 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
}
.plans-note + .plans-note { margin-top: 10px; }

/* ---------- Профиль ---------- */
.profile-layout {
  max-width: 1080px;
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 24px;
  align-items: start;
}
.profile-nav {
  background: var(--surface);
  border-radius: 18px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.profile-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font);
}
.profile-nav-item:hover { background: var(--bg); }
.profile-nav-item.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}
.profile-nav-item.is-danger { color: var(--danger); }
.profile-nav-item.is-danger:hover { background: var(--danger-bg); }

.profile-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.profile-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 26px 28px;
}
.profile-card .avatar-big {
  width: 64px;
  height: 64px;
  font-size: 20px;
  margin-bottom: 12px;
}
.profile-name {
  font-size: 18px;
  font-weight: 700;
}
.profile-email {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}
.stats-card .stats-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
}
.stats-row {
  display: flex;
  gap: 44px;
}
.stat-num {
  font-size: 30px;
  font-weight: 700;
}
.stat-label {
  font-size: 13px;
  color: var(--muted);
  display: block;
}

/* Редактирование профиля */
.edit-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.edit-card .avatar-big {
  margin: 6px auto 0;
}
.edit-card .btn { align-self: center; }
.form-row {
  display: flex;
  gap: 16px;
  width: 100%;
}
.edit-card form {
  width: 100%;
  max-width: 460px;
  margin: 14px auto 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Формы */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 0;
}
.form-field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.form-field input {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 10px;
  padding: 12px 14px;
  width: 100%;
  transition: border-color .15s, background .15s;
}
.form-field input::placeholder { color: var(--muted); }
.form-field input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}
.form-field input.is-readonly {
  color: var(--muted);
  cursor: not-allowed;
}
.input-wrap {
  position: relative;
}
.input-wrap input {
  padding-right: 42px;
}
.eye-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: none;
  background: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}
.eye-btn:hover { background: var(--border); }

.field-error,
.form-note {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.form-note { margin-top: 16px; }

.form-switch {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 14px;
}
.form-switch a,
.link-blue {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.form-link-row { text-align: right; font-size: 13px; }

/* Настройки */
.settings-card .card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  margin-top: 20px;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
}
.danger-row .link-danger {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font);
}
.switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.switch-slider {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: var(--muted-border);
  position: relative;
  transition: background .15s ease;
}
.switch-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s ease;
}
.switch input:checked + .switch-slider { background: var(--accent); }
.switch input:checked + .switch-slider::after { transform: translateX(20px); }

/* Подписка */
.plan-single {
  background: #fff;
  border: 2px solid var(--accent);
  border-radius: 18px;
  padding: 26px 24px;
  max-width: 440px;
}
.plan-single .feature-list li { font-size: 14px; color: var(--accent); }
.plan-period-info,
.plan-payment-info {
  font-size: 14px;
  color: var(--muted);
  margin-top: 8px;
}
.plan-period-info strong,
.plan-payment-info strong { color: var(--text); font-weight: 600; }
.plan-single .btn { margin-top: 18px; }

/* ---------- Футер ---------- */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 1280px;
  margin: auto;
  padding: 26px 210px;
  width: 100%;
}
.footer-copy {
  font-size: 15px;
  font-weight: 600;
}
.footer-mail {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.footer-caption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.footer-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.footer-social {
  display: inline-flex;
  transition: transform .15s;
}
.footer-social:hover { transform: translateY(-2px); }

/* ---------- Модальные окна ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 42, 68, .3);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 300;
}
.modal-box {
  background: var(--surface);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(26, 42, 68, .18);
  width: 100%;
  max-width: 380px;
  padding: 26px 28px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
.modal-wide { max-width: 560px; }
.modal-small { max-width: 360px; }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.modal-title {
  font-size: 20px;
  font-weight: 600;
}
.modal-intro {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 16px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

/* Вставка текста */
.paste-area {
  width: 100%;
  min-height: 320px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  padding: 14px 16px;
  resize: vertical;
}
.paste-area:focus { outline: none; border-color: var(--accent); }
.paste-area::placeholder { color: var(--muted); }

/* Просмотр */
.modal-article { max-width: 720px; }
.preview-title {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 22px;
}
.preview-body {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  max-height: 420px;
  overflow-y: auto;
  white-space: pre-wrap;
}
.preview-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

/* Подбор рифмы */
.modal-rhyme { max-width: 620px; }
.rhyme-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
}
.rhyme-search input {
  flex: 1;
  border: none;
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
}
.rhyme-search input:focus { outline: none; }
.rhyme-search-btn {
  border: none;
  background: none;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 8px;
}
.rhyme-search-btn:hover { background: var(--bg); }
.rhyme-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  flex-wrap: wrap;
}
.filter-select {
  font-family: var(--font);
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}
.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.checkbox-label input { display: none; }
.checkbox-box {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  position: relative;
  transition: border-color .15s, background .15s;
  flex: 0 0 18px;
}
.checkbox-label input:checked + .checkbox-box {
  border-color: var(--accent);
  background: var(--accent);
}
.checkbox-label input:checked + .checkbox-box::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.rhyme-found {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin: 16px 0 10px;
}
.rhyme-quota {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 0;
}
.rhyme-results {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding: 4px 2px;
}
.rhyme-results.is-column {
  flex-direction: column;
  align-items: flex-start;
}
.rhyme-chip {
  border: 1px solid var(--muted-border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 14px;
  color: var(--text);
  background: none;
  cursor: pointer;
  font-family: var(--font);
  transition: background .15s, border-color .15s;
}
.rhyme-chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.rhyme-chip.is-selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.rhyme-actions { justify-content: space-between; }
.rhyme-actions .btn-text { color: var(--accent); }

.rhyme-loading {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  display: inline-block;
  flex: 0 0 16px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Версии стихотворения */
.modal-versions { max-width: 860px; }
.versions-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
}
.versions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 6px;
}
.version-card {
  border: 1px solid var(--muted-border);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  background: none;
  font-family: var(--font);
  text-align: left;
  width: 100%;
}
.version-card.is-current { border-color: var(--accent); }
.version-card.is-active { border-color: var(--accent); background: var(--accent-soft); }
.version-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.version-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 1px 8px;
}
.version-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
}
.versions-preview {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.versions-preview-body {
  flex: 1;
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  max-height: 340px;
  overflow-y: auto;
}
.versions-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  margin-top: 14px;
}
.versions-note {
  font-size: 13px;
  color: var(--muted);
}

/* Удаление */
.delete-emoji { text-align: center; margin-bottom: 12px; }
.delete-title {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
}
.delete-text {
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
  margin-bottom: 24px;
}

/* Оплата */
.modal-payment { max-width: 420px; }
.payment-tariff-name {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 14px;
}
.payment-note {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}
.promo-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.promo-form {
  margin: 14px 0;
}
.promo-form label {
  font-size: 13px;
  font-weight: 500;
  display: block;
  margin-bottom: 6px;
}
.input-row {
  display: flex;
  gap: 10px;
}
.input-row input {
  flex: 1;
  font-family: var(--font);
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  padding: 11px 14px;
}
.input-row input:focus { outline: none; border-color: var(--accent); background: #fff; }
.payment-total {
  font-size: 15px;
  color: var(--text);
  text-align: center;
  margin: 16px 0;
}
.payment-total strong { color: var(--accent); }
.modal-payment .btn-text.btn-block {
  margin-top: 10px;
}

/* Предупреждение о сохранении */
.save-warn-icon { margin: 0 auto 10px; display: flex; justify-content: center; }
.save-online {
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin: 18px 0 8px;
}
.save-online svg { flex: 0 0 auto; margin-top: 2px; }
.save-tariffs {
  font-size: 13px;
  display: inline-block;
  margin-left: 28px;
}

/* Всплывающее меню замены слова (рифма/синоним/ассоциация) */
.word-menu {
  position: absolute;
  z-index: 250;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(26, 42, 68, .14);
  padding: 6px;
  min-width: 130px;
}
.word-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.word-menu-item:hover { background: var(--bg); color: var(--accent); }

/* ---------- Состояния (пусто/ввод/результат/ошибка) ---------- */
.line-input.is-empty { color: var(--muted); }
.line-input.has-text { color: var(--text); }
.sections:empty + .add-section-wrap { }
.empty-hint {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 24px 0;
}
[aria-disabled="true"].toolbar-btn {
  opacity: .5;
  cursor: not-allowed;
}

/* ---------- Тост-уведомления ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(26, 42, 68, .25);
  z-index: 400;
  max-width: min(480px, calc(100vw - 40px));
  text-align: center;
  line-height: 1.45;
}
.toast.is-error { background: var(--danger); }
.toast.is-success { background: #2F9E5F; }

/* ---------- Страницы входа/регистрации ---------- */
.auth-page {
  flex: 1 1 auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 20px 60px;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  width: 100%;
  max-width: 400px;
  padding: 30px 30px 26px;
}
.auth-card .auth-title {
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 6px;
}
.auth-card .auth-subtitle {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 22px;
}
.auth-card .btn-block { margin-top: 6px; }

.auth-tabs {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 22px;
  background: var(--bg);
  border-radius: 10px;
  padding: 4px;
}
.auth-tab {
  flex: 1;
  text-align: center;
  padding: 9px 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font);
}
.auth-tab.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(26, 42, 68, .08);
}

.auth-code-banner {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text);
  padding: 12px 14px;
  margin-bottom: 16px;
  line-height: 1.5;
}
.auth-code-banner .link-blue { font-weight: 600; }

.auth-error {
  background: var(--danger-bg);
  border: 1px solid var(--danger);
  border-radius: 10px;
  font-size: 13px;
  color: var(--danger);
  padding: 12px 14px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.auth-social {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.auth-social-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.auth-social-row {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.auth-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font);
  transition: border-color .15s;
}
.auth-social-btn:hover { border-color: var(--accent); }

/* ---------- Куки-плашка ---------- */
.cookie-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(26, 42, 68, .16);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
}
.cookie-text {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  flex: 1 1 auto;
}
@media (max-width: 720px) {
  .cookie-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 14px;
    left: 10px;
    right: 10px;
    bottom: 10px;
  }
  .cookie-text { font-size: 12px; line-height: 1.4; }
  .cookie-bar .btn { padding: 8px 12px; font-size: 13px; }
}

/* ---------- Рабочий раздел владельца ---------- */
.desk-page {
  flex: 1 1 auto;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}
.desk-gate {
  max-width: 420px;
  margin: 60px auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 30px 28px;
  text-align: center;
}
.desk-gate .form-field { margin-bottom: 14px; text-align: left; }
.desk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.desk-title { font-size: 24px; font-weight: 700; }
.desk-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.desk-tab {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 10px;
  padding: 9px 16px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.desk-tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.desk-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 22px;
  margin-bottom: 16px;
}
.desk-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
}
.desk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.desk-table th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.desk-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  word-break: break-word;
}
.desk-table tr:last-child td { border-bottom: none; }
.desk-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.desk-badge.is-pro { background: var(--accent-soft); color: var(--accent); }
.desk-badge.is-standard { background: var(--info-bg); color: var(--accent); }
.desk-badge.is-free { background: var(--bg); color: var(--muted); }
.desk-badge.is-active { background: #EAF7EF; color: #2F9E5F; }
.desk-badge.is-expired { background: var(--danger-bg); color: var(--danger); }
.desk-badge.is-pending { background: #FFF6E8; color: #C77F12; }
.desk-badge.is-succeeded { background: #EAF7EF; color: #2F9E5F; }
.desk-badge.is-canceled { background: var(--bg); color: var(--muted); }
.desk-form-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.desk-form-row .form-field { max-width: 220px; }
.desk-empty {
  font-size: 14px;
  color: var(--muted);
  padding: 16px 0;
  text-align: center;
}
.desk-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.desk-note { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.5; }

/* ---------- Адаптивность ---------- */
@media (max-width: 1100px) {
  .header-inner, .footer, .page { padding-left: 40px; padding-right: 40px; }
}

@media (max-width: 900px) {
  .plans { grid-template-columns: 1fr 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-nav { flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 720px) {
  /* мобильная версия — приоритетная для поэтов */
  .header-inner { padding: 0 14px; gap: 8px; }
  .header-nav { display: none; }
  .nav-more-mobile { display: inline-flex; margin: 0; padding: 6px 10px; order: 2; }
  .account-guest { display: none; }
  .account-user { margin-left: auto; order: 1; }
  .burger { display: flex; order: 3; }
  .logo { flex: 0 0 auto; order: 0; }
  .logo-svg { width: 34px; height: 29px; }

  .page { padding: 0 14px 40px; }

  .account-pill .account-name { display: none; }
  .account-pill .avatar { width: 34px; height: 34px; }

  .hero { padding: 28px 0 20px; }
  .hero-title { font-size: 27px; }
  .hero-subtitle { font-size: 14px; padding: 0 10px; }

  .editor-card {
    border-radius: 18px;
    padding: 16px 16px 16px;
  }
  .editor-toolbar {
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 14px;
  }
  .toolbar-left, .toolbar-right { flex: 1 1 auto; justify-content: space-between; }
  .sections { max-height: none; overflow: visible; }

  .editor-stats { flex-direction: column; gap: 10px; align-items: flex-start; }
  .stats-right { text-align: left; }

  .works-toolbar { flex-direction: column; align-items: stretch; }
  .work-head { flex-direction: column; }
  .work-excerpt p { font-size: 15px; }

  .plans { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .billing-btn { padding: 10px 16px; }

  .profile-nav { flex-direction: column; }
  .form-row { flex-direction: column; gap: 14px; }

  .versions-layout { grid-template-columns: 1fr; }
  .versions-list { max-height: 180px; }
  .versions-actions { flex-direction: column; align-items: stretch; }

  .modal-box { padding: 20px 18px; }
  .header-inner { min-height: 50px; }

  .footer { display: none; }

  .seo-h2 { font-size: 22px; }
  .seo-list { font-size: 14px; }

  .auth-page { padding: 24px 14px 40px; }
  .auth-card { padding: 24px 20px 22px; }
  .desk-page { padding: 20px 14px 40px; }
  .desk-table { font-size: 12px; }
  .desk-table th, .desk-table td { padding: 7px 6px; }
}

/* ---- Спец-состояние "Каждая страница списка минимум 10 работ" ---- */
@media (max-width: 480px) {
  .page { padding: 0 14px 32px; }
  .stats-left { gap: 18px; }
}
