:root {
  color-scheme: dark;
  --bg: #08080b;
  --surface: #15161e;
  --text: #f8fafc;
  --muted: #9ca3af;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #ff8a3d;
  --accent-strong: #ff5d3d;
  --violet: #8b5cf6;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  padding-bottom: 108px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

button,
input {
  font: inherit;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

body.is-home-route .site-header,
body.is-music-surface .site-header,
body.is-music-surface .site-footer,
body.is-share-route .bottom-nav,
body.is-share-route .music-menu,
body.is-share-route .music-menu-scrim {
  display: none !important;
}

.site-header {
  position: fixed;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(246, 241, 232, 0.16);
  border-radius: 8px;
  background: rgba(9, 9, 13, 0.82);
}

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

.brand img {
  width: 34px;
  height: 34px;
}

.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-links {
  display: none;
}

.header-action {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 8px;
  color: #17100c;
  background: var(--accent);
  font-weight: 900;
}

.music-screen {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 14px 10px 18px;
}

body.is-music-surface.has-mini-player {
  padding-bottom: 226px;
}

.android-music-header {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.android-icon-btn {
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--text);
  background: rgba(21, 22, 30, 0.94);
  cursor: pointer;
}

.android-title-pill {
  min-width: 0;
  min-height: 46px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #151520;
}

.android-title-pill-simple {
  align-items: center;
  text-align: center;
}

.android-title-pill span,
.android-title-pill em {
  display: none;
}

.android-title-pill strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 20px;
  font-weight: 950;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.android-header-search {
  display: none;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0 0 10px;
}

.android-header-search.open {
  display: grid;
}

.android-header-search input {
  min-width: 0;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 800;
}

.button {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  color: #120c08;
  background: var(--accent);
  font-weight: 900;
}

.poems-toolbar {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 18px;
}

.music-filter-toolbar {
  flex-wrap: nowrap;
}

.poems-seg {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.poems-seg a {
  display: inline-flex;
  height: 38px;
  align-items: center;
  padding: 0 13px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.poems-seg a.active {
  color: #fff;
  background: var(--violet);
}

.poems-clear-btn {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: #e0463a;
}

.poems-filter-btn {
  flex: 1 1 auto;
  display: flex;
  min-width: 0;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 850;
}

.poems-filter-btn.has-chip {
  border-color: rgba(154, 124, 255, 0.42);
  background: rgba(154, 124, 255, 0.14);
}

.poems-filter-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  line-height: 1.16;
}

.poems-filter-title,
.poems-filter-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poems-filter-title {
  font-size: 14px;
  font-weight: 900;
}

.poems-filter-sub {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.poems-filter-arrow {
  margin-left: auto;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
}

.music-view-row,
.music-view-toggle {
  display: none !important;
}

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

.catalog-list-card {
  position: relative;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 42px;
  grid-template-areas: "cover main side";
  gap: 10px;
  min-height: 132px;
  align-items: start;
  padding: 14px 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #111116;
}

.catalog-list-card.active {
  border-color: rgba(123, 92, 255, 0.92);
  background: #151422;
  box-shadow: inset 0 0 0 1px rgba(123, 92, 255, 0.28);
}

.catalog-cover-col {
  grid-area: cover;
  display: grid;
  align-self: start;
  justify-items: center;
  gap: 6px;
}

.catalog-cover-btn {
  width: 70px;
  height: 70px;
  overflow: hidden;
  border: 0;
  border-radius: 13px;
  padding: 0;
  color: var(--text);
  background: #262936;
}

.catalog-cover-btn img,
.catalog-cover-btn .cover-placeholder {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.catalog-year {
  max-width: 70px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
}

.catalog-card-main {
  grid-area: main;
  min-width: 0;
  padding-top: 0;
}

.catalog-card-title {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0 0 6px;
  border: 0;
  padding: 0;
  overflow: hidden;
  color: var(--text);
  background: transparent;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.12;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-card-info-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

.catalog-genre-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  color: #c7cbd6;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-genre-row span {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 999px;
}

.catalog-attribution {
  display: -webkit-box;
  min-height: 34px;
  margin-bottom: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  line-height: 1.38;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.catalog-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.catalog-chip-row-inline {
  display: none;
}

.catalog-chip-row-mobile {
  display: flex;
  margin-top: 8px;
}

.catalog-chip-row span {
  max-width: 100%;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #b9bec9;
  background: rgba(255, 255, 255, 0.035);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.1;
}

.catalog-inline-player {
  display: none !important;
}

.catalog-metric-stack {
  grid-area: side;
  display: grid;
  align-self: start;
  justify-items: center;
  gap: 7px;
  margin: 0;
}

.catalog-metric-btn {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.catalog-metric-btn svg {
  flex: 0 0 auto;
}

.catalog-card-actions {
  grid-area: side;
  display: grid;
  align-self: end;
  justify-content: center;
  margin: 0;
}

/* Мобиль: рельс действий скрыт — всё в ⋯-меню карточки (эталон ВК). */
.catalog-card-actions { display: none; }
.catalog-cover-col { position: relative; }
.catalog-card-menu {
  position: absolute; top: 4px; right: 4px;
  width: 30px; height: 30px; border: 0; border-radius: 9px;
  background: rgba(0, 0, 0, 0.5); color: #fff;
  font-size: 20px; line-height: 1; letter-spacing: 1px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; backdrop-filter: blur(2px);
}
.catalog-card-menu:active { background: rgba(0, 0, 0, 0.7); }

.catalog-card-icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
}

body.is-music-filter-route {
  padding-bottom: 88px;
  background: #0f0f0f;
}

body.is-music-filter-route .site-header,
body.is-music-filter-route .bottom-nav,
body.is-music-filter-route .music-menu,
body.is-music-filter-route .music-menu-scrim,
body.is-music-filter-route .mini-player,
body.is-music-filter-route .site-footer {
  display: none !important;
}

body.is-profile-route {
  padding-bottom: calc(106px + env(safe-area-inset-bottom));
  background: #08080b;
}

body.is-profile-route.has-mini-player {
  padding-bottom: calc(218px + env(safe-area-inset-bottom));
}

body.is-profile-route .site-header,
body.is-profile-route .site-footer {
  display: none !important;
}

.app-profile-screen {
  width: min(100%, 620px);
  margin: 0 auto;
  padding: 22px 14px calc(28px + env(safe-area-inset-bottom));
}

.mobile-profile-top {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 92px;
  align-items: center;
  min-height: 72px;
  margin: 0 0 8px;
}

.mobile-profile-top .mobile-home-icon-btn,
.mobile-profile-top .mobile-credit-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  border: 1px solid rgba(246, 241, 232, 0.16);
  border-radius: 18px;
  color: var(--text);
  background: #14151d;
  box-shadow: inset 0 0 0 1px rgba(103, 96, 133, 0.1);
}

.mobile-profile-top .mobile-home-icon-btn {
  width: 56px;
  padding: 0;
}

.mobile-profile-top .mobile-home-logo {
  justify-self: center;
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.mobile-profile-top .mobile-credit-pill {
  justify-self: end;
  gap: 7px;
  min-width: 88px;
  padding: 0 10px;
  font-size: 16px;
  font-weight: 950;
}

.mobile-profile-top .mobile-credit-pill > span,
.mobile-profile-top .mobile-credit-pill em {
  color: var(--accent);
}

.mobile-profile-top .mobile-credit-pill em {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  margin: 30px -12px 0 -2px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-style: normal;
}

.create-credit-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  gap: 7px;
  min-height: 52px;
  min-width: 86px;
  padding: 0 10px;
  border: 1px solid rgba(246, 241, 232, 0.16);
  border-radius: 18px;
  background: #14151d;
  box-shadow: inset 0 0 0 1px rgba(103, 96, 133, 0.1);
  color: #f4f5fb;
  font-size: 16px;
  font-weight: 950;
  text-decoration: none;
}

.create-credit-pill > span,
.create-credit-pill em {
  color: var(--accent);
}

.create-credit-pill em {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  margin: 30px -12px 0 -2px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-style: normal;
  line-height: 1;
}

.app-profile-title {
  margin: 10px 0 16px;
}

.app-profile-title h1 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: 0;
}

.app-profile-title p {
  margin: 0;
  color: #a7adba;
  font-size: 16px;
  line-height: 1.45;
}

.app-profile-card,
.app-profile-balance,
.app-profile-stat,
.store-balance-card {
  border: 1px solid rgba(178, 181, 205, 0.22);
  border-radius: 20px;
  background: #15151d;
}

.app-profile-card-pad {
  padding: 18px 16px;
  margin: 0 0 16px;
}

.profile-account-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.profile-avatar {
  display: inline-flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #5b5bdc;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.profile-avatar.muted {
  background: #36364a;
  color: #9ba2b2;
}

.profile-locked-card {
  border-color: rgba(139, 92, 246, 0.24);
}

.profile-account-head strong,
.profile-card-title span {
  font-size: 20px;
  font-weight: 950;
}

.profile-edit-row,
.profile-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-edit-row {
  margin-bottom: 10px;
}

.profile-edit-row span,
.profile-info-row span,
.profile-muted {
  color: #9ba2b2;
}

.profile-edit-btn,
.profile-action-btn,
.profile-mini-btn,
.profile-danger-btn,
.app-profile-balance button,
.store-purchase-btn {
  border: 0;
  border-radius: 13px;
  font-weight: 950;
}

.profile-edit-btn,
.app-profile-balance button {
  min-height: 44px;
  padding: 0 16px;
  color: #fff;
  background: linear-gradient(135deg, #ff7a45, #ff5d3d);
}

.profile-name-input {
  width: 100%;
  min-height: 56px;
  margin-bottom: 12px;
  padding: 0 14px;
  border: 1px solid rgba(246, 241, 232, 0.14);
  border-radius: 14px;
  color: #f8fafc;
  background: #191922;
  font-size: 16px;
  font-weight: 850;
}

.profile-name-input[readonly] {
  color: #a7adba;
}

.profile-muted {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
}

.profile-name-note {
  margin-bottom: 14px;
}

.profile-info-row {
  min-height: 48px;
  border-top: 1px solid rgba(246, 241, 232, 0.12);
  font-size: 15px;
}

