:root {
  color-scheme: dark;
  --bg: #08080b;
  --bg-soft: #101015;
  --surface: #15161e;
  --surface-strong: #1c1e28;
  --text: #f8fafc;
  --muted: #9ca3af;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #ff8a3d;
  --accent-strong: #ff5d3d;
  --teal: #8b5cf6;
  --violet: #8b5cf6;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-bottom: 118px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  /* App-like (эталон ВК-мини-аппа): текст интерфейса нельзя выделить курсором/пальцем — иначе
     тап по карточкам «цепляет» текст и выскакивает выделение/контекст-меню. Исключения ниже:
     поля ввода и НАСТОЯЩИЙ текстовый контент (стих/песня/условия) остаются выделяемыми. */
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Поля ввода — выделение/вставка работают как обычно. */
input,
textarea,
[contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

/* Настоящий текстовый контент остаётся выделяемым (можно скопировать вручную, а не только кнопкой):
   текст стиха/песни, тело модалок (Текст песни / О треке / Комментарии), прокрутка условий оферты. */
.poem-text,
.ptext-body,
.web-modal-body,
.oferta-modal-scroll {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

/* Картинки/обложки не перетаскиваются и не вызывают long-press «сохранить изображение». */
img {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  width: min(var(--max), calc(100% - 48px));
  margin: 18px auto 0;
  padding: 12px 14px;
  border: 1px solid rgba(246, 241, 232, 0.16);
  border-radius: 8px;
  background: rgba(9, 9, 13, 0.72);
  backdrop-filter: blur(18px);
}

.brand,
.site-footer div {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand img,
.site-footer img {
  width: 34px;
  height: 34px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(246, 241, 232, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.nav-links a,
.nav-links button,
.header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.nav-links button {
  appearance: none;
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.nav-links button:focus {
  outline: none;
}

.nav-links button:focus-visible {
  outline: 2px solid rgba(255, 138, 61, 0.75);
  outline-offset: 2px;
}

.nav-links a:hover,
.nav-links button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.header-action {
  justify-self: end;
  color: #17100c;
  background: var(--accent);
}

body.is-share-route {
  padding-bottom: 24px;
}

body.is-share-route .site-header {
  grid-template-columns: 1fr;
}

body.is-share-route .nav-links,
body.is-share-route .header-action,
body.is-share-route .bottom-nav,
body.is-share-route .music-menu,
body.is-share-route .site-footer,
body.is-share-route .page-back-row {
  display: none !important;
}

body.is-music-surface .site-footer {
  display: none !important;
}

body.is-share-route .brand {
  justify-self: center;
}

.hero {
  position: relative;
  min-height: min(560px, 65vh);
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 92px 24px 22px;
  border-bottom: 1px solid var(--line);
}

.hero-media,
.hero-media img,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(9, 9, 13, 0.94) 0%, rgba(9, 9, 13, 0.68) 42%, rgba(9, 9, 13, 0.24) 100%),
    linear-gradient(0deg, #09090d 0%, rgba(9, 9, 13, 0.18) 42%, rgba(9, 9, 13, 0.08) 100%);
}

.hero-content,
.hero-stats,
.section,
.site-footer {
  position: relative;
  z-index: 1;
  width: min(var(--max), 100%);
  margin: 0 auto;
}

.hero-content {
  padding-bottom: 22px;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 620px;
  margin-bottom: 18px;
  font-size: clamp(44px, 5.6vw, 72px);
  line-height: 0.94;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(32px, 4.2vw, 58px);
  line-height: 1;
}

h3 {
  margin-bottom: 0;
  font-size: 23px;
  line-height: 1.1;
}

.hero-copy,
.section-heading p,
.create-copy > p,
.site-footer p {
  max-width: 650px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.install-note {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 8px;
  font-weight: 900;
}

.button-primary {
  color: #140d09;
  background: var(--accent);
  box-shadow: 0 16px 42px rgba(255, 122, 69, 0.28);
}

.button-primary:hover,
.header-action:hover {
  background: var(--accent-strong);
}

.button-secondary {
  border: 1px solid rgba(246, 241, 232, 0.22);
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.button-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.button-icon {
  font-size: 15px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
}

.hero-stats div {
  min-height: 70px;
  padding: 14px 20px;
  background: rgba(16, 17, 24, 0.88);
}

.hero-stats strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 24px;
}

.hero-stats span {
  color: var(--muted);
  font-weight: 700;
}

.section {
  padding: 86px 24px;
}

.section-intro {
  padding-top: 34px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.7fr);
  gap: 54px;
  align-items: end;
  margin-bottom: 22px;
}

.section-heading p {
  margin-bottom: 8px;
}

.section-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: -10px 0 18px;
}

.section-toolbar a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(246, 241, 232, 0.14);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 900;
}

.section-toolbar a:hover {
  border-color: rgba(255, 122, 69, 0.55);
  color: var(--accent);
}

.mobile-home-top,
.home-search-mobile {
  display: none;
}

.home-desktop-only {
  display: block;
}

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

.home-section-head > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.home-section-head > div > span {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 22px;
}

.home-section-head h2 {
  margin: 0;
}

.home-section-head a {
  flex: 0 0 auto;
  color: var(--accent);
  font-weight: 900;
}

.home-section-subtitle {
  max-width: 680px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.hero-action-block {
  display: grid;
  gap: 8px;
}

.hero-action-meta {
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
  text-align: center;
}

.home-rank-list {
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.32);
  border-radius: 18px;
  background: rgba(18, 18, 27, 0.92);
  box-shadow: 0 12px 36px rgba(55, 31, 118, 0.14);
}

.home-rank-row {
  appearance: none;
  display: grid;
  width: 100%;
  grid-template-columns: 46px 54px minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  border: 0;
  border-bottom: 1px solid rgba(246, 241, 232, 0.1);
  padding: 8px 12px;
  color: var(--text);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.home-rank-row.recent {
  grid-template-columns: 54px minmax(0, 1fr) 44px;
}

.home-rank-row:last-of-type {
  border-bottom: 0;
}

.home-rank-number {
  color: #fbbf24;
  font-size: 25px;
  font-weight: 1000;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.home-rank-cover {
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: 10px;
  background: #262936;
}

.home-rank-cover img,
.home-rank-cover .cover-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-rank-body {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.home-rank-body strong,
.home-rank-genre,
.home-rank-author {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-rank-body strong {
  font-size: 16px;
  font-weight: 950;
  line-height: 1.12;
}

.home-rank-genre {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #aeb4c4;
  font-size: 12px;
  font-weight: 850;
}

.home-rank-genre i {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 999px;
}

.home-rank-author {
  color: #858b9b;
  font-size: 12px;
  font-weight: 760;
}

.home-rank-stats {
  display: grid;
  gap: 6px;
  justify-items: end;
  color: #8f96a6;
  font-size: 12px;
  font-weight: 800;
}

.home-rank-stats span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.home-rank-stats svg {
  width: 14px;
  height: 14px;
}

.home-preview-more {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-top: 1px solid rgba(246, 241, 232, 0.08);
  color: #ffb38b;
  font-size: 15px;
  font-weight: 950;
}

.home-preview-more em {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--accent);
  background: rgba(255, 138, 61, 0.15);
  font-style: normal;
  font-size: 20px;
  line-height: 1;
}

.home-rank-empty {
  padding: 18px;
  color: var(--muted);
  font-weight: 850;
}

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

.chart-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.chart-panel-accent {
  background: linear-gradient(135deg, rgba(154, 124, 255, 0.18), rgba(21, 22, 30, 1) 42%);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.panel-head a {
  flex: 0 0 auto;
  color: var(--accent);
  font-weight: 900;
}

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

.track-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 92px;
  padding: 10px;
  border: 1px solid rgba(246, 241, 232, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.track-card img {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  object-fit: cover;
  background: #272936;
}

.cover-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #8f96a6;
  background:
    linear-gradient(135deg, rgba(255, 138, 61, 0.12), rgba(139, 92, 246, 0.12)),
    #181a22;
}

.cover-placeholder svg {
  width: 34px;
  height: 34px;
  opacity: 0.72;
}

.track-card .cover-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 6px;
}

.track-title {
  overflow: hidden;
  margin-bottom: 5px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-meta,
.track-stats {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.track-stats {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.track-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #120d09;
  background: var(--accent);
  font-weight: 900;
}

.create-section,
.playlist-section,
.charts-section {
  border-top: 1px solid var(--line);
}

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

.shortcut-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  column-gap: 14px;
  align-items: center;
  min-height: 116px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(63, 214, 198, 0.12), rgba(255, 255, 255, 0.035)),
    var(--surface);
}

.shortcut-card:hover {
  border-color: rgba(63, 214, 198, 0.42);
  transform: translateY(-1px);
}

.shortcut-icon {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  color: #fff;
  background: rgba(154, 124, 255, 0.28);
  font-size: 20px;
  font-weight: 900;
}

.shortcut-card strong {
  overflow: hidden;
  font-size: 20px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shortcut-card small {
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
}

.home-featured-section {
  display: none;
  padding-top: 6px;
}

@media (min-width: 901px) {
  .home-featured-section.is-ready {
    display: block;
  }
}

