:root {
  --bg: #08080b;
  --surface: #101015;
  --surface-2: #15151d;
  --surface-3: #1d1b27;
  --line: #2b2a35;
  --text: #f8fafc;
  --muted: #9ca3af;
  --dim: #6b7280;
  --orange: #ff8a3d;
  --orange-2: #ffb273;
  --purple: #8b5cf6;
  --cyan: #38bdf8;
  --green: #22c55e;
  --danger: #ef4444;
  --radius: 8px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

#app-shell {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  height: 100%;
  max-width: 560px;
  margin: 0 auto;
  background: var(--bg);
  /* Гарантия против горизонтального «выезда» контента за правый край (жалоба владельца 2026-07-04):
     клипаем оболочку по горизонтали, а вертикальный скролл живёт внутри .screen. */
  overflow: hidden;
}
/* Строки оболочки (topbar/screen/mini-player/tabbar) не должны раздуваться min-content-контентом
   (длинные названия, ряды кнопок) — разрешаем им ужиматься, иначе grid-трек вылезает вправо. */
#app-shell > * { min-width: 0; }

.topbar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(8, 8, 11, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(255, 168, 61, 0.28));
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.balance-pill[hidden] { display: none; }

.balance-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 78px;
  height: 44px;
  padding: 0 17px 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: #12121a;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.balance-ico {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  color: var(--orange);
}

.balance-ico svg {
  width: 15px;
  height: 15px;
}

.balance-value {
  min-width: 14px;
  text-align: center;
}

.balance-plus {
  position: absolute;
  right: -5px;
  bottom: -5px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
}

.balance-plus svg {
  width: 11px;
  height: 11px;
}

.brand-title {
  overflow: hidden;
  color: var(--text);
  font-size: 17px;
  line-height: 1.18;
  font-weight: 900;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.brand-subtitle {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.icon-button,
.chip-button,
.action-button,
.tab-button,
.filter-chip,
.segment,
.shortcut-card,
.poet-tile,
.stack-tile,
.poem-row,
.listen-button,
.create-gradient-button,
.back-inline {
  border: 0;
  cursor: pointer;
}

.icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: #14141c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--orange-2);
  font-size: 20px;
}

.screen {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 14px 14px 18px;
  -webkit-overflow-scrolling: touch;
}

.section {
  margin-bottom: 18px;
}

.title-block {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
}

.title-block > div:first-child:last-child {
  grid-column: 1 / -1;
}

.eyebrow {
  color: var(--orange-2);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.page-title {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1.12;
  font-weight: 900;
}

.page-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.back-inline {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: #14141c;
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
}

.hero-section {
  position: relative;
  min-height: 372px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  margin: -14px -14px 18px;
  padding: 14px 14px 20px;
  background:
    linear-gradient(180deg, rgba(8, 8, 11, 0.12), rgba(8, 8, 11, 0.78) 58%, var(--bg)),
    linear-gradient(135deg, #392219, #171735 45%, #0d2320);
}

.hero-section.has-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-cover);
  background-size: cover;
  background-position: center 26%;
  opacity: 0.9;
}

.hero-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 8, 11, 0) 0%, rgba(8, 8, 11, 0.12) 32%, rgba(8, 8, 11, 0.82) 72%, var(--bg) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hero-search { flex: 0 0 auto; }
.hero-bottom { flex: 0 0 auto; }

.hero-kicker {
  color: #ffd2b4;
  font-size: 12px;
  font-weight: 800;
}

/* Поиск-пилюля наверху hero (над заголовком, поверх фона) */
.hero-search {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 48px;
  padding: 0 16px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(10, 10, 14, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}
.hero-search-ico { flex: 0 0 auto; font-size: 15px; opacity: 0.85; }
.hero-search .search-input {
  flex: 1 1 auto;
  height: 100%;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  color: #fff;
  font-size: 14px;
}
.hero-search .search-input::placeholder { color: rgba(255, 255, 255, 0.72); }

.hero-title {
  max-width: 360px;
  margin: 6px 0 16px;
  color: var(--text);
  font-size: 34px;
  line-height: 1.02;
  font-weight: 950;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-actions.inline {
  margin-top: 6px;
}

.listen-button,
.create-gradient-button {
  min-height: 46px;
  padding: 0 18px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 900;
}

.listen-button {
  background: var(--orange);
  color: #111111;
}

.create-gradient-button {
  background: linear-gradient(90deg, #5558d4, #9050d0, #c04080);
  color: #ffffff;
}

.hero-meta {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.section-title {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
  font-weight: 850;
}

.search-row {
  position: sticky;
  top: -14px;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px 0;
  background: linear-gradient(180deg, var(--bg), rgba(8, 8, 11, 0.9));
}

.search-input {
  min-width: 0;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 0 12px;
  outline: none;
  background: var(--surface);
  color: var(--text);
}

.search-input::placeholder {
  color: var(--dim);
}

.chip-button {
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius);
  background: var(--orange);
  color: #111111;
  font-size: 14px;
  font-weight: 900;
}

/* Кнопка удаления профиля (destructive; порт Android delete-profile) */
.danger-btn {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.danger-btn:active { background: rgba(239, 68, 68, 0.2); }

.chip-row,
.segment-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar,
.segment-row::-webkit-scrollbar,
.tile-rail::-webkit-scrollbar {
  display: none;
}

.filter-chip,
.segment {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.filter-chip.active,
.segment.active {
  border-color: rgba(255, 138, 61, 0.65);
  color: var(--orange-2);
  background: rgba(255, 138, 61, 0.12);
}

.filter-chip.danger {
  color: #fca5a5;
}

.chip-row-stacked {
  align-items: center;
  margin-top: 6px;
}

.chip-row-label {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-right: 4px;
}

.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.shortcut-card {
  min-height: 84px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(21, 21, 29, 0.98), rgba(29, 27, 39, 0.94));
  text-align: left;
}

.shortcut-card.large {
  grid-column: span 1;
  min-height: 104px;
}

.shortcut-card span {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.shortcut-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

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

.poet-tile {
  min-height: 72px;
  padding: 12px;
  border-radius: var(--radius);
  text-align: left;
  background: linear-gradient(135deg, #ff6a4a, #8b5cf6);
}

.poet-tile span {
  display: block;
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
}

.poet-tile small {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
}

.tone-1 { background: linear-gradient(135deg, #8b5cf6, #3730a3); }
.tone-2 { background: linear-gradient(135deg, #22c55e, #166534); }
.tone-3 { background: linear-gradient(135deg, #38bdf8, #075985); }
.tone-4 { background: linear-gradient(135deg, #f59e0b, #92400e); }
.tone-5 { background: linear-gradient(135deg, #ec4899, #831843); }

/* Яркие плитки поэтов (как в нативном приложении) */
.poet-tile { min-height: 64px; display: flex; align-items: center; }
.poet-tile span { font-size: 17px; }
.poet-0 { background: linear-gradient(135deg, #8b3bd6, #5b1fa6); }
.poet-1 { background: linear-gradient(135deg, #e0691a, #b34708); }
.poet-2 { background: linear-gradient(135deg, #17a06a, #0c6b43); }
.poet-3 { background: linear-gradient(135deg, #2f74e0, #1b4aa0); }
.poet-4 { background: linear-gradient(135deg, #d6275a, #8e1438); }
.poet-5 { background: linear-gradient(135deg, #d39b16, #9a6c00); }
.poet-6 { background: linear-gradient(135deg, #7b3ff2, #4b1fb0); }
.poet-7 { background: linear-gradient(135deg, #1fb07a, #0d6e48); }

/* Заголовок секции с подзаголовком */
.section-head-text { min-width: 0; }
.section-subtitle { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.section-link { flex: 0 0 auto; align-self: flex-start; color: var(--orange-2); }

/* Hero CTA под эталон */
.hero-cta { display: flex; flex-direction: column; gap: 7px; margin-top: 6px; }
.hero-listen {
  position: relative; overflow: hidden; width: 100%; min-height: 60px;
  padding: 0 16px; border-radius: 14px; border: none;
  background: linear-gradient(90deg, #7b46d8, #9a4fcf);
  color: #fff; font-size: 17.5px; font-weight: 850;
  display: flex; align-items: center; justify-content: center;
}
.hero-listen-label { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 9px; text-align: center; text-shadow: 0 1px 6px rgba(0,0,0,0.4); }
.hero-listen-ico { font-size: 20px; }
/* Эквалайзер на всю кнопку — анимированные полоски ходят за текстом */
.hero-eq { position: absolute; inset: 0; z-index: 1; display: flex; gap: 4px; align-items: flex-end; justify-content: space-between; padding: 5px 9px; opacity: 0.34; pointer-events: none; }
.hero-eq i { flex: 1 1 0; height: 100%; background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.5)); border-radius: 3px; transform: scaleY(0.3); transform-origin: bottom; animation: heroEq 1.1s ease-in-out infinite; }
@keyframes heroEq { 0%,100% { transform: scaleY(0.22);} 50% { transform: scaleY(1);} }
.hero-note { color: var(--muted); font-size: 12.5px; text-align: center; margin-bottom: 2px; }
.hero-create {
  position: relative; overflow: hidden; width: 100%; min-height: 60px; padding: 0 16px; border: none; border-radius: 14px;
  background: linear-gradient(90deg, #5558d4, #9050d0, #c04080);
  color: #fff; font-size: 17.5px; font-weight: 850;
  display: flex; align-items: center; justify-content: center; gap: 9px;
}
.hero-create-ico { font-size: 19px; }

/* Стихи для создания — крупные строки-карточки */
.create-shortcuts { display: flex; flex-direction: column; gap: 8px; }
.create-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 60px; padding: 12px 14px; text-align: left;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2);
}
.create-row-ico {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  background: var(--surface-3);
}
.create-row-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.create-row-title { color: var(--text); font-size: 15px; font-weight: 800; }
.create-row-desc { color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.create-row-arrow { flex: 0 0 auto; color: var(--dim); font-size: 22px; }

/* Компактный нумерованный список (Топ/Тренды/Мои песни) */
.rank-list { display: flex; flex-direction: column; gap: 2px; border: 1px solid rgba(148,120,255,0.25); border-radius: 16px; padding: 6px; background: rgba(124,58,237,0.05); }
.rank-row { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 60px; padding: 6px 8px; text-align: left; background: transparent; border: none; border-radius: 10px; }
.rank-row.active { background: rgba(124,58,237,0.16); }
.rank-num { flex: 0 0 auto; width: 22px; text-align: center; color: #f1b119; font-size: 17px; font-weight: 900; }
.rank-row.active .rank-num { color: #a78bfa; }
.rank-cover { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 8px; overflow: hidden; background: var(--surface-3); display: flex; align-items: center; justify-content: center; }
.rank-cover img { width: 100%; height: 100%; object-fit: cover; }
.rank-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rank-title { color: var(--text); font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-row.active .rank-title { color: #a78bfa; }
.rank-genre { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-sub { color: var(--dim); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-metrics { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; color: #7d8395; font-size: 11px; }
.rank-metric.liked { color: var(--orange-2); }
.rank-more { width: 100%; min-height: 40px; margin-top: 4px; border: none; border-radius: 10px; background: rgba(255,255,255,0.035); color: #ffb58a; font-size: 13px; font-weight: 750; }

.tile-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 2px;
  scrollbar-width: none;
}

.stack-tile {
  position: relative;
  flex: 0 0 140px;
  height: 92px;
  padding: 12px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--tile-a), var(--tile-b));
  text-align: left;
  box-shadow: 0 10px 0 rgba(255, 255, 255, 0.04);
}

.stack-tile::before,
.stack-tile::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  height: 3px;
  border-radius: 999px;
  background: var(--tile-a);
  opacity: 0.45;
}

.stack-tile::before { top: -6px; }
.stack-tile::after { top: -11px; opacity: 0.25; }

.stack-tile span {
  display: block;
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
}

.stack-tile small {
  display: block;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.track-list {
  display: grid;
  gap: 10px;
}

.track-card {
  width: 100%;
  display: grid;
  grid-template-columns: 74px 1fr auto;
  gap: 11px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius);
  background: rgba(16, 16, 21, 0.92);
  text-align: left;
}

/* Свежесозданный трек до первого play — зелёная рамка (как Android #22c55e).
   Приоритет .active (играет) выше: JS ставит класс new только когда трек НЕ текущий. */
.track-card.new {
  border-color: rgba(34, 197, 94, 0.6);
  background: rgba(34, 197, 94, 0.07);
}
.track-card.active {
  border-color: rgba(255, 138, 61, 0.5);
  background: rgba(255, 138, 61, 0.08);
}

.cover-column {
  display: grid;
  gap: 5px;
  align-content: start;
}

.track-cover {
  width: 74px;
  aspect-ratio: 1;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 138, 61, 0.34), rgba(139, 92, 246, 0.32)), var(--surface-3);
}

.track-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.cover-placeholder {
  color: rgba(248, 250, 252, 0.55);
  font-size: 24px;
  font-weight: 900;
}

.cover-year {
  color: var(--dim);
  font-size: 11px;
  text-align: center;
}

.track-body {
  min-width: 0;
}

.track-title {
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  line-height: 1.22;
  font-weight: 850;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.genre-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.genre-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
}

.track-source {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.32;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.track-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.track-chip {
  max-width: 100%;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  font-size: 11px;
  line-height: 1;
}

.metric-stack {
  display: grid;
  gap: 7px;
  align-content: start;
  justify-items: end;
  color: var(--muted);
  font-size: 11px;
}

.metric {
  min-width: 36px;
  display: flex;
  justify-content: flex-end;
  gap: 3px;
}

.action-row {
  grid-column: 1 / -1;
  display: flex;
  gap: 6px;
  padding-top: 2px;
}

.action-button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.action-button.primary,
.action-button.active {
  color: #111111;
  background: var(--orange);
}

.status-list {
  display: grid;
  gap: 8px;
}

.poem-row-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 8px;
}

.status-row,
.poem-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius);
  background: rgba(16, 16, 21, 0.9);
  text-align: left;
}

.poem-row {
  display: grid;
}

.poem-row span {
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
}

.poem-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.status-label {
  color: var(--muted);
  font-size: 13px;
}

.status-value {
  max-width: 62%;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poem-text-section {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(16, 16, 21, 0.9);
}

.poem-text {
  margin: 0;
  white-space: pre-wrap;
  color: #e5e7eb;
  font: inherit;
  font-size: 15px;
  line-height: 1.58;
}

.notice {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(21, 21, 29, 0.92);
}

.notice-title {
  margin: 0 0 7px;
  font-size: 16px;
  font-weight: 850;
}

.notice-text {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.support-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.support-input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  resize: vertical;
}

.support-input::placeholder {
  color: var(--dim);
}

.poem-suggest-hint {
  margin: 8px 2px 0;
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  padding: 28px 14px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(16, 16, 21, 0.58);
  text-align: center;
}

/* Inline-ошибка загрузки списка + «Повторить» (порт Android list error state) */
.list-error {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 32px 18px; border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(16, 16, 21, 0.58); text-align: center;
}
.list-error-ico { font-size: 30px; line-height: 1; opacity: 0.9; }
.list-error-text { margin: 0; color: var(--muted); font-size: 14px; max-width: 260px; }
.list-error-retry {
  appearance: none; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text); font-weight: 600; font-size: 14px; padding: 9px 22px;
  border-radius: 999px; cursor: pointer;
}
.list-error-retry:active { background: var(--surface-3); }

/* Обогащённое пустое состояние (иконка + заголовок + описание + CTA) — порт Android SunoEmptyState */
.empty-rich {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 40px 20px; border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius); background: rgba(16, 16, 21, 0.58); text-align: center;
}
.empty-rich-ico { font-size: 40px; line-height: 1; margin-bottom: 2px; }
.empty-rich-title { margin: 0; color: var(--text); font-size: 15px; font-weight: 700; }
.empty-rich-desc { margin: 0; color: var(--muted); font-size: 13px; max-width: 270px; line-height: 1.4; }
.empty-rich-cta {
  margin-top: 8px; appearance: none; border: none;
  background: linear-gradient(135deg, var(--orange), var(--orange-2));
  color: #1a1206; font-weight: 700; font-size: 14px; padding: 11px 26px;
  border-radius: 999px; cursor: pointer;
}
.empty-rich-cta:active { filter: brightness(0.94); }

.skeleton-card {
  height: 124px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.1), rgba(255,255,255,0.04));
  background-size: 240% 100%;
  animation: shimmer 1.2s linear infinite;
}

@keyframes shimmer {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}

.mini-player {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 12, 16, 0.97);
  backdrop-filter: blur(18px);
}

.tabbar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 7px 6px calc(7px + var(--safe-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(8, 8, 11, 0.98);
  /* Таб-бар (и выступающая вверх кнопка «Создать») ВСЕГДА поверх развёрнутого плеера-шита
     (vendor .ps-root z-index:1000) — иначе мета-плашка шита перекрывает «Создать». Жалоба владельца 2026-07-04. */
  position: relative;
  z-index: 1001;
}

.tab-button {
  min-width: 0;
  min-height: 58px;
  display: grid;
  place-items: center;
  gap: 4px;
  border-radius: var(--radius);
  background: transparent;
  color: var(--dim);
  font-size: 11.5px;
  font-weight: 750;
}

.tab-button.active {
  color: var(--orange-2);
  background: rgba(255, 138, 61, 0.1);
}

.tab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.tab-icon svg { width: 27px; height: 27px; display: block; }

/* Центральная кнопка «Создать» — оранжевый кружок «+» (как в приложении) */
.tab-button[data-route="create"] .tab-icon {
  width: 46px;
  height: 46px;
  margin-top: -12px;
  border-radius: 50%;
  background: #ff5d3d;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(255, 93, 61, 0.45);
}
.tab-button[data-route="create"] .tab-icon svg { width: 26px; height: 26px; }
.tab-button[data-route="create"] { color: #ffb2a3; }
.tab-button[data-route="create"].active { background: transparent; }

.sheet {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0 12px calc(16px + env(safe-area-inset-bottom, 0px));
}

.sheet[hidden] {
  display: none;
}

.sheet-card {
  width: 100%;
  max-width: 520px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px 16px var(--radius) var(--radius);
  background: var(--surface);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.45);
}

.sheet-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 850;
}

.sheet-subtitle {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.sheet-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sheet-option {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.sheet-option.danger {
  color: #fca5a5;
}

.sheet-cancel {
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
  border: none;
  border-radius: var(--radius);
  background: var(--surface-3);
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

/* Модалка перехода в бота для записи «Мой голос». */
.vbot-card { text-align: center; }
.vbot-ico { width: 56px; height: 56px; margin: 2px auto 10px; display: flex; align-items: center; justify-content: center; border-radius: 16px; background: rgba(255, 138, 61, 0.14); font-size: 28px; }
.vbot-card .sheet-subtitle { margin-bottom: 8px; }
.vbot-steps { margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.vbot-go { width: 100%; min-height: 52px; border: none; border-radius: 16px; background: var(--orange); color: #1a1205; font-size: 16px; font-weight: 850; cursor: pointer; }
.vbot-go:disabled { background: var(--surface-3); color: var(--muted); cursor: default; }

.comment-list {
  max-height: 38vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.comment-row {
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--surface-2);
}

.comment-author {
  color: var(--orange-2);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 3px;
}

.comment-body {
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}

.comment-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 7px; }
.comment-act { background: transparent; border: none; padding: 0; color: var(--muted); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.comment-act:active { opacity: 0.6; }

/* z3-02: плашка «только после публикации» вместо композера (порт Android commentReadOnlyBox) */
.comment-lock {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(234, 179, 8, 0.32);
  background: rgba(234, 179, 8, 0.10);
}
.comment-lock-ico { font-size: 15px; line-height: 1.3; }
.comment-lock-text { margin: 0; color: #fde68a; font-size: 13px; line-height: 1.45; font-weight: 700; }

.comment-composer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

/* Форма генерации */
.gen-field { margin-bottom: 14px; }
.gen-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.filter-chip.gen-locked { opacity: 0.4; }

.gen-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 30px 16px;
}
.gen-eq { display: flex; gap: 5px; align-items: flex-end; height: 40px; }
.gen-eq i {
  width: 7px;
  background: linear-gradient(180deg, var(--orange-2), var(--purple));
  border-radius: 3px;
  animation: genEq 1s ease-in-out infinite;
}
.gen-eq i:nth-child(1) { height: 14px; animation-delay: 0s; }
.gen-eq i:nth-child(2) { height: 30px; animation-delay: .15s; }
.gen-eq i:nth-child(3) { height: 20px; animation-delay: .3s; }
.gen-eq i:nth-child(4) { height: 36px; animation-delay: .45s; }
.gen-eq i:nth-child(5) { height: 16px; animation-delay: .6s; }
@keyframes genEq { 0%,100% { transform: scaleY(0.4); } 50% { transform: scaleY(1); } }

/* ── Поток «Создать»: подсказки, список поэтов, карточки стихов ── */
.create-hint { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(124,58,237,0.45); background: rgba(124,58,237,0.08); color: var(--text); font-size: 14px; font-weight: 650; line-height: 1.35; }
.create-hint.orange { border-color: rgba(255,138,61,0.45); background: rgba(255,138,61,0.08); }
.create-hint-ico { flex: 0 0 auto; font-size: 18px; }

.poet-list { display: flex; flex-direction: column; gap: 8px; }
.poet-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 14px; text-align: left; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.poet-avatar { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 900; color: #cdb8ff; background: linear-gradient(135deg, rgba(124,58,237,0.45), rgba(99,102,241,0.4)); }
.poet-row-name { flex: 1 1 auto; min-width: 0; color: var(--text); font-size: 16px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poet-row-count { flex: 0 0 auto; color: var(--muted); font-size: 14px; font-weight: 700; }
.poet-row-arrow { flex: 0 0 auto; color: var(--dim); font-size: 20px; }

.poem-card-list { display: flex; flex-direction: column; gap: 10px; }
.poem-card-wrap { display: flex; align-items: stretch; gap: 8px; }
.poem-card { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 76px; padding: 12px 14px; text-align: left; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.poem-card-wrap .poem-card { flex: 1 1 auto; min-width: 0; width: auto; }
.poem-card-ico { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; color: #cdb8ff; background: rgba(124,58,237,0.18); }
.poem-card-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.poem-card-title { color: var(--text); font-size: 16px; font-weight: 850; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poem-card-preview { color: var(--muted); font-size: 12.5px; line-height: 1.35; font-style: italic; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.poem-card-year { flex: 0 0 auto; align-self: flex-start; color: var(--muted); font-size: 11.5px; font-weight: 700; padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,0.06); }

/* ── Экран создания: текст стиха, плашка адаптации, слайдер, треки ── */
.poem-card-block { border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); padding: 14px; }
.poem-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.poem-card-label { color: var(--dim); font-size: 12px; font-weight: 800; letter-spacing: 0.04em; }
.lang-toggle { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255,255,255,0.06); }
.lang-opt { border: none; background: transparent; color: var(--muted); font-size: 12px; font-weight: 800; padding: 4px 12px; border-radius: 999px; cursor: pointer; }
.lang-opt.active { background: var(--purple); color: #fff; }
.poem-card-block .poem-text { margin: 0; }
.poem-collapse { margin-top: 10px; width: 100%; min-height: 36px; border: none; border-radius: 10px; background: rgba(255,255,255,0.04); color: var(--orange-2); font-size: 13px; font-weight: 750; cursor: pointer; }

.adapt-warn { display: flex; gap: 12px; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(239,68,68,0.4); background: linear-gradient(135deg, rgba(80,20,20,0.5), rgba(40,12,20,0.45)); }
.adapt-warn-ico { flex: 0 0 auto; font-size: 20px; }
.adapt-warn-title { margin: 0 0 6px; color: #fff; font-size: 15px; font-weight: 850; }
.adapt-warn-text { margin: 0; color: #e8c9c9; font-size: 12.5px; line-height: 1.45; }

.adapt-info { display: flex; gap: 12px; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(99,102,241,0.4); background: linear-gradient(135deg, rgba(30,34,70,0.55), rgba(18,22,48,0.5)); }
.adapt-info-ico { flex: 0 0 auto; font-size: 20px; }
.adapt-info-title { margin: 0 0 6px; color: #fff; font-size: 15px; font-weight: 850; }
.adapt-info-text { margin: 0; color: #c7cbe6; font-size: 12.5px; line-height: 1.45; }
.adapt-info-check { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.08); color: var(--text); font-size: 13.5px; cursor: pointer; }
.adapt-info-check input { width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--orange); }

.adapt-card { border: 1px solid rgba(99,102,241,0.3); border-radius: 16px; background: rgba(99,102,241,0.06); padding: 16px; }
.adapt-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.adapt-card-title { color: var(--text); font-size: 16px; font-weight: 850; }
.adapt-card-pct { color: #a78bfa; font-size: 16px; font-weight: 900; }
.adapt-range { -webkit-appearance: none; appearance: none; width: 100%; height: 12px; border-radius: 999px; outline: none; cursor: pointer; background: linear-gradient(90deg, #2a3358 0 var(--lock,0%), #6366f1 var(--lock,0%) var(--val,25%), rgba(255,255,255,0.12) var(--val,25%) 100%); }
.adapt-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid #6366f1; box-shadow: 0 2px 8px rgba(0,0,0,0.4); cursor: pointer; }
.adapt-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid #6366f1; cursor: pointer; }
.adapt-lockrow { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.adapt-lock { color: #8aa0ff; font-size: 12.5px; font-weight: 700; }
.adapt-max { color: var(--dim); font-size: 12.5px; font-weight: 700; }
.adapt-desc { display: block; margin-top: 10px; }
.adapt-desc-title { display: block; color: var(--text); font-size: 14.5px; font-weight: 850; }
.adapt-desc-text { display: block; margin-top: 3px; color: var(--muted); font-size: 12.5px; line-height: 1.45; }

.gen-tracks-stack { display: flex; flex-direction: column; gap: 10px; }
.gen-tracks-card { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 15px; text-align: left; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.gen-tracks-card.catalog { border-color: rgba(124,58,237,0.4); background: rgba(124,58,237,0.08); }
.gen-tracks-card.user { border-color: rgba(34,197,94,0.4); background: rgba(34,197,94,0.07); }
.gen-tracks-ico { flex: 0 0 auto; font-size: 18px; }
.gen-tracks-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.gen-tracks-title { color: var(--text); font-size: 14px; font-weight: 800; }
.gen-tracks-badges { display: flex; gap: 6px; }
.gen-badge { font-size: 11px; font-weight: 800; color: #cdb8ff; padding: 2px 8px; border-radius: 6px; background: rgba(255,255,255,0.08); }
.gen-tracks-action { flex: 0 0 auto; color: var(--orange-2); font-size: 13px; font-weight: 800; }

.gen-style-input { width: 100%; margin-top: 10px; }
.gen-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.gen-oferta { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--text); font-size: 13.5px; cursor: pointer; }
.gen-oferta input { width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--orange); }

.toast {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  z-index: 1200;
  max-width: 520px;
  margin: 0 auto;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: rgba(248, 250, 252, 0.94);
  color: #111111;
  font-size: 13px;
  font-weight: 850;
  text-align: center;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

@media (max-width: 390px) {
  .screen {
    padding-inline: 10px;
  }

  .hero-title {
    font-size: 30px;
  }

  .shortcut-grid {
    grid-template-columns: 1fr;
  }

  .track-card {
    grid-template-columns: 64px 1fr;
  }

  .track-cover {
    width: 64px;
  }

  .metric-stack {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, auto);
    justify-content: start;
  }
}

/* ════════ Музыкальные каталоги 1:1 с приложением ════════ */

/* Глобальный бренд-топбар прячем на music/filter (у них свой экранный топ-бар);
   сворачиваем в safe-area, НЕ display:none (иначе #screen теряет 1fr в grid). */
.topbar.topbar-hidden {
  height: 0;
  min-height: 0;
  padding: env(safe-area-inset-top, 0px) 0 0;
  border: none;
  overflow: hidden;
  backdrop-filter: none;
}

/* Экранный топ-бар (☰ | заголовок | 🔍) + ряд фильтров — липкий сверху */
.cat-head-wrap {
  position: sticky;
  /* top компенсирует margin-top:-14px: при top:0 шапка вставала на 14px ниже верха и контент
     протекал в зазор над ней. top:-14px прижимает её вплотную к верху на любом скролле. Порт VK. */
  top: -14px;
  z-index: 14;
  margin: -14px -14px 6px;
  padding: 8px 14px 14px;
  background: var(--bg);
}
.cat-topbar {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
.cat-topbar.with-back { grid-template-columns: 46px 46px minmax(0, 1fr) 46px; }
.cat-icon-btn {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  min-width: 0;
}
.cat-icon-btn.active { color: var(--orange-2); border-color: rgba(255, 138, 61, 0.4); }
.cat-icon-btn svg { width: 22px; height: 22px; display: block; }
.cat-title {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 18px;
  font-weight: 850;
  cursor: pointer;
  overflow: hidden;
}
.cat-title span { display: block; min-width: 0; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-search-input {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(255, 138, 61, 0.5);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 15px;
  outline: none;
}
.cat-subtitle { margin: 8px 2px 0; color: var(--muted); font-size: 12.5px; font-weight: 700; }

/* Ряд фильтров: язык-сегмент + сброс + пилюля «Фильтр» */
.cat-filterbar { display: flex; align-items: stretch; gap: 8px; margin-top: 10px; }
.lang-seg {
  flex: 0 0 auto;
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background: var(--surface-2);
}
.lang-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  padding: 6px 9px;
  border-radius: 11px;
  cursor: pointer;
}
.lang-btn.active { background: var(--purple); color: #fff; }
.filter-reset {
  flex: 0 0 auto;
  width: 46px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 14px;
  background: var(--danger);
  color: #fff;
  cursor: pointer;
}
.filter-reset svg { width: 20px; height: 20px; }
.filter-pill {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.filter-pill.has-active { border-color: rgba(139, 92, 246, 0.5); }
.filter-pill-ico { flex: 0 0 auto; color: var(--muted); }
.filter-pill-ico svg { width: 20px; height: 20px; display: block; }
.filter-pill-main { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; overflow: hidden; }
.filter-pill-text { flex: 0 0 auto; font-size: 14px; font-weight: 800; }
.filter-pill-val { min-width: 0; color: var(--muted); font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.filter-pill.has-active .filter-pill-val { color: var(--orange-2); }
.filter-pill-arrow { flex: 0 0 auto; color: var(--dim); font-size: 18px; }

.app-drawer-layer {
  position: fixed;
  inset: 0;
  z-index: 1200;
}
.app-drawer-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
}
.app-drawer-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(330px, 82vw);
  display: flex;
  flex-direction: column;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 14px calc(18px + env(safe-area-inset-bottom, 0px));
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: #101017;
  box-shadow: 24px 0 70px rgba(0, 0, 0, 0.55);
  overflow-y: auto;
}
.app-drawer-profile {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 40px;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}
.app-drawer-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 138, 61, 0.28), rgba(139, 92, 246, 0.28));
  color: var(--orange-2);
  font-size: 20px;
  font-weight: 900;
}
.app-drawer-profile strong,
.app-drawer-profile span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-drawer-profile strong { color: var(--text); font-size: 16px; }
.app-drawer-profile span { margin-top: 3px; color: var(--muted); font-size: 12.5px; }
.app-drawer-close {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}
.app-drawer-close svg { width: 20px; height: 20px; }
.app-drawer-nav {
  flex: 0 0 auto;
  display: grid;
  gap: 8px;
}
.app-drawer-item {
  min-height: 48px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}
.app-drawer-item span {
  display: grid;
  place-items: center;
  color: var(--orange-2);
  font-size: 18px;
}
.app-drawer-item strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
  font-size: 15px;
  font-weight: 850;
}
.app-drawer-item.active {
  border-color: rgba(255, 138, 61, 0.34);
  background: rgba(255, 138, 61, 0.13);
  color: var(--orange-2);
}
.app-drawer-divider {
  flex: 0 0 auto;
  height: 1px;
  margin: auto 0 12px;
  background: rgba(255, 255, 255, 0.07);
}
.app-drawer-language {
  flex: 0 0 auto;
  min-height: 48px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}
.app-drawer-language > span {
  display: grid;
  place-items: center;
  color: var(--orange-2);
  font-size: 18px;
}
.app-drawer-language > strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
  font-size: 15px;
  font-weight: 850;
}
.app-drawer-language-chips {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}
.app-drawer-language-chips button {
  min-width: 34px;
  height: 28px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}
.app-drawer-language-chips button.active {
  background: var(--purple);
  color: #fff;
}

/* Плашка-переключатель каталогов (всплывает от «Музыка», авто-скрытие 3с) */
.music-switcher {
  position: fixed;
  left: 50%;
  /* Поднята на ~половину своей высоты над таб-баром (просьба владельца 2026-07-04): было 72px. */
  bottom: calc(110px + env(safe-area-inset-bottom, 0px));
  z-index: 28;
  width: min(540px, calc(100% - 20px));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(255, 138, 61, 0.56);
  border-radius: 18px;
  background: rgba(18, 18, 27, 0.99);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(16px) scale(0.94);
  transition: opacity .18s ease, transform .28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.music-switcher.open { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0) scale(1); }
.switcher-scrim {
  position: fixed; left: 0; right: 0; top: 0;
  bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  z-index: 27;
  background: rgba(8, 8, 11, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.switcher-scrim.open { opacity: 1; pointer-events: auto; }
.music-switcher::after {
  content: "";
  position: absolute;
  left: 70%;
  bottom: -7px;
  width: 14px;
  height: 14px;
  transform: translateX(-50%) rotate(45deg);
  background: rgba(18, 18, 27, 0.99);
  border-right: 1px solid rgba(255, 138, 61, 0.56);
  border-bottom: 1px solid rgba(255, 138, 61, 0.56);
}
.ms-item {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 9px 4px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 750;
  cursor: pointer;
}
.ms-item.active { color: var(--orange-2); background: rgba(255, 138, 61, 0.14); }
.ms-ico svg { width: 24px; height: 24px; display: block; }
.ms-label { white-space: nowrap; }

/* Карточка: кликабельна (тап = играть), метрики-кнопки, ⋯, эквалайзер */
.track-card { cursor: pointer; }
.track-card:active { background: rgba(255, 138, 61, 0.06); }
.track-chip { border-radius: 8px; }
.metric-btn, .metric-more {
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  padding: 2px 0;
  cursor: pointer;
}
.metric-btn.liked { color: #ff5d7a; }
.metric-more { min-width: 36px; justify-content: flex-end; font-size: 18px; line-height: 1; }
.track-cover { position: relative; }
.cover-eq { position: absolute; left: 6px; bottom: 6px; display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.cover-eq i { width: 3px; background: var(--orange); border-radius: 2px; animation: coverEq 0.9s ease-in-out infinite; }
.cover-eq i:nth-child(1) { height: 6px; animation-delay: 0s; }
.cover-eq i:nth-child(2) { height: 12px; animation-delay: .2s; }
.cover-eq i:nth-child(3) { height: 8px; animation-delay: .4s; }
@keyframes coverEq { 0%, 100% { transform: scaleY(0.4); } 50% { transform: scaleY(1); } }
.cat-list-sec { margin-bottom: 0; padding-top: 14px; }

/* Меню действий ⋯ */
.track-menu .sheet-option { display: flex; align-items: center; gap: 12px; }
.track-menu .menu-ico, .fset-footer .menu-ico { flex: 0 0 auto; width: 22px; text-align: center; font-size: 16px; }
/* Лист текста песни (кнопка «Текст песни» в меню ⋯). Порт из VK. */
.lyrics-body {
  max-height: 60vh;
  overflow-y: auto;
  margin: 6px 0 14px;
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.55;
  color: #d6d9e3;
  -webkit-overflow-scrolling: touch;
}
/* Замочек публикации в Сообщество на карточке «Мои песни». Порт из VK. */
.metric-pub { display: inline-flex; align-items: center; justify-content: flex-end; min-width: 36px; padding: 2px 0; border: none; background: transparent; color: var(--muted); cursor: pointer; }
.metric-pub svg { width: 18px; height: 18px; display: block; }
.metric-pub.on { color: #22c55e; }
/* ── Трекер генерации: кольцо/✓/✗ бейджи + плашка «Генерация идёт». Порт из VK. ── */
.gen-ind-host { position: relative; }
.gen-ind { position: absolute; inset: 0; pointer-events: none; }
.gen-ind .gen-ring,
.gen-ind .gen-corner { display: none; }
.gen-ring {
  position: absolute; inset: -3px;
  border-radius: 50%;
  border: 2px solid rgba(139, 92, 246, 0.18);
  border-top-color: #8b5cf6;
  border-right-color: #ff8a3d;
  animation: gen-spin 1.2s linear infinite;
}
.gen-ind.is-active .gen-ring { display: block; }
.gen-corner {
  position: absolute; top: -4px; right: -4px;
  width: 14px; height: 14px; border-radius: 50%;
  align-items: center; justify-content: center;
  border: 1.5px solid #0b0b10;
  box-sizing: border-box;
}
.gen-corner svg { width: 9px; height: 9px; display: block; }
.gen-corner--ready { background: #22c55e; color: #052e1b; }
.gen-corner--failed { background: #ef4444; color: #ffffff; }
.gen-ind.is-ready .gen-corner--ready { display: flex; }
.gen-ind.is-failed .gen-corner--failed { display: flex; }
@keyframes gen-spin { to { transform: rotate(360deg); } }

#gen-banner-host:empty { display: none; }
.gen-banner {
  margin: 0 0 14px;
  border: 1px solid #2f2a45;
  border-radius: 16px;
  background: #12111a;
  padding: 12px 14px;
  overflow: hidden;
}
.gen-banner--failed { border-color: #4b1f2a; background: #171017; }
.gen-banner--offer { border-color: rgba(245, 158, 11, 0.62); background: rgba(245, 158, 11, 0.1); }
.gen-banner-head { display: flex; align-items: center; gap: 8px; }
.gen-banner-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #8b5cf6; }
.gen-banner-dot--failed { background: #ef4444; }
.gen-banner-dot--offer { background: #f59e0b; box-shadow: 0 0 16px rgba(245, 158, 11, 0.55); }
.gen-banner-title { flex: 1; min-width: 0; color: #f8fafc; font-size: 14px; font-weight: 900; }
.gen-banner-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.gen-banner-primary {
  flex: 1 1 150px; min-height: 34px; padding: 0 12px;
  border: none; border-radius: 10px; background: #f59e0b;
  color: #141006; font-size: 12px; font-weight: 950; cursor: pointer;
}
.gen-banner-dismiss {
  flex: none; min-width: 74px; height: 32px; padding: 0 12px;
  border: none; border-radius: 10px; background: #b91c1c;
  color: #fff; font-size: 12px; font-weight: 900; cursor: pointer;
}
.gen-banner--offer .gen-banner-dismiss { background: rgba(255,255,255,0.08); color: #f8fafc; }
.gen-banner-dismiss:active { opacity: 0.75; }
.gen-banner-track {
  position: relative; height: 5px; margin-top: 10px;
  border-radius: 3px; background: #272337; overflow: hidden;
}
.gen-banner-glow {
  position: absolute; top: 0; left: -120px; width: 120px; height: 5px;
  border-radius: 3px; background: #22c55e;
  animation: gen-glow 1.9s linear infinite;
}
@keyframes gen-glow { from { left: -120px; } to { left: 100%; } }
.gen-banner-text { margin-top: 9px; color: #b9bbca; font-size: 13px; line-height: 18px; }
.gen-banner-err { display: flex; align-items: flex-start; gap: 8px; }
.gen-banner-err-ico { flex: none; }
/* ── «О треке» (модалка, кнопка в рейле плеера). Порт из VK. ── */
.track-info-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.track-info-head .sheet-title { margin: 0; font-size: 18px; }
.track-info-headline { margin: 0 0 16px; color: var(--text); font-size: 19px; line-height: 1.3; font-weight: 850; }
.track-info-block { margin-bottom: 14px; }
.track-info-label { margin-bottom: 4px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.track-info-value { color: var(--text); font-size: 16px; line-height: 1.35; font-weight: 800; }
.track-info-secondary { margin-top: 4px; color: #aeb4c4; font-size: 13.5px; line-height: 1.4; font-weight: 600; }
.track-info-ok { width: 100%; min-height: 46px; margin-top: 4px; border: none; border-radius: 14px; background: #ff8a3d; color: #1a1205; font-size: 15px; font-weight: 850; cursor: pointer; }
/* ── Богатый мини-плеер (полоска над таб-баром). Порт VK. Дополняет позиционирование .mini-player выше. ── */
.mini-player {
  border-top: 1px solid #3a3a4a;
  background: #111116;
  padding: 8px 12px 10px;
}
.mp-row { display: flex; align-items: center; gap: 10px; }
.mp-main { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.mp-cover {
  position: relative; width: 44px; height: 44px; flex: 0 0 auto;
  border-radius: 8px; overflow: hidden; display: grid; place-items: center;
  background: #1a1a2e; color: #6366f1; font-size: 18px;
}
.mp-cover img { width: 100%; height: 100%; object-fit: cover; }
.mp-cover.cover-empty::after { content: "♪"; color: #6366f1; font-size: 18px; }
.mp-text { min-width: 0; flex: 1 1 auto; }
.mp-title { color: #f8fafc; font-size: 15px; font-weight: 800; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-sub { margin-top: 2px; color: #9ca3af; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-controls { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.mp-btn {
  box-sizing: border-box; width: 40px; height: 40px; flex: 0 0 auto;
  display: grid; place-items: center; padding: 0; border: none; border-radius: 50%;
  background: rgba(255, 255, 255, 0.1); color: #fff; cursor: pointer;
}
.mp-btn svg { width: 20px; height: 20px; display: block; }
.mp-btn.saved { color: #f59e0b; }
.mp-btn.mp-close { color: #cbd5e1; }
.mp-btn.mp-close svg { width: 18px; height: 18px; }
.mp-play { width: 44px; height: 44px; background: var(--orange); color: #fff; box-shadow: 0 4px 14px rgba(255, 138, 61, 0.45); }
.mp-play svg { width: 22px; height: 22px; }
.mp-play.playing { box-shadow: 0 0 11px rgba(255, 138, 61, 0.6); }
.mp-play.loading { box-shadow: 0 4px 14px rgba(255, 138, 61, 0.45); }
.mp-btn.disabled { opacity: 0.3; pointer-events: none; }
.mp-spinner {
  width: 20px; height: 20px; display: block;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: gen-spin 0.8s linear infinite;
}
.mp-seek { margin-top: 8px; padding: 5px 0 1px; cursor: pointer; }
.mp-seek-track { position: relative; height: 4px; border-radius: 2px; background: #2a2a3a; }
.mp-seek-fill { height: 100%; border-radius: 2px; background: var(--orange); }
.mp-seek-thumb { position: absolute; top: -5px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--orange); }
.mp-cta {
  display: block; width: 100%; min-height: 36px; margin: 0 0 8px; padding: 7px 14px;
  border: none; border-radius: 12px; cursor: pointer;
  background: linear-gradient(90deg, #6366f1, #ec4899, #f59e0b);
  color: #fff; font-size: 13.5px; font-weight: 800; line-height: 1.2; text-align: center;
}

/* Экран «Настройки фильтров» — фикс-оверлей поверх таб-бара */
.filter-screen {
  position: fixed;
  inset: 0;
  z-index: 42;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.fset-head {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 46px 1fr 46px;
  align-items: center;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.fset-title { text-align: center; font-size: 18px; font-weight: 850; }
.fset-body { flex: 1 1 auto; overflow-y: auto; padding: 16px 14px 20px; -webkit-overflow-scrolling: touch; }
.fset-section { margin-bottom: 22px; }
.fset-label { margin-bottom: 12px; color: var(--text); font-size: 16px; font-weight: 850; }
.fset-grid { display: flex; flex-wrap: wrap; gap: 9px; }
.fset-chip {
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.fset-chip.active { background: var(--purple); border-color: var(--purple); color: #fff; }
.fset-loading { color: var(--muted); font-size: 13px; padding: 4px 0; }
.fset-footer {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--bg);
}
.fset-reset, .fset-apply {
  flex: 1 1 0;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 850;
  cursor: pointer;
}
.fset-reset { border: 1px solid rgba(239, 68, 68, 0.5); background: rgba(239, 68, 68, 0.08); color: #fca5a5; }
.fset-apply { border: none; background: var(--purple); color: #fff; }

.list-loader {
  padding: 16px 0 22px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

/* ════════ Экран «Стихи» 1:1 ════════ */
.cat-title-static { cursor: default; }

/* Счётчик избранных в ряду фильтров */
.fav-counter {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 100%;
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.fav-counter svg { width: 17px; height: 17px; }
.fav-counter.active { background: var(--purple); border-color: var(--purple); color: #fff; }

.poems-list { display: flex; flex-direction: column; gap: 12px; }

.poemr-card {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius);
  background: rgba(16, 16, 21, 0.92);
  padding: 12px;
}
.poemr-card.expanded { border-color: rgba(99, 102, 241, 0.4); }
.poem-card-top { display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: start; }
.poem-ico {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--surface-3);
  color: #7b8190;
}
.poem-ico.has { color: #a78bfa; background: rgba(99, 102, 241, 0.16); border-color: rgba(99, 102, 241, 0.3); }
.poem-ico svg { width: 22px; height: 22px; }
.poem-main { min-width: 0; }
.poem-row1 { display: flex; align-items: baseline; gap: 8px; }
.poem-title { flex: 1 1 auto; min-width: 0; color: var(--text); font-size: 16px; font-weight: 850; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poem-year { flex: 0 0 auto; color: var(--muted); font-size: 12px; font-weight: 700; }
.poem-author { margin-top: 3px; color: var(--orange); font-size: 13px; font-weight: 800; }
.poem-fav {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: var(--surface-2);
  color: #8b93a4;
  cursor: pointer;
}
.poem-fav svg { width: 20px; height: 20px; }
.poem-fav.on { color: var(--orange); border-color: rgba(255, 138, 61, 0.45); background: rgba(255, 138, 61, 0.12); }
.poem-adapt-badge {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  align-self: center;
  padding: 0;
  border: 1px solid rgba(239, 68, 68, 0.55);
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.16);
  color: #f87171;
  cursor: pointer;
}
.poem-adapt-badge svg { width: 20px; height: 20px; display: block; }
.poem-row-badge,
.poem-card-badge {
  width: 40px;
  height: auto;
  min-height: 40px;
  border-radius: 12px;
}
.poem-actions-badge { width: 40px; height: 40px; border-radius: 12px; }
.poem-preview { margin-top: 10px; color: var(--muted); font-size: 13.5px; line-height: 1.4; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.poem-fulltext { margin-top: 12px; color: #d6d9e3; font-size: 14.5px; line-height: 1.55; white-space: pre-line; }
.poem-ai-note { margin-top: 10px; color: var(--dim); font-size: 12px; font-style: italic; }
.poem-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.poem-lang { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); }
.poem-lang-btn { border: none; background: transparent; color: var(--muted); font-size: 12px; font-weight: 800; padding: 4px 12px; border-radius: 999px; cursor: pointer; }
.poem-lang-btn.active { background: var(--purple); color: #fff; }
.poem-actions { display: flex; align-items: center; gap: 8px; }
.poem-make {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 138, 61, 0.5);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 138, 61, 0.18), rgba(255, 138, 61, 0.06));
  color: var(--orange-2);
  font-size: 13.5px;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
}
.poem-expand {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}
.poem-expand svg { width: 20px; height: 20px; }
.poem-expand.active { background: rgba(99, 102, 241, 0.22); border-color: rgba(99, 102, 241, 0.5); color: #c7d0ff; }

.poem-adapt-info-card { text-align: center; }
.poem-adapt-info-ico {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 50%;
  border: 1px solid rgba(239, 68, 68, 0.55);
  background: rgba(239, 68, 68, 0.16);
  color: #f87171;
}
.poem-adapt-info-ico svg { width: 24px; height: 24px; }
.poem-adapt-info-card .sheet-subtitle {
  margin-bottom: 14px;
  line-height: 1.45;
}

/* ════════ Экран генерации: жанры + демо-карточка ════════ */
.gen-genre-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.gen-genre-row::-webkit-scrollbar { display: none; }
.gen-genre-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}
.gen-genre-ico { font-size: 15px; }
.gen-style-hint { margin: 8px 2px 0; color: var(--dim); font-size: 12.5px; line-height: 1.4; }

.gen-demo-card {
  position: relative;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(99, 102, 241, 0.06);
}
.gen-demo-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
}
.gen-demo-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.gen-demo-ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; font-size: 20px; }
.gen-demo-name { color: var(--text); font-size: 17px; font-weight: 850; }
.gen-demo-row { display: flex; align-items: center; gap: 10px; }
.gen-demo-label { flex: 1 1 auto; color: var(--muted); font-size: 14px; font-weight: 700; }
.gen-demo-play {
  flex: 0 0 auto;
  min-width: 52px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.gen-demo-play.playing { background: var(--orange); border-color: var(--orange); color: #111; }
.gen-demo-desc { margin: 12px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.4; }

/* ════════ «Детали звучания»: подписи разделов, поле + анимация, чипы категорий, синий бокс ════════ */
.gen-sub-label { display: block; text-align: center; margin: 16px 0 10px; color: var(--muted); font-size: 12px; font-weight: 850; letter-spacing: 0.05em; text-transform: uppercase; }
.create-sec-label { margin: 12px 2px 6px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 0.02em; }
.gen-style-field { position: relative; margin-top: 4px; }
.gen-style-loupe { position: absolute; left: 12px; top: 12px; font-size: 14px; opacity: 0.65; pointer-events: none; z-index: 1; }
.gen-style-field .gen-style-input {
  width: 100%; margin-top: 0; padding-left: 38px; padding-right: 38px;
  height: auto; min-height: 44px; max-height: 200px; resize: none;
  overflow-y: hidden; line-height: 1.4; padding-top: 11px; padding-bottom: 11px;
}
.gen-anim-ph { position: absolute; left: 38px; right: 38px; top: 12px; display: flex; align-items: center; color: var(--dim); font-size: 14px; white-space: nowrap; overflow: hidden; pointer-events: none; }
.gen-anim-ph-cursor { margin-left: 1px; color: var(--dim); font-weight: 400; }
.gen-detail-row { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.gen-detail-row::-webkit-scrollbar { display: none; }
.gen-detail-chip, .gen-detail-opt, .gen-detail-back {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  min-height: 38px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px; background: var(--surface-2); color: var(--muted);
  font-size: 13.5px; font-weight: 800; white-space: nowrap; cursor: pointer;
}
.gen-detail-ico { font-size: 14px; }
.gen-detail-chip.active { border-color: rgba(34, 197, 94, 0.55); color: #fff; }
.gen-detail-check { color: #22c55e; font-weight: 900; }
.gen-detail-opt.active { background: var(--purple); border-color: var(--purple); color: #fff; }
.gen-detail-opt.custom { border-style: dashed; }
.gen-detail-back { background: transparent; color: var(--muted); font-weight: 850; }
.gen-cine-disclaimer { margin: 8px 2px 0; color: var(--dim); font-size: 12px; line-height: 1.4; }
/* Синий бокс собранного стиля убран (чипы пишут прямо в поле) — вместо него ✕ на самом поле. */
.gen-style-clear-btn {
  position: absolute; right: 4px; top: 4px; bottom: 4px; width: 36px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; color: var(--muted); font-size: 16px;
  cursor: pointer; z-index: 2; transition: opacity 0.2s, transform 0.2s;
}
.gen-style-clear-btn:active { transform: scale(0.9); }
.gen-style-clear-btn.hidden { display: none !important; }

/* ════════ Экран генерации: сетки голос/характер + условия ════════ */
.gen-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gen-grid-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 46px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.12;
  text-align: center;
  cursor: pointer;
}
.gen-grid-chip.active { background: var(--orange); border-color: var(--orange); color: #1a1205; font-weight: 850; }
.gen-grid-chip.wide { grid-column: 1 / -1; }
.gen-sublabel { display: block; margin: 12px 0 8px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 0.02em; }

/* «Мой голос» — карточка персонального клон-голоса в блоке «Голос». */
.myvoice-card { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); text-align: left; color: var(--text); }
.myvoice-card.create { cursor: pointer; border-color: rgba(255, 138, 61, 0.45); background: rgba(255, 138, 61, 0.09); }
.myvoice-card.sel { border-color: var(--orange); background: rgba(255, 138, 61, 0.15); }
.myvoice-card.proc { border-color: rgba(124, 58, 237, 0.4); background: rgba(124, 58, 237, 0.08); }
.myvoice-card.fail { border-color: rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.08); }
.myvoice-main { display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0; background: transparent; border: none; color: inherit; text-align: left; cursor: pointer; padding: 0; }
.myvoice-ico { flex: 0 0 auto; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: rgba(255, 255, 255, 0.07); font-size: 17px; }
.myvoice-card.sel .myvoice-ico { background: var(--orange); color: #1a1205; }
.myvoice-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.myvoice-title { font-size: 14px; font-weight: 800; line-height: 1.2; }
.myvoice-sub { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.myvoice-act { flex: 0 0 auto; font-size: 12px; font-weight: 800; color: var(--orange); white-space: nowrap; background: transparent; border: none; cursor: pointer; padding: 6px 4px; }
.myvoice-cfg { flex: 0 0 auto; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 15px; cursor: pointer; }
.gen-grid--off { opacity: 0.4; }
.gen-grid--off .gen-grid-chip { cursor: default; }

.gen-oferta { display: flex; align-items: center; gap: 10px; width: 100%; padding: 4px 0; margin-bottom: 12px; background: transparent; border: none; color: var(--text); font-size: 13.5px; text-align: left; cursor: pointer; }
.gen-oferta-box { flex: 0 0 auto; width: 22px; height: 22px; display: grid; place-items: center; border: 2px solid var(--line); border-radius: 6px; color: #fff; font-size: 14px; font-weight: 900; }
.gen-oferta.checked .gen-oferta-box { background: var(--purple); border-color: var(--purple); }

.oferta-card { display: flex; flex-direction: column; max-height: 86vh; padding: 0; overflow: hidden; }
.oferta-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 10px; }
.oferta-x { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border: none; border-radius: 50%; background: rgba(255, 255, 255, 0.08); color: var(--muted); font-size: 16px; cursor: pointer; }
.oferta-banner { padding: 10px 16px; text-align: center; color: #a5b4fc; font-size: 13px; font-weight: 800; background: rgba(99, 102, 241, 0.12); border-top: 1px solid rgba(99, 102, 241, 0.2); border-bottom: 1px solid rgba(99, 102, 241, 0.2); }
.oferta-body { flex: 1 1 auto; overflow-y: auto; padding: 14px 16px; -webkit-overflow-scrolling: touch; }
.oferta-h { margin: 16px 0 6px; color: #c7d0ff; font-size: 15px; font-weight: 850; }
.oferta-h:first-child { margin-top: 0; color: var(--text); }
.oferta-p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; white-space: pre-line; }
.oferta-accept { flex: 0 0 auto; margin: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px)); min-height: 52px; border: none; border-radius: 16px; background: var(--purple); color: #fff; font-size: 16px; font-weight: 850; cursor: pointer; }
.oferta-accept:disabled { background: var(--surface-3); color: var(--dim); cursor: default; }

/* Profile: Способы входа (Google) */
.signin-card { display: flex; flex-direction: column; gap: 10px; }
.signin-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.signin-ico {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: #fff; color: #1f1f1f; font-weight: 800; font-size: 18px;
  font-family: Arial, sans-serif;
}
.signin-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.signin-title { color: var(--text); font-size: 15px; font-weight: 800; }
.signin-sub { color: var(--muted); font-size: 12.5px; line-height: 1.3; word-break: break-word; }
.signin-btn {
  flex: 0 0 auto; padding: 8px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 700; border: 1px solid transparent; cursor: pointer;
}
.signin-btn.connect { background: var(--orange); color: #1a1206; }
.signin-btn.unlink { background: transparent; border-color: var(--line); color: var(--muted); }
.signin-refresh {
  width: 100%; padding: 11px 14px; border-radius: var(--radius);
  background: transparent; border: 1px dashed var(--line);
  color: var(--orange-2); font-size: 13.5px; font-weight: 700; cursor: pointer;
}

/* Profile: Данные для поддержки */
.status-value.mono {
  max-width: 70%; overflow: visible; white-space: normal; word-break: break-all;
  text-align: right; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px;
}
.support-data-text { margin: 10px 2px 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.support-copy-row { display: flex; gap: 8px; margin-top: 12px; }
.support-copy-row .chip-button { flex: 1; }
.chip-button.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }

/* Coverage Selector */
.coverage-card {
  margin-top: 12px;
}
.coverage-hint {
  font-size: 12.5px;
  color: var(--muted);
  margin: 4px 0 12px;
  line-height: 1.4;
}
.coverage-segments {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 12px;
  gap: 2px;
}
.coverage-segment {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 8px 4px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: background 0.18s, color 0.18s;
}
.coverage-segment.active {
  background: #6366f1;
  color: #fff;
}
.coverage-segment:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.coverage-body {
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.45;
}
.coverage-safety {
  font-size: 12px;
  color: #fb923c;
  margin-top: 6px;
  line-height: 1.4;
}
.coverage-disabled-note {
  font-size: 13px;
  color: #fca5a5;
  line-height: 1.4;
}
.coverage-card--disabled {
  opacity: 0.65;
}

/* ════════ Ридер «Текст песни» (порт Android через VK, 2026-07-02):
   .sheet получает модификатор .sheet-reader → растягивается на весь экран, .lyrics-reader его заполняет. */
.sheet.sheet-reader { align-items: stretch; padding: 0; background: #08080b; backdrop-filter: none; -webkit-backdrop-filter: none; }
.lyrics-reader { display: flex; flex-direction: column; width: 100%; height: 100%; background: #08080b; }
.lr-head {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px;
  border-bottom: 1px solid #1f2028;
}
.lr-icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px; background: var(--surface-2, #18181b); color: #f5f5f5; cursor: pointer; }
.lr-icon-btn[hidden] { visibility: hidden; }
.lr-icon-btn svg { width: 22px; height: 22px; display: block; }
.lr-head-title { text-align: center; color: #fff; font-size: 18px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; text-align: left;
  padding: 18px 18px calc(28px + env(safe-area-inset-bottom, 0px)); }
.lr-track-title { color: #f8fafc; font-size: 22px; line-height: 1.3; font-weight: 800; margin-bottom: 18px; }
.lr-notice { display: flex; align-items: flex-start; gap: 9px; border: 1px solid rgba(245, 158, 11, 0.34); background: #1b1408; border-radius: 14px; padding: 12px; margin-bottom: 16px; }
.lr-notice-ico { color: #fcd34d; font-size: 15px; line-height: 1.35; flex: none; }
.lr-notice-text { color: #fde6b3; font-size: 13px; line-height: 1.5; }
.lr-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.lr-tab { flex: 1; padding: 10px 8px; border: 1px solid #27272a; border-radius: 10px; background: #18181b; color: #9ca3af; font-size: 14px; font-weight: 700; cursor: pointer; }
.lr-tab.active { border-color: #fcd34d; background: #2a2410; color: #fcd34d; }
.lr-section { margin-bottom: 20px; }
.lr-sec-name { color: #8b5cf6; font-size: 12px; font-weight: 800; letter-spacing: 0.5px; margin-bottom: 8px; text-transform: uppercase; }
.lr-line { color: #e5e7eb; font-size: 17px; line-height: 1.7; }
.lr-gap { height: 12px; }
.lr-empty { color: #9ca3af; text-align: center; padding: 44px 20px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lr-retry { padding: 9px 18px; border: 1px solid rgba(255,255,255,0.16); border-radius: 11px; background: var(--surface-2, #18181b); color: #f5f5f5; font-size: 13px; font-weight: 700; cursor: pointer; }

/* Профиль → «Документы»: Условия/Политика открываются in-app шитом (текст с сервера /legal). */
.legal-links { display: flex; flex-direction: column; gap: 8px; }
.legal-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--text); font-size: 14px; font-weight: 700; text-align: left; cursor: pointer; }
.legal-link .legal-link-ico { color: var(--muted); font-size: 15px; flex: none; }
.legal-link:active { transform: scale(0.99); }

/* Срок хранения (Retention, порт VK E7) — подсветка кнопки ⋯ */
.metric.ret-warning {
  background: rgba(234, 179, 8, 0.15) !important;
  color: #eab308 !important;
  border: 1px solid rgba(234, 179, 8, 0.3) !important;
}
.metric.ret-urgent {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #ef4444 !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

/* Чипы хранения на карточках */
.track-chip.ret-warning-chip {
  color: #eab308 !important;
  border-color: rgba(234, 179, 8, 0.3) !important;
  background: rgba(234, 179, 8, 0.08) !important;
}
.track-chip.ret-urgent-chip {
  color: #ef4444 !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  background: rgba(239, 68, 68, 0.08) !important;
}
.track-chip.ret-exempt {
  color: #10b981 !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
  background: rgba(16, 185, 129, 0.08) !important;
}

/* Баннер срока хранения в «Мои песни» (порт Android 2026-06-10) */
.ret-lib-banner {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 0 0 14px; padding: 11px 13px;
  border: 1px solid rgba(234, 179, 8, 0.32);
  border-radius: 14px;
  background: rgba(234, 179, 8, 0.08);
}
.ret-lib-banner-ico { flex: none; font-size: 16px; line-height: 1.3; }
.ret-lib-banner-text { flex: 1; min-width: 0; color: #d6d9e3; font-size: 13px; line-height: 1.45; }
.ret-lib-banner-dismiss {
  flex: none; align-self: center; min-height: 30px; padding: 0 12px;
  border: none; border-radius: 9px; background: rgba(255, 255, 255, 0.1);
  color: #f8fafc; font-size: 12px; font-weight: 800; cursor: pointer;
}
.ret-lib-banner-dismiss:active { opacity: 0.7; }

/* Сообщество: зелёный открытый замок ПОД годом на обложке = «это ваш опубликованный трек».
   1:1 с Android (feedListPublishBadgePublished). Только в Сообществе и только у своих треков. */
.cover-own-badge {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 20px;
  border-radius: 9px;
  background: #1f9d57;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(31, 157, 87, 0.38);
}
.cover-own-badge svg { width: 13px; height: 13px; }

/* Зелёный открытый замочек-кнопка у собственных публикаций в ленте Сообщества */
.metric-pub.is-own {
  color: #22c55e !important;
  background: rgba(34, 197, 94, 0.15) !important;
  border: 1px solid rgba(34, 197, 94, 0.3) !important;
}

/* Гашеный (dashed) чип «Мои публикации», пока нет собственных публикаций */
.fset-chip.dashed-dim {
  border-style: dashed !important;
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

/* Экраны «Все плейлисты» / «Поэты с песнями» (порт Android playlists/poets-list, зеркало vk-137/138) */
.pl-head { display: flex; align-items: center; gap: 10px; padding: 6px 2px 10px; }
.pl-title { font-size: 20px; font-weight: 800; color: var(--text); margin: 0; }
.pl-tabs { display: flex; gap: 8px; padding: 2px 2px 12px; }
.pl-tab { flex: 0 0 auto; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 14px; font-weight: 700; }
.pl-tab.active { background: #4a63d8; border-color: #4a63d8; color: #fff; }
.pl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-bottom: 16px; }
.pl-tile { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 64px; padding: 14px; border-radius: var(--radius); background: linear-gradient(135deg, var(--tile-a), var(--tile-b)); text-align: left; }
.pl-tile-label { color: #fff; font-size: 15px; font-weight: 800; }
.pl-tile-arrow { flex: 0 0 auto; color: rgba(255, 255, 255, 0.6); font-size: 20px; }

/* ════════ H1: Промо-модалка при запуске (порт vk css + модульные карточки Android) ════════ */
.promo-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 8, 11, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  animation: promoFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.promo-modal-overlay.fade-out {
  animation: promoFadeOut 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.promo-modal-container {
  position: relative;
  width: 90%;
  max-width: 380px;
  background: linear-gradient(145deg, #1f1d2e 0%, #13111c 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(139, 92, 246, 0.15);
  transform: scale(0.9) translateY(20px);
  animation: promoScaleIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.promo-modal-content {
  position: relative;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 1;
}
.promo-modal-image {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.promo-modal-title {
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 10px;
  line-height: 1.3;
  background: linear-gradient(90deg, #ffaa3d, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.promo-modal-text {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 16px;
}
.promo-modal-actions {
  display: flex;
  width: 100%;
  gap: 12px;
  margin-top: 14px;
}
.promo-modal-btn {
  flex: 1;
  min-height: 48px;
  border-radius: 14px;
  border: none;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s, filter 0.2s;
}
.promo-modal-btn:active {
  transform: scale(0.96);
}
.promo-modal-btn.ok-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.promo-modal-btn.cta-btn {
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}
.promo-modal-btn.cta-btn:hover {
  filter: brightness(1.1);
}
/* Эмодзи-бейдж модуля + крупный процент (эталон Android PromoLaunchModal) */
.promo-badge-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.promo-badge-circle { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 30px; background: rgba(249, 115, 22, 0.16); border: 1.5px solid rgba(251, 191, 36, 0.55); }
.promo-discount-headline { color: #fbbf24; font-size: 40px; font-weight: 900; transform: rotate(-4deg); text-shadow: 0 2px 10px rgba(249, 115, 22, 0.55); }
/* Модульная карточка (скидка / новый хит / топ-стих недели) */
.promo-module-box { width: 100%; margin: 4px 0 4px; border-radius: 16px; border: 1px solid rgba(251, 191, 36, 0.45); background: rgba(249, 115, 22, 0.12); padding: 12px; display: flex; flex-direction: column; gap: 3px; text-align: left; }
.promo-module-title { color: #fdba74; font-size: 15px; font-weight: 800; }
.promo-module-sub { color: #e2e8f0; font-size: 13px; }
/* Конфетти */
.confetti {
  position: absolute;
  top: -20px;
  border-radius: 2px;
  opacity: 0.8;
  pointer-events: none;
  animation: confettiFall linear infinite;
  z-index: 0;
}
@keyframes promoFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes promoFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes promoScaleIn { to { transform: scale(1) translateY(0); } }
@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 0.8; }
  90% { opacity: 0.8; }
  100% { transform: translateY(400px) rotate(360deg); opacity: 0; }
}

/* ════════ E5: скидочная витрина Stars (профиль) ════════ */
.pack-discount-badge { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: linear-gradient(135deg, #fb923c, #ea580c); color: #1a0b02; font-size: 11.5px; font-weight: 900; vertical-align: middle; }
.pack-old-price { color: var(--muted); opacity: 0.75; margin-right: 2px; }
.store-promo-strip { margin: 8px 0 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(251, 191, 36, 0.45); background: rgba(249, 115, 22, 0.12); color: #fdba74; font-size: 13.5px; font-weight: 800; }
