/* ==========================================================================
   neМузыка — REFINED EDITORIAL DESIGN SYSTEM
   Warm Neutral Minimalist Aesthetic · Apple Music & Spotify Craftsmanship
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens & CSS Variables
   -------------------------------------------------------------------------- */
@property --accent { syntax: "<color>"; inherits: true; initial-value: #e99b82; }
@property --accent-fill { syntax: "<color>"; inherits: true; initial-value: #e99b82; }
@property --accent-glow { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --accent-soft { syntax: "<color>"; inherits: true; initial-value: transparent; }
:root.track-accent-transition {
  transition: --accent 1.2s cubic-bezier(.45, 0, .55, 1), --accent-fill 1.2s cubic-bezier(.45, 0, .55, 1), --accent-glow 1.2s cubic-bezier(.45, 0, .55, 1), --accent-soft 1.2s cubic-bezier(.45, 0, .55, 1);
}
@media (prefers-reduced-motion: reduce) {
  :root.track-accent-transition { transition: none; }
}
:root[data-motion="instant"].track-accent-transition { transition: none; }
:root {
  /* Warm Neutral Palette (Dark Mode - Default) */
  --bg: #121110;
  --bg-surface: #1c1a18;
  --bg-surface-raised: #242220;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --bg-card-active: rgba(255, 255, 255, 0.1);

  --text: #f5f4f0;
  /* Второстепенный текст (исполнитель, подписи таб-бара, места в чарте):
     светлее прежних #9e9c96 / #96938d — на стекле и тёмном фоне те читались тускло. */
  --text-secondary: #bab8b2;
  --text-muted: #b0aea8;
  /* Кнопки мини-плеера: светлые, но мягче чисто белого текста. */
  --control-soft: color-mix(in srgb, var(--text) 82%, transparent);
  /* Иконки нижнего дока: белые на тёмном стекле. В светлой теме токен
     переопределяется на тёмный, иначе белое на белом стекле не видно. */
  --dock-icon: #ffffff;

  /* Terracotta Editorial Accent: цвет по умолчанию. В Telegram его переписывает
     цвет клиента (applyClientAccent в app.js). */  --accent: #e99b82;
  --accent-rgb: 233, 155, 130;
  --accent-fill: #e99b82;
  --accent-on: #121110;
  --accent-ink: #000000;
  --accent-glow: rgba(var(--accent-rgb), 0.25);
  --accent-soft: rgba(var(--accent-rgb), 0.14);
  --accent-gradient: linear-gradient(135deg, #e99b82 0%, #efa995 100%);

  --heart-color: #e05260;
  --heart-glow: rgba(224, 82, 96, 0.35);

  --line: rgba(255, 255, 255, 0.08);
  --line-soft: rgba(255, 255, 255, 0.04);
  --border-subtle: rgba(255, 255, 255, 0.07);
  --inset: rgba(255, 255, 255, 0.04);
  --faint: rgba(255, 255, 255, 0.02);

  --glass-bg: rgba(28, 26, 24, 0.94);
  --glass-dock: rgba(22, 20, 19, 0.96);
  --glass-card: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(16px);
  --glass-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  --scrim-tint: rgba(10, 9, 8, 0.5);

  --r-card: 14px;
  --r-shelf: 12px;
  --r-pill: 9999px;
  --r-icon: 10px;
  --r-detail: 8px;

  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;
  --s7: 32px;
  --s8: 40px;

  --page-gutter: max(clamp(24px, 3.2vw, 36px), var(--sal), var(--sar));

  --sat: max(env(safe-area-inset-top, 0px), var(--tg-device-safe-top, 0px));
  --sab: max(env(safe-area-inset-bottom, 0px), var(--tg-device-safe-bottom, 0px), var(--tg-content-safe-bottom, 0px));
  /* Низ дока: капсула стоит ниже индикатора «Домой», как таб-бар iOS 26 (≈20 pt от края при safe=34),
     а не над всей его зоной. Без индикатора — прежние 8 px. Все части дока считают от этого числа. */
  --dock-bottom: max(8px, calc(var(--sab) - 14px));
  --sal: max(env(safe-area-inset-left, 0px), var(--tg-device-safe-left, 0px), var(--tg-content-safe-left, 0px));
  --sar: max(env(safe-area-inset-right, 0px), var(--tg-device-safe-right, 0px), var(--tg-content-safe-right, 0px));

  /* Telegram WebApp Bot API 8.0 Safe Area Insets & Header Clearance */
  --tg-content-safe-top: 0px;
  --tg-header-clearance: var(--sat);

  /* Один и тот же мягкий градиент для содержимого, уходящего под шапки. */
  --scroll-header-fade-solid-stop: 45%;
  --scroll-header-fade: linear-gradient(
    180deg,
    var(--scroll-header-fade-color, var(--bg)) 0%,
    var(--scroll-header-fade-color, var(--bg)) var(--scroll-header-fade-solid-stop),
    transparent 100%
  );

  --tabbar-h: 60px;
  --mini-h: 54px;
  --app-max: 430px;
  --tap-min: 44px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", Menlo, Monaco, Consolas, monospace;

  /* Движение — раздел 8 плана нативности: быстро и собранно, как в iOS.
     Длительности и кривые — только эти токены (tests/native/guards.test.cjs).
     Пружинные кривые core/motion.js подменяет на linear(), где браузер его знает. */
  --dur-press: 100ms;      /* сжатие при касании */
  --dur-fast: 160ms;       /* цвет, подложка, мелкие смены */
  --dur-micro: 200ms;      /* переключатели, лайк, иконки, сегменты */
  --dur-release: 250ms;    /* отпускание, возврат на место */
  --dur-short: 280ms;      /* диалог, всплывающее, небольшой сдвиг */
  /* Любое перемещение — страница, вкладка, шторка, меню у кнопки, плеер, док,
     перелистывание — идёт одной пружиной за одно время (владелец 14.10:
     «скорость везде одинаковая»). Отклик 0,4 с, без отскока: к 100 мс пройдена
     половина пути, к 250 мс — 90 %. Короче — только отклик на касание и цвет. */
  --dur-move: 480ms;
  --dur-page: var(--dur-move);
  --dur-sheet: var(--dur-move);
  --dur-pop: var(--dur-move);
  --dur-player: var(--dur-move);
  --dur-spin: 800ms;       /* петли: спиннер */
  --dur-pulse: 1200ms;     /* петли: пульсация, ожидание */
  --dur-breathe: 1600ms;   /* петли: медленное дыхание */
  --dur-ambient-fast: 2.8s;/* петли: фон караоке */
  --dur-ambient: 4s;
  --dur-ambient-slow: 5s;
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-move: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-page: var(--ease-move);
  --ease-sheet: var(--ease-move);
  --ease-pop: var(--ease-move);
  --ease-micro: cubic-bezier(0.34, 1.3, 0.64, 1);
  --ease-release: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-settle: cubic-bezier(0.3, 1.12, 0.5, 1);   /* motion.js заменяет пружиной settle */
  --ease-linear: linear;
  --ease-breathe: ease-in-out;
  --dur-instant: 1ms;      /* «мгновенно»: 1 мс, а не 0, чтобы события завершения приходили */
  --dur-none: 0s;      /* мгновенный режим: переходов нет вовсе */
  --press-scale: 0.97;
  --press-content-scale: 0.985;
  --press-highlight: color-mix(in srgb, var(--text, #fff) 9%, transparent);
  /* Прежние имена — псевдонимы шкалы. */
  --d-fast: var(--dur-fast);
  --d-mid: var(--dur-release);
  --d-slow: var(--dur-page);
  --spring: var(--ease-micro);
  --spring-card: var(--ease-move);
  --spring-smooth: var(--ease-move);

  /* Шкала заголовков (одна на все экраны: главная, миксы, медиатека, поиск,
     чарты, подэкраны, артист, итоги). Начертание одно — 700; меняется только
     кегль и трекинг. Новый заголовок берёт роль, а не своё число. */
  --title-size-hero: 32px;     /* название вкладки: Главная, Миксы, Медиатека, Поиск, Чарты */
  --title-size-section: 20px;  /* заголовок раздела внутри экрана: shelf-title, section-title */
  --title-size-nav: 17px;      /* заголовок подэкрана в липкой шапке (subview-nav-title) */
  --title-track-hero: -0.025em;
  --title-track-section: -0.015em;
  --title-track-nav: -0.01em;
  --title-line-hero: 1.15;
  --title-line-section: 1.25;
  --title-line-nav: 1.3;
  --subtitle-size: 13px;       /* подпись под заголовком */
  --subtitle-weight: 400;
  --subtitle-color: var(--text-muted);
  --subtitle-line: 1.3;

  color-scheme: dark;
}

:root[data-scheme="light"] {
  /* Warm Neutral Palette (Light Mode) */
  --bg: #faf9f6;
  --bg-surface: #ffffff;
  --bg-surface-raised: #f2f0ec;
  --bg-card: rgba(0, 0, 0, 0.025);
  --bg-card-hover: rgba(0, 0, 0, 0.05);
  --bg-card-active: rgba(0, 0, 0, 0.08);

  --text: #20201f;
  --text-secondary: #686660;
  --text-muted: #686660;
  --dock-icon: #20201f;

  --accent-on: #ffffff;
  --accent: #98513d;
  --accent-rgb: 152, 81, 61;
  --accent-fill: #98513d;
  --accent-glow: rgba(var(--accent-rgb), 0.2);
  --accent-soft: rgba(var(--accent-rgb), 0.1);
  --accent-gradient: linear-gradient(135deg, #98513d 0%, #aa604a 100%);

  --heart-color: #d13d4b;
  --heart-glow: rgba(209, 61, 75, 0.25);

  --line: rgba(0, 0, 0, 0.07);
  --line-soft: rgba(0, 0, 0, 0.035);
  --border-subtle: rgba(0, 0, 0, 0.06);
  --inset: rgba(0, 0, 0, 0.035);
  --faint: rgba(0, 0, 0, 0.015);

  --glass-bg: rgba(255, 255, 255, 0.94);
  --glass-dock: rgba(250, 249, 246, 0.96);
  --glass-card: rgba(0, 0, 0, 0.025);
  --glass-border: rgba(0, 0, 0, 0.06);
  --glass-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  --scrim-tint: rgba(250, 249, 246, 0.5);

  color-scheme: light;
}

/* --------------------------------------------------------------------------
   2. Reset & Base Styles
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Скрываем индикатор прокрутки во всех областях приложения, не отключая скролл. */
* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
*::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.4;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  margin: 0;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
  text-align: inherit;
}

img {
  display: block;
  max-width: 100%;
}
img[src=""], img:not([src]) {
  opacity: 0;
}

svg {
  display: block;
  flex-shrink: 0;
}

h1, h2, h3, h4, p {
  margin: 0;
}

.hidden {
  display: none !important;
}
.clickable {
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   3. Desktop Showcase Shell & Layout
   -------------------------------------------------------------------------- */
.ios-ambient-backdrop {
  position: fixed;
  inset: 0;
  background: var(--bg);
  pointer-events: none;
  z-index: 0;
}

@media (min-width: 600px) {
  body {
    background: var(--bg);
    display: block;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 0;
  }

  .ios-app-viewport {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    overflow: hidden;
    position: relative;
    background: var(--bg);
  }
}

@media (max-width: 599px) {
  .ios-app-viewport {
    width: 100%;
    height: 100dvh;
    position: relative;
    overflow: hidden;
    background: var(--bg);
  }
}

.ios-app-viewport {
  display: flex;
  flex-direction: column;
  /* hidden оставляет контейнер прокручиваемым из кода: фокус на поле поиска под плеером
     сдвигал весь интерфейс на 156px. clip обрезает так же, но прокрутить нельзя. */
  overflow: hidden;
  overflow: clip;
}

/* One shared artwork layer for the three root tabs, behind the scroll content. */
.tabs-ambient {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
  background: color-mix(in srgb, var(--accent) 18%, var(--bg));
}
.tabs-ambient.has-artwork { visibility: visible; }
.tabs-ambient::before {
  content: "";
  position: absolute;
  inset: -80px;
  background: var(--tabs-artwork) center / cover no-repeat;
  filter: blur(55px);
  animation: album-ambient-drift var(--dur-ambient-slow) var(--ease-breathe) infinite alternate;
}
.tabs-ambient-next {
  position: absolute;
  inset: -80px;
  background: var(--tabs-next-artwork) center / cover no-repeat;
  filter: blur(55px);
  opacity: 0;
  pointer-events: none;
  animation: album-ambient-drift var(--dur-ambient-slow) var(--ease-breathe) infinite alternate;
}
@media (prefers-reduced-motion: reduce) {
  .tabs-ambient::before { animation: none; }
  .tabs-ambient-next { animation: none; }
}
html[data-motion="instant"] .tabs-ambient::before { animation: none; }
html[data-motion="instant"] .tabs-ambient-next { animation: none; }
.tabs-ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 79%, transparent);
}
:root[data-scheme="light"] .tabs-ambient::after {
  background: color-mix(in srgb, var(--bg) 85%, transparent);
}
:root[data-glass="solid"] .tabs-ambient::before { display: none; }
:root[data-glass="solid"] .tabs-ambient-next { display: none; }
:root[data-glass="solid"] .tabs-ambient::after { display: none; }

.ios-main-content {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: smooth;
  padding-bottom: calc(var(--tabbar-h) + var(--mini-h) + var(--sab) + 24px);
}
.ios-main-content::-webkit-scrollbar { display: none; }
/* В Telegram шапка приложения скрыта, а строка статуса и кнопки Telegram поверх контента без фона:
   прокрутка уходила под них. Полоса сверху гасит контент до краёв строки статуса. */
body.in-telegram.tg-mobile .ios-main-content::before {
  content: "";
  position: sticky;
  top: 0;
  z-index: 9;
  display: block;
  height: calc(var(--tg-header-clearance) + 16px);
  margin-bottom: calc(0px - var(--tg-header-clearance) - 16px);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 70%, transparent 100%);
  pointer-events: none;
}

/* Маска содержимого прокручиваемых панелей. Глубина задаётся по высоте шапки. */
.scroll-fade-mask {
  --scroll-mask-top: 56px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 var(--scroll-mask-top), #000 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 var(--scroll-mask-top), #000 100%);
}
.scroll-fade-mask--edges {
  -webkit-mask-image: linear-gradient(
    180deg,
    transparent 0,
    #000 var(--scroll-mask-top),
    #000 calc(100% - var(--scroll-mask-bottom)),
    transparent 100%
  );
  mask-image: linear-gradient(
    180deg,
    transparent 0,
    #000 var(--scroll-mask-top),
    #000 calc(100% - var(--scroll-mask-bottom)),
    transparent 100%
  );
}

body.in-telegram {
  --tg-header-clearance: max(var(--tg-content-safe-top, 0px), var(--sat));
}

body.in-telegram.tg-mobile {
  /* Кнопки Telegram: 4px над кнопкой + 30px высоты. SDK может задать большую зону. */
  --tg-header-clearance: max(var(--tg-content-safe-top, 0px), calc(var(--sat) + 34px));
}

body.in-telegram.tg-mobile .ios-top-bar {
  display: none !important;
}

.ios-page-container {
  min-height: 100%;
  padding: 0 var(--page-gutter) 20px;
}

body.in-telegram.tg-mobile .ios-page-container {
  padding-top: calc(var(--tg-header-clearance) + 4px);
}

/* Keep horizontal rails aligned with the page gutter instead of bleeding to the edge. */
:is(.ios-page-container, .ios-charts-page, .ios-subview, .sync-detail, .artist-body-container) :is(
  .ios-card-carousel,
  .home-quick-tracks-card,
  .ios-chips-scroll,
  .ios-artists-carousel,
  .home-artists-carousel,
  .ios-mixes-grid,
  .ios-mood-scroll,
  #homeGenresGrid,
  #searchArtistsList,
  #libraryRecentList,
  .ios-recent-tracks-grid,
  .artist-albums-carousel,
  .playlist-chips-scroll,
  .chart-chip-row
) {
  margin-inline: 0;
  padding-inline: 0;
  scroll-padding-inline: 0;
}

.tab-pane {
  display: none;
}
.tab-pane.active {
  display: block;
}

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

/* --------------------------------------------------------------------------
   4. Navigation Top Bar & Typography
   -------------------------------------------------------------------------- */
.ios-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--sat) + 12px) 0 6px;
  min-height: 44px;
}

.ios-brand-wordmark {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
}

.ios-circle-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-surface-raised);
  border: 1px solid var(--line);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: inherit;
  box-shadow: none;
  cursor: pointer;
  transition: opacity var(--d-fast) var(--ease), transform var(--d-fast) var(--ease);
}
.ios-circle-avatar.is-pressed {
  scale: 0.94;
  opacity: 0.8;
}

.ios-page-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 4px 0 12px;
}

.ios-large-title {
  font-size: var(--title-size-hero);
  font-weight: 700;
  letter-spacing: var(--title-track-hero);
  line-height: var(--title-line-hero);
  color: var(--text);
}

.ios-greeting-sub {
  font-size: var(--subtitle-size);
  font-weight: var(--subtitle-weight);
  line-height: var(--subtitle-line);
  color: var(--subtitle-color);
}

.ios-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--tg-header-clearance) + 8px) 0 var(--s2);
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--scroll-header-fade);
}

.ios-header-actions {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

/* --------------------------------------------------------------------------
   5. Shelves & Sections
   -------------------------------------------------------------------------- */
.ios-shelf-section {
  margin-top: 22px;
}

.shelf-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.shelf-title {
  font-size: var(--title-size-section);
  font-weight: 700;
  letter-spacing: var(--title-track-section);
  line-height: var(--title-line-section);
  color: var(--text);
}

.shelf-action, .shelf-action-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  transition: opacity var(--d-fast) var(--ease);
}
.shelf-action svg, .shelf-action-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}
.shelf-action.is-pressed, .shelf-action-btn.is-pressed {
  opacity: 0.6;
}

/* "Продолжить слушать" (Recently Played) */
.home-recent-card {
  flex: 0 0 116px;
  /* Явная ширина, а не только flex-basis: без неё min-width:auto берёт ширину
     самого длинного названия (оно nowrap), и карточка растягивается на всю полку. */
  width: 116px;
  min-width: 0;
  max-width: 116px;
  scroll-snap-align: start;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.home-recent-card.is-pressed {
  scale: var(--press-content-scale);
}
.home-recent-art-wrap {
  width: 116px;
  height: 116px;
  border-radius: var(--r-shelf);
  overflow: hidden;
  position: relative;
  background: var(--inset);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--line-soft);
}
.home-recent-art-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.home-recent-play-badge {
  display: none !important;
}
.home-recent-title {
  width: 100%;
  min-width: 0;
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.home-recent-artist {
  width: 100%;
  min-width: 0;
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
   text-overflow: clip;
   line-height: 1.2;
}

/* Carousels */
.ios-card-carousel {
  display: flex;
  gap: var(--s3);
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ios-card-carousel::-webkit-scrollbar { display: none; }

/* «Избранные исполнители» в Медиатеке: круглые аватары с именем, лента вбок. */
.fav-artists-carousel {
  gap: 14px;
  scroll-snap-type: x proximity;
}
.fav-artist-card {
  flex: 0 0 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  scroll-snap-align: start;
  -webkit-tap-highlight-color: transparent;
}
.fav-artist-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--inset);
  border: 1.5px solid var(--border-subtle);
  transition: transform var(--dur-fast) var(--ease);
}
.fav-artist-card:active .fav-artist-avatar { transform: none; }
.fav-artist-name {
  max-width: 100%;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Curated Card (Home - Apple Music Square Album Shelf) */
.ios-curated-card {
  flex: 0 0 138px;
  width: 138px;
  scroll-snap-align: start;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: transparent;
  border: none;
  padding: 0;
  transition: transform var(--d-fast) var(--ease);
}
.ios-curated-card.is-pressed {
  scale: var(--press-content-scale);
}
.curated-art-wrap {
  width: 138px;
  height: 138px;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-shelf);
  overflow: hidden;
  position: relative;
  background: var(--bg-surface-raised);
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}
.curated-art-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--r-shelf);
}
.curated-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 2px;
}
.curated-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}
.curated-artists {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

/* Card Floating Play Badge */
.card-play-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  opacity: 0.92;
  transition: opacity var(--d-fast) var(--ease), transform var(--d-fast) var(--ease);
}
.card-play-badge svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
  margin-left: 1px;
}

/* --------------------------------------------------------------------------
   6. Track Rows & Tables (Clean Editorial Rows)
   -------------------------------------------------------------------------- */
/* «Для вас»: колонки по четыре трека, листаются по горизонтали. */
.home-quick-tracks-card {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin: 0 -16px;
  padding: 0 16px;
  /* Снап должен учитывать поля, иначе первая колонка прилипает к краю экрана. */
  scroll-padding: 0 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.home-quick-tracks-card::-webkit-scrollbar { display: none; }
.home-quick-col {
  flex: 0 0 calc(100% - 40px);
  min-width: 0;
  scroll-snap-align: start;
}

.home-quick-track-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  transition: background var(--d-fast) var(--ease);
}
.home-quick-track-row:last-child {
  border-bottom: none;
}
.home-quick-track-row.is-pressed { scale: none; }

.home-quick-track-left {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-width: 0;
  flex: 1;
}

.home-quick-track-thumb-wrap {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--inset);
  border: 1px solid var(--line-soft);
}
.home-quick-track-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-quick-track-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.home-quick-track-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
   text-overflow: clip;
}
.home-quick-track-artist {
  font-size: 12.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
   text-overflow: clip;
}

/* Длинное имя артиста мягко растворяется у правого края, без символа «…». */
.artist-name-fade,
.track-artist-sub,
.nm-track-sub,
.fav-artist-name,
.search-artist-name,
.chart-page-artist-text,
.replay-artist-name {
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 28px), transparent 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  text-overflow: clip;
}

.home-quick-track-right {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-shrink: 0;
}
.home-quick-track-duration {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.home-quick-track-options-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.home-quick-track-options-btn.is-pressed {
  color: var(--text);
  background: var(--bg-card-hover);
}

/* General Playlist Track Rows */
.track-row {
  display: grid;
  grid-template-columns: 44px 1fr auto auto;
  align-items: center;
  gap: var(--s3);
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  transition: background var(--d-fast) var(--ease);
}
.track-row:last-child {
  border-bottom: none;
}
.track-row.is-pressed {
  scale: 0.985;
}
.track-row.playing .track-name {
  color: var(--accent);
  font-weight: 700;
}

.track-cell-art {
  width: 44px;
  height: 44px;
  border-radius: var(--r-detail);
  overflow: hidden;
  background: var(--inset);
  border: 1px solid var(--line-soft);
}
.track-cell-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.track-cell-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.track-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-artist-line {
  font-size: 12.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-duration {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  padding-right: var(--s1);
}
.track-more-trigger {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.track-more-trigger svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* --------------------------------------------------------------------------
   7. Genres & Vibe Chips (.ios-chips-scroll)
   -------------------------------------------------------------------------- */
.ios-chips-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.ios-chips-scroll::-webkit-scrollbar { display: none; }

.genre-bubble-card, .mood-chip {
  flex: 0 0 auto;
  height: 44px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease), transform var(--d-fast) var(--ease);
  box-shadow: none;
  min-height: auto;
}
.genre-bubble-card::before { display: none; }
.genre-bubble-card.is-pressed, .mood-chip.is-pressed {
  scale: 0.96;
  background: var(--bg-card-active);
}
.genre-title, .mood-chip-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

/* Жанры — одна строка под заголовком, листаются по горизонтали; без цветных точек. */
#homeGenresGrid {
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 8px;
  padding-bottom: 0;
  scrollbar-width: none;
}
#homeGenresGrid::-webkit-scrollbar { display: none; }
#homeGenresGrid .genre-bubble-card {
  height: 44px;
  padding: 0 16px;
}
#homeGenresGrid .genre-title {
  font-size: 14px;
}
#homeGenresSection {
  margin-top: 12px;
}
#homeGenresGrid .genre-bubble-card.is-active {
  background: var(--accent);
  border-color: var(--accent);
}
#homeGenresGrid .genre-bubble-card.is-active .genre-title {
  color: var(--accent-on);
}
/* Номер в чарте: слева от обложки, приглушённый. */
.chart-rank {
  flex: 0 0 22px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
/* «Смотреть все» — последняя ячейка блока, по высоте как строка трека. */
.home-quick-see-all {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 8px 0;
  border: none;
  background: none;
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.home-quick-see-all.is-pressed {
  opacity: 0.6;
}

/* Чарты: самостоятельная вкладка с первым треком и плотным рейтингом. */
.ios-charts-page {
  --page-gutter: clamp(16px, 4.2vw, 36px);
  position: absolute;
  inset: 0;
  z-index: 1200;
  background: transparent;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 var(--page-gutter) calc(var(--tabbar-h) + var(--mini-h) + var(--sab) + var(--s6));
}
.charts-page-top {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 calc(var(--page-gutter) * -1);
  padding: calc(var(--tg-header-clearance) + 8px) var(--page-gutter) 10px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.charts-page-heading {
  position: relative;
  z-index: 1;   /* кнопка поиска над полем, которое из неё вытекает */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  margin-bottom: var(--s3);
}
.charts-page-title {
  margin: 0;
  color: var(--text);
  font-size: var(--title-size-hero);
  font-weight: 700;
  line-height: var(--title-line-hero);
  letter-spacing: var(--title-track-hero);
}
.charts-page-controls {
  padding: 0 0 8px;
}
.chart-chip-row {
  display: flex;
  gap: 6px;
  overflow: hidden;
  scrollbar-width: none;
}
.chart-chip-row::-webkit-scrollbar {
  display: none;
}
.chart-chip-row--period { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.chart-chip {
  min-width: 0;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 8px;
  border: none;
  border-radius: 999px;
  background: var(--bg-surface);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.chart-chip-chevron {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chart-chip.is-active {
  background: var(--accent);
  color: var(--accent-on);
}
.charts-featured {
  position: relative;
  min-height: 150px;
  aspect-ratio: 2.6 / 1;
  margin: 4px 0 8px;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.charts-featured.hidden { display: none; }
.charts-featured-art {
  position: absolute;
  z-index: -2;
  top: 0;
  right: 0;
  width: 66%;
  height: 100%;
  object-fit: cover;
  object-position: center 34%;
}
.charts-featured::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, var(--bg-surface) 0%, color-mix(in srgb, var(--bg-surface) 94%, transparent) 34%, transparent 78%);
}
.charts-featured-content {
  width: 68%;
  height: 100%;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 15px 16px;
}
.charts-featured-kicker {
  margin-bottom: 7px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.charts-featured-title {
  max-width: 100%;
  color: var(--text);
  font-size: clamp(23px, 6vw, 30px);
  font-weight: 750;
  line-height: 1.02;
  letter-spacing: -0.035em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.charts-featured-artist {
  max-width: 100%;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.charts-featured-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.charts-featured-play {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--accent-on);
  background: var(--accent);
  border: 0;
  border-radius: 50%;
}
.charts-featured-play svg { width: 21px; height: 21px; fill: currentColor; }
.charts-featured-stat {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  color: var(--text);
  background: color-mix(in srgb, var(--bg-surface) 82%, transparent);
  border-radius: 999px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.charts-featured-stat svg,
.chart-stat-icon {
  width: 15px;
  height: 16px;
  fill: currentColor;
  color: var(--text-secondary);
  flex: 0 0 auto;
}
.charts-featured-rank {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 36px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  color: var(--accent-on);
  background: var(--accent);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
}
.chart-page-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.chart-page-row {
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: stretch;
  padding: 2px 8px 2px 10px;
  background: color-mix(in srgb, var(--bg-surface) 48%, transparent);
  border: 1px solid transparent;
  border-radius: 15px;
}
.chart-page-row.is-current {
  background: color-mix(in srgb, var(--accent) 17%, var(--bg-surface));
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}
.chart-page-row-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.chart-rank {
  width: 22px;
  flex: 0 0 22px;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.chart-page-row.is-current .chart-rank { color: var(--accent); }
.chart-page-thumb {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  object-fit: cover;
  background: var(--bg-surface-raised);
  border-radius: 8px;
}
.chart-page-meta {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.chart-page-title-text,
.chart-page-artist-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chart-page-title-text { color: var(--text); font-size: 13.5px; font-weight: 650; }
.chart-page-artist-text { color: var(--text-secondary); font-size: 11.5px; }
.chart-page-row-stat {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.chart-page-options {
  width: 30px;
  height: 40px;
  display: grid;
  place-items: center;
  align-self: center;
  color: var(--text-secondary);
}
.chart-page-options svg { width: 18px; height: 18px; fill: currentColor; }
@media (max-width: 390px) {
  .chart-page-row { grid-template-columns: minmax(0, 1fr) 26px; padding-inline: 6px; }
  .chart-page-row-main { gap: 7px; }
  .chart-rank { width: 18px; flex-basis: 18px; }
  .chart-page-thumb { width: 40px; height: 40px; flex-basis: 40px; }
  .chart-page-row-stat { font-size: 11px; gap: 3px; }
  .chart-stat-icon { width: 13px; }
}
#homeQuickTracksContainer.is-loading {
  opacity: 0.45;
  transition: opacity var(--d-fast) var(--ease);
}

/* Artist Avatars Carousel ("Ваши артисты") */
.ios-artists-carousel,
.home-artists-carousel {
  display: flex;
  gap: var(--s3);
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ios-artists-carousel::-webkit-scrollbar,
.home-artists-carousel::-webkit-scrollbar {
  display: none;
}

.artist-avatar-card,
.home-artist-card {
  flex: 0 0 72px;
  width: 72px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-align: center;
  transition: transform var(--d-fast) var(--ease);
}
.artist-avatar-card.is-pressed,
.home-artist-card.is-pressed {
  scale: none;
}

.artist-circle-img,
.home-artist-avatar-wrap img {
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  max-width: 64px;
  max-height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-surface-raised);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1.5px solid var(--line);
  display: block;
}

.home-artist-avatar-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-surface-raised);
  border: 1.5px solid var(--line);
  flex-shrink: 0;
}

.artist-circle-name,
.home-artist-name {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 72px;
  line-height: 1.2;
  display: block;
  text-align: center;
}

/* --------------------------------------------------------------------------
   8. Tab 2: Миксы (Smart Wave & Mixes)
   -------------------------------------------------------------------------- */
.ios-wave-hero-card {
  position: relative;
  border-radius: var(--r-card);
  padding: var(--s4);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  margin-top: 4px;
  overflow: hidden;
}

.wave-compact-left {
  flex-shrink: 0;
}
.wave-hero-art-thumb {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}
.wave-hero-art-thumb svg {
  width: 26px;
  height: 26px;
}

.wave-compact-center {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.wave-compact-meta .wave-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
  line-height: 1.2;
}
.wave-compact-meta .wave-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.2;
}

/* Hero card active state accent and elevation */
.ios-wave-hero-card.active-wave {
  border-color: rgba(250, 45, 72, 0.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}
.ios-wave-hero-card.active-wave .wave-hero-art-thumb {
  background: linear-gradient(135deg, #fa2d48, #ff7a00);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.ios-wave-hero-card.paused-wave {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.wave-compact-right {
  flex-shrink: 0;
}
.wave-hero-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--accent-on);
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.16);
  transition: transform var(--d-fast) var(--ease), opacity var(--d-fast) var(--ease);
}
.wave-hero-play-btn.is-pressed {
  scale: 0.95;
  opacity: 0.9;
}
.wave-hero-play-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Mix Cards */
.ios-mixes-grid {
  display: flex;
  gap: var(--s3);
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ios-mixes-grid::-webkit-scrollbar { display: none; }

.mix-card {
  flex: 0 0 138px;
  width: 138px;
  scroll-snap-align: start;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  transition: transform var(--d-fast) var(--ease);
}
.mix-card.is-pressed {
  scale: 0.97;
}
.mix-art-wrap {
  width: 138px;
  height: 138px;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-shelf);
  overflow: hidden;
  position: relative;
  background: var(--bg-surface-raised);
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}
.mix-art-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--r-shelf);
}
.mix-card-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 2px;
}
.mix-card-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 1px;
}
.mix-card-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mix-card-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.25;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Портретная карточка микса (18.11.2026, «Кромка»): лицо артиста во всю карточку, внизу тёмный
   градиент, «МИКС», название и двое спутников. Без иконок и смайликов; плоская, без стекла.
   Градиент --mix-from/--mix-to лежит на самой карточке: упавшая картинка не оставляет дыру. */
.mix-card.mix-portrait {
  position: relative;
  flex: 0 0 168px;
  width: 168px;
  height: 236px;
  gap: 0;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--r-card);
  background: linear-gradient(160deg, var(--mix-from, #2a201c), var(--mix-to, #140f0d));
  box-shadow: 0 18px 26px -20px rgba(0, 0, 0, 0.7);
}
.mix-card.mix-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0, transparent 30%, rgba(10, 9, 8, 0.5) 58%, rgba(10, 9, 8, 0.9) 100%);
}
.mix-portrait-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* На главной нижний край фотографии растворяется в её же размытой копии. */
#homeMixesContainer .mix-portrait::after { background: none; }
#homeMixesContainer .mix-portrait-photo {
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 78%);
  mask-image: linear-gradient(to bottom, #000 30%, transparent 78%);
}
#homeMixesContainer .mix-portrait-blur {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(22px);
  transform: scale(1.2);
  pointer-events: none;
}
html[data-glass="solid"] #homeMixesContainer .mix-portrait-blur { display: none; }
html[data-glass="solid"] #homeMixesContainer .mix-portrait-photo { -webkit-mask-image: none; mask-image: none; }
html[data-glass="solid"] #homeMixesContainer .mix-portrait::after {
  background: linear-gradient(to bottom, transparent 35%, var(--mix-to, #140f0d) 100%);
}
#homeMixesContainer .mix-portrait-body { text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8); }
.mix-portrait-body {
  position: absolute;
  z-index: 1;
  left: 14px;
  right: 12px;
  bottom: 12px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.mix-portrait-tag {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}
.mix-portrait-name {
  margin: 2px 0 8px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #fff;
  overflow: hidden;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.mix-portrait-with {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 22px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.72);
}
.mix-portrait-faces { display: flex; flex: none; }
.mix-portrait-faces img {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px #1a1816;
}
.mix-portrait-faces img + img { margin-left: -7px; }
.mix-portrait-with-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Mood Cards & Chips */
.ios-mood-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.ios-mood-scroll::-webkit-scrollbar { display: none; }

.mood-chip {
  flex: 0 0 auto;
  height: 44px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease), transform var(--d-fast) var(--ease);
}
.mood-chip.is-pressed {
  scale: 0.96;
  background: var(--bg-card-active);
}
.mood-title, .mood-chip-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

/* Tools Inset Grouped Table (Services) */
.ios-tools-list {
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
}
.tool-row {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
}
.tool-row:last-child {
  border-bottom: none;
}
.tool-row.is-pressed {
  scale: 0.985;
}
.tool-icon-squircle {
  width: 32px;
  height: 32px;
  border-radius: var(--r-detail);
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.tool-icon-squircle svg {
  width: 17px;
  height: 17px;
}
.tool-info {
  display: flex;
  flex-direction: column;
}
.tool-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.tool-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   9. Tab 3: Медиатека (Library & Subviews)
   -------------------------------------------------------------------------- */
.ios-library-nav-menu {
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  margin-top: 4px;
}
.ios-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  transition: background var(--d-fast) var(--ease);
}
.ios-menu-item:last-child {
  border-bottom: none;
}
.ios-menu-item.is-pressed {
  scale: 0.985;
}
.menu-item-left {
  display: flex;
  align-items: center;
  gap: var(--s3);
}
.menu-icon-squircle {
  width: 32px;
  height: 32px;
  border-radius: var(--r-detail);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: var(--accent-soft);
  flex-shrink: 0;
}
/* Все иконки меню — контурные, одной толщины: заливка делала их тяжелее друг друга. */
.menu-icon-squircle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.menu-count {
  margin-left: auto;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.menu-count:empty { display: none; }
.menu-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.menu-chevron {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}
.menu-chevron svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Playlist Stage Header */
.playlist-stage-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--s4) 0 var(--s5);
  position: relative;
}
.playlist-art-stage {
  position: relative;
  width: 170px;
  height: 170px;
  margin: 0 auto var(--s4);
}
.playlist-art-glow {
  position: absolute;
  inset: -10px;
  border-radius: 28px;
  background-size: cover;
  background-position: center;
  filter: blur(28px) saturate(220%);
  opacity: 0.6;
  z-index: 0;
}
.playlist-art-card,
.playlist-art-wrap {
  position: relative;
  z-index: 1;
  width: 170px;
  height: 170px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  background: var(--inset);
}
.playlist-art-card img,
.playlist-art-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.playlist-stage-title,
.playlist-hero-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 4px;
}
.playlist-stage-sub,
.playlist-hero-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: var(--s4);
}
.playlist-stage-actions,
.playlist-action-dual-buttons {
  display: flex;
  gap: var(--s3);
  width: 100%;
  max-width: 320px;
  justify-content: center;
}
.playlist-play-pill,
.playlist-shuffle-pill,
.playlist-btn-primary,
.playlist-btn-secondary {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--d-fast) var(--ease);
}
.playlist-play-pill,
.playlist-btn-primary {
  background: var(--accent-gradient);
  color: var(--accent-on);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
}
.playlist-shuffle-pill,
.playlist-btn-secondary {
  background: var(--glass-card);
  border: 1px solid var(--glass-border);
  color: var(--text);
}
.playlist-play-pill.is-pressed,
.playlist-shuffle-pill.is-pressed,
.playlist-btn-primary.is-pressed,
.playlist-btn-secondary.is-pressed {
  scale: 0.95;
}
.playlist-play-pill svg,
.playlist-shuffle-pill svg,
.playlist-btn-primary svg,
.playlist-btn-secondary svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.playlist-footer-caption {
  padding: var(--s4) 0 var(--s6);
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
}

/* Library Recently Added Carousel (#libraryRecentList) */
#libraryRecentList {
  margin: 0 calc(var(--s4) * -1);
  padding: 0 var(--s4) 6px;
  scroll-padding: 0 var(--s4);
}
.ios-recent-tracks-grid {
  display: flex;
  gap: var(--s3);
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ios-recent-tracks-grid::-webkit-scrollbar { display: none; }

.recent-track-card {
  flex: 0 0 116px;
  width: 116px;
  min-width: 0;
  max-width: 116px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: transform var(--d-fast) var(--ease);
}
.recent-track-card.is-pressed {
  scale: 0.97;
}
.recent-track-art {
  width: 116px;
  height: 116px;
  border-radius: var(--r-shelf);
  overflow: hidden;
  background: var(--inset);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--line-soft);
  position: relative;
}
.recent-track-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.recent-track-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.recent-track-artist {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

/* Subviews (Slide-over Full Height Views inside Tab) */
.ios-subview {
  position: absolute;
  inset: 0;
  z-index: 800;
  background: transparent;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0 var(--page-gutter) calc(var(--tabbar-h) + var(--mini-h) + var(--sab) + var(--s6));
}

/* Избранное: собственная обложка под содержимым, независимо от текущего трека. */
#playlistsDetailView.is-favorites-ambient {
  isolation: isolate;
  background: color-mix(in srgb, #630e20 18%, var(--bg));
}
#playlistsDetailView.is-favorites-ambient::before {
  content: "";
  position: fixed;
  inset: -80px;
  z-index: -2;
  pointer-events: none;
  background: url('/favorites-heart-arrow.svg') center / cover no-repeat;
  filter: blur(55px);
  animation: album-ambient-drift var(--dur-ambient-slow) var(--ease-breathe) infinite alternate;
}
#playlistsDetailView.is-favorites-ambient::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: color-mix(in srgb, var(--bg) 79%, transparent);
}
:root[data-scheme="light"] #playlistsDetailView.is-favorites-ambient::after {
  background: color-mix(in srgb, var(--bg) 85%, transparent);
}
@media (prefers-reduced-motion: reduce) {
  #playlistsDetailView.is-favorites-ambient::before { animation: none; }
}
html[data-motion="instant"] #playlistsDetailView.is-favorites-ambient::before { animation: none; }
:root[data-glass="solid"] #playlistsDetailView.is-favorites-ambient::before { display: none; }
:root[data-glass="solid"] #playlistsDetailView.is-favorites-ambient::after { display: none; }

/* У остальных плейлистов источник — обложка в шапке, не текущий трек. */
#playlistsDetailView.is-playlist-ambient {
  isolation: isolate;
  background: var(--bg);
}
#playlistsDetailView.is-playlist-ambient::before {
  content: "";
  position: fixed;
  inset: -80px;
  z-index: -2;
  pointer-events: none;
  background: var(--playlist-artwork) center / cover no-repeat;
  filter: blur(55px);
  animation: album-ambient-drift var(--dur-ambient-slow) var(--ease-breathe) infinite alternate;
}
#playlistsDetailView.is-playlist-ambient::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: color-mix(in srgb, var(--bg) 79%, transparent);
}
:root[data-scheme="light"] #playlistsDetailView.is-playlist-ambient::after { background: color-mix(in srgb, var(--bg) 85%, transparent); }
@media (prefers-reduced-motion: reduce) {
  #playlistsDetailView.is-playlist-ambient::before { animation: none; }
}
html[data-motion="instant"] #playlistsDetailView.is-playlist-ambient::before { animation: none; }
:root[data-glass="solid"] #playlistsDetailView.is-playlist-ambient::before { display: none; }
:root[data-glass="solid"] #playlistsDetailView.is-playlist-ambient::after { display: none; }

/* Подэкран, который открывают с любой вкладки (app.js, ANYWHERE_SUBVIEWS), — на
   уровне общих страниц: поверх профиля, артиста и чартов. */
.ios-subview.ios-subview-global { z-index: 1200; }

.ios-subview-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-height: 52px;
  margin: 0 calc(var(--page-gutter) * -1) var(--s3);
  padding: calc(var(--tg-header-clearance) + 8px) var(--page-gutter) 8px;
  background: var(--scroll-header-fade);
}

.subview-nav-circle-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: var(--bg-surface-raised);
  border: 1px solid var(--line);
  flex: 0 0 auto;
  cursor: pointer;
  transition: transform var(--d-fast) var(--ease), background var(--d-fast) var(--ease);
}
.subview-nav-circle-btn.is-pressed {
  scale: 0.92;
  background: var(--inset);
}
.subview-nav-circle-btn svg {
  width: 20px;
  height: 20px;
}
.subview-nav-circle-btn svg:not([fill="none"]) {
  fill: currentColor;
}

.subview-nav-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--title-size-nav);
  font-weight: 700;
  letter-spacing: var(--title-track-nav);
  line-height: var(--title-line-nav);
  text-align: center;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subview-nav-right-slot {
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-width: 36px;
  justify-content: flex-end;
}

/* Playlists Catalog List */
.ios-playlists-catalog-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: var(--s2);
}
.playlist-catalog-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 10px var(--s3);
  background: var(--bg-surface);
  border-radius: var(--r-card);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background var(--d-fast) var(--ease), transform var(--d-fast) var(--ease);
}
.playlist-catalog-item.is-pressed {
  scale: 0.985;
}
.playlist-catalog-art {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--inset);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.playlist-catalog-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.playlist-fav-art-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.playlist-catalog-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.playlist-catalog-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.playlist-catalog-sub {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Плейлист, связанный с сервисом: подпись под названием с иконкой обмена. */
.playlist-catalog-sync {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}
.playlist-catalog-sync span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.playlist-catalog-sync svg {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.playlist-catalog-sync.is-off { color: var(--text-muted); font-weight: 500; }
.playlist-catalog-sync.is-warn { color: #d98a1f; }
.playlist-catalog-chevron {
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.playlist-catalog-chevron svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Artists Directory Subview */
.artists-dir-search-wrap {
  margin-bottom: var(--s3);
}
.ios-artists-directory-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.artist-dir-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px var(--s3);
  background: var(--bg-surface);
  border-radius: var(--r-card);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background var(--d-fast) var(--ease), transform var(--d-fast) var(--ease);
}
.artist-dir-row.is-pressed {
  scale: 0.985;
}
.artist-dir-left {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-width: 0;
}
.artist-dir-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--inset);
  flex-shrink: 0;
  border: 1.5px solid var(--border-subtle);
}
.artist-dir-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.artist-dir-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.artist-dir-sub {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.artist-dir-chevron {
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.artist-dir-chevron svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Sync Screen Subview */
.sync-body {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}
.sync-provider-list {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.sync-loading {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding: var(--s4);
}
.sync-btn {
  appearance: none;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: transform var(--d-fast) var(--ease);
}
.sync-btn.is-pressed { scale: 0.96; }
.sync-btn-primary {
  background: var(--accent-gradient);
  border-color: transparent;
  color: var(--accent-on);
}
.sync-btn-ghost {
  color: var(--text-muted);
}
.sync-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--s2);
}
.sync-runs {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.sync-detail {
  position: absolute;
  inset: 0;
  z-index: 850;
  background: transparent;
  overflow-y: auto;
  padding: 0 var(--page-gutter) calc(var(--tabbar-h) + var(--mini-h) + var(--sab) + var(--s6));
}

/* Одинаковое затухание под закреплёнными шапками страниц и разделов. */
.ios-artist-page::before {
  content: "";
  position: sticky;
  top: 0;
  z-index: 9;
  display: block;
  height: var(--scroll-header-fade-height);
  margin-bottom: calc(0px - var(--scroll-header-fade-height));
  background: var(--scroll-header-fade);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--d-mid) var(--ease);
}
.ios-artist-page.is-scrolled::before {
  opacity: 1;
}
.sync-detail-body {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding-top: var(--s2);
}
.sync-pl {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border-radius: var(--r-card);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}
.sync-pl-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
}
.sync-pl-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --------------------------------------------------------------------------
   10. Tab 4: Поиск (Search Tab)
   -------------------------------------------------------------------------- */
.ios-search-input-pill {
  display: flex;
  align-items: center;
  gap: var(--s2);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: var(--s4);
  transition: border-color var(--d-fast) var(--ease), box-shadow var(--d-fast) var(--ease);
}
.ios-search-input-pill:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-field-icon svg {
  width: 17px;
  height: 17px;
  fill: var(--text-muted);
}
#searchInput {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 15px;
}
#searchInput::placeholder {
  color: var(--text-muted);
}
.search-dismiss-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.search-dismiss-btn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}
#searchMicBtn {
  display: none !important; /* Скрываем fake microphone */
}

/* Search Headers */
.search-discovery-header,
.search-section-header {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: var(--s3) 0 var(--s2);
}

/* Discovery 2-Column Grid */
.disco-grid,
.ios-discovery-2col-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s3);
}
.disco-card {
  position: relative;
  height: 80px;
  border-radius: var(--r-shelf);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
  border: 1px solid var(--line-soft);
  transition: transform var(--d-fast) var(--ease);
}
.disco-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--d-mid) var(--ease);
}
.disco-card.is-pressed {
  scale: 0.97;
}
.disco-card.is-pressed img {
  scale: 1.05;
}
.disco-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.72) 100%);
}
.disco-card h3,
.disco-card .disco-title {
  position: absolute;
  bottom: 8px;
  left: 10px;
  right: 10px;
  z-index: 1;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

/* Search Live Results */
.ios-search-results {
  display: flex;
  flex-direction: column;
}
.search-artists-row,
#searchArtistsList {
  display: flex;
  gap: var(--s3);
  overflow-x: auto;
  padding-bottom: var(--s2);
  scrollbar-width: none;
}
.search-artists-row::-webkit-scrollbar,
#searchArtistsList::-webkit-scrollbar {
  display: none;
}

.search-artist-card {
  flex: 0 0 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-align: center;
  transition: transform var(--d-fast) var(--ease);
}
.search-artist-card.is-pressed { scale: none; }
.search-artist-thumb {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--inset);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--line);
}
.search-artist-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 76px;
}
.search-artist-sub {
  max-width: 76px;
  font-size: 11px;
  line-height: 1.2;
  color: var(--text-muted);
  margin-top: -4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-songs-list,
#searchSongsList,
.ios-track-scroll-area,
#trackList,
.player-queue-list {
  display: flex;
  flex-direction: column;
}

/* --------------------------------------------------------------------------
   Universal Track Item (.ios-track-item)
   Used in Search, Playlists, Favorites, Queue, and Artist Pages
   -------------------------------------------------------------------------- */
.ios-track-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 8px 12px;
  background: var(--bg-surface);
  border-radius: var(--r-detail);
  margin-bottom: 6px;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background var(--d-fast) var(--ease), transform var(--d-fast) var(--ease);
  position: relative;
}
.ios-track-item.is-pressed {
  scale: 0.985;
}
.ios-track-item.active-track {
  background: var(--accent-soft);
  border-color: rgba(var(--accent-rgb), 0.35);
}
.ios-track-item.active-track .track-name-main span {
  color: var(--accent);
}

.track-cover-sm {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--inset);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--line-soft);
}

.track-meta-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.track-name-main {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-name-main span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.track-artist-sub {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-item-more-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: 50%;
  flex-shrink: 0;
  transition: transform var(--d-fast) var(--ease), color var(--d-fast) var(--ease);
}
.track-item-more-btn.is-pressed {
  scale: 0.9;
  color: var(--text);
}
.track-drag-handle {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: grab;
  flex-shrink: 0;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.track-drag-handle.is-pressed {
  cursor: grabbing;
}

.ios-eq-mini {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  flex-shrink: 0;
  vertical-align: middle;
}
.ios-eq-mini span {
  width: 2.5px;
  height: 100%;
  background: var(--accent);
  border-radius: 1px;
  opacity: 0.4;
  transform: scaleY(0.25);
  transform-origin: 50% 100%;
  transition: opacity var(--dur-release) var(--ease), transform var(--dur-release) var(--ease);
}

/* Animate ONLY when audio is actively playing */
body.is-playing .ios-eq-mini:not(.paused) span {
  opacity: 1;
  animation: miniEq var(--dur-pulse) var(--ease-breathe) infinite alternate;
  animation-play-state: running;
}
.ios-eq-mini span:nth-child(1) { animation-delay: 0.1s; }
.ios-eq-mini span:nth-child(2) { animation-delay: 0.3s; }
.ios-eq-mini span:nth-child(3) { animation-delay: 0.2s; }

body:not(.is-playing) .ios-eq-mini span,
.ios-eq-mini.paused span {
  animation-play-state: paused !important;
  transform: scaleY(0.25) !important;
  opacity: 0.45;
}

@keyframes miniEq {
  0% { transform: scaleY(0.2); }
  100% { transform: scaleY(1); }
}

.mini-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}
.ios-track-title-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
}

/* Track item overrides inside Player Modal */
.ios-player-modal .ios-track-item {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}
.ios-player-modal .ios-track-item.active-track {
  background: rgba(var(--accent-rgb), 0.2);
  border-color: rgba(var(--accent-rgb), 0.45);
}
.ios-player-modal .track-name-main {
  color: #ffffff;
}
.ios-player-modal .track-artist-sub {
  color: rgba(255, 255, 255, 0.65);
}
.ios-player-modal .track-item-more-btn,
.ios-player-modal .track-drag-handle {
  color: rgba(255, 255, 255, 0.6);
}

/* --------------------------------------------------------------------------
   11. FLOATING ISLAND DOCK & MINI-PLAYER
   -------------------------------------------------------------------------- */
.ios-floating-island-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  /* Высота под полный вид: мини-плеер, зазор и таб-бар над safe-area.
     Сжатый вид стоит в нижнем ряду; верх дока прозрачен для касаний. */
  height: calc(var(--mini-h) + var(--tabbar-h) + 4px + var(--dock-bottom));
  /* Выше подэкранов (800–1200): мини-плеер должен быть виден на любом экране.
     Ниже шторок и тостов (2000+) и текста песни (1500). */
  z-index: 1300;
  pointer-events: none;
  /* Один темп для всех переходов между полным и сжатым видом. */
  --morph-d: var(--dur-move);
  --morph-e: var(--ease-move);
  transition: transform var(--d-mid) var(--ease), opacity var(--d-mid) var(--ease);
}

.ios-floating-island-dock.dock-hidden {
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
}
.ios-floating-island-dock.dock-hidden .island-mini-player {
  pointer-events: none;
}

/* Мини-плеер: капсула; в полном виде над таб-баром, в сжатом — между кружками */
.island-mini-player {
  position: absolute;
  left: var(--page-gutter);
  bottom: calc(var(--dock-bottom) + var(--tabbar-h) + 4px);
  width: calc(100% - var(--page-gutter) - var(--page-gutter));
  height: var(--mini-h);
  pointer-events: auto;
  border-radius: calc(var(--mini-h) / 2);
  background: var(--glass-dock);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  padding: 0 10px 0 12px;
  gap: 10px;
  cursor: pointer;
  overflow: hidden;
  transition: transform var(--d-fast) var(--ease);
}
.island-mini-player.is-pressed {
  scale: 0.985;
}

/* Мягкая подсветка заполняет капсулу слева направо по ходу трека. Едет сама
   через transform (core/progress.js), без перерисовки градиента на каждом кадре. */
.island-mini-player > .mini-progress-fill {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(255, 255, 255, 0.08);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}
.island-mini-player > * {
  position: relative;
  z-index: 1;
}

.mini-art-wrap {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  background: var(--inset);
  border: 1px solid var(--line-soft);
}
.mini-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mini-art-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.mini-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mini-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-artist {
  font-size: 11px;
  /* В доке подписи белые, как иконки (в светлой теме токен тёмный). */
  color: var(--dock-icon);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.mini-ctrl-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Мягкий тон, не чисто белый: кнопки не спорят с названием трека. */
  color: var(--control-soft);
  transition: transform var(--d-fast) var(--ease);
}
.mini-ctrl-btn.is-pressed {
  scale: 0.9;
}
.mini-ctrl-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
/* Таб-бар: стеклянная капсула-фон и четыре кнопки, которые живут прямо в доке.
   У каждой кнопки есть координаты в обоих видах, поэтому переход — это движение. */
.island-main-row {
  transform-origin: top left;
  position: absolute;
  left: var(--page-gutter);
  bottom: var(--dock-bottom);
  width: calc(100% - var(--page-gutter) - var(--page-gutter));
  height: var(--tabbar-h);
  border-radius: calc(var(--tabbar-h) / 2);
  background: var(--glass-dock);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  transition: border-radius var(--morph-d) var(--morph-e), opacity var(--morph-d) var(--morph-e);
}

.island-circle-nav-btn {
  --dock-count: 3;
  position: absolute;
  bottom: calc(var(--dock-bottom) + 5px);
  left: calc(var(--page-gutter) + 5px + (100% - var(--page-gutter) - var(--page-gutter) - 10px) * var(--i) / 3);
  width: calc((100% - var(--page-gutter) - var(--page-gutter) - 10px) / 3);
  height: calc(var(--tabbar-h) - 10px);
  border: 1px solid transparent;
  border-radius: calc(var(--tabbar-h) / 2 - 5px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  pointer-events: auto;
  color: var(--dock-icon);
  font-size: 11px;
  font-weight: 600;
  transition: background-color var(--morph-d) var(--morph-e), color var(--d-fast) var(--ease);
}
.island-circle-nav-btn[data-tab="homeTab"] { --i: 0; }
.island-circle-nav-btn[data-tab="searchTab"] { --i: 2; }
.island-circle-nav-btn[data-tab="libraryTab"] { --i: 1; }
.island-circle-nav-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  flex: 0 0 auto;
  color: var(--dock-icon);
}
.island-circle-nav-btn svg[fill="none"] { fill: none; }
.island-circle-nav-btn.active {
  color: var(--accent);
  background: color-mix(in srgb, var(--text) 14%, transparent);
}
.island-circle-nav-btn.active svg { color: var(--accent); }
.dock-tab-label {
  font-size: 11px;
  font-weight: 600;
  line-height: 14px;
  max-height: 14px;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity var(--morph-d) var(--morph-e);
}

/* Сжатый вид (прокрутка вниз): таб-бар уходит, слева кружок текущего таба,
   справа — поиск, между ними мини-плеер. Переключает island.js (класс dock-compact). */
/* Капсула вкладок сама становится левым кружком: скругление всегда в половину
   высоты, в пикселях — island.js ведёт ширину, высоту и скругление вместе, и в
   каждом кадре это капсула, а не растянутый масштабом овал. */
.ios-floating-island-dock.dock-compact .island-main-row {
  width: var(--mini-h);
  height: var(--mini-h);
  border-radius: calc(var(--mini-h) / 2);
}
.ios-floating-island-dock.dock-compact .island-circle-nav-btn {
  opacity: 0;
  pointer-events: none;
}
.ios-floating-island-dock.dock-compact .island-circle-nav-btn.active:not([data-tab="searchTab"]),
.ios-floating-island-dock.dock-compact:has(.island-circle-nav-btn.active[data-tab="searchTab"]) .island-circle-nav-btn[data-tab="homeTab"] {
  left: var(--page-gutter);
  bottom: var(--dock-bottom);
  width: var(--mini-h);
  height: var(--mini-h);
  border-radius: calc(var(--mini-h) / 2);
  gap: 0;
  opacity: 1;
  pointer-events: auto;
  /* Стекло кружка — сама капсула под кнопкой. */
  background: transparent;
  border-color: transparent;
}
.ios-floating-island-dock.dock-compact .island-circle-nav-btn[data-tab="searchTab"] {
  left: calc(100% - var(--page-gutter) - var(--mini-h));
  bottom: var(--dock-bottom);
  width: var(--mini-h);
  height: var(--mini-h);
  border-radius: calc(var(--mini-h) / 2);
  gap: 0;
  opacity: 1;
  pointer-events: auto;
  background: var(--glass-dock);
  border-color: var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.ios-floating-island-dock.dock-compact .dock-tab-label {
  max-height: 0;
  opacity: 0;
}
.ios-floating-island-dock.dock-compact .island-mini-player {
  left: calc(var(--page-gutter) + var(--mini-h) + 8px);
  width: calc(100% - var(--page-gutter) - var(--page-gutter) - var(--mini-h) - var(--mini-h) - 16px);
  bottom: var(--dock-bottom);
}
.island-mini-player .mini-ctrl-btn {
  overflow: hidden;
  transition: opacity var(--morph-d) var(--morph-e);
}
.ios-floating-island-dock.dock-compact #miniPrevBtn,
.ios-floating-island-dock.dock-compact #miniNextBtn {
  width: 0;
  opacity: 0;
  pointer-events: none;
}
/* --------------------------------------------------------------------------
   12. NOW PLAYING FULLSCREEN PLAYER (как в Apple Music: фон из обложки, только иконки)
   Все правила ниже scoped под .ios-player-modal, чтобы не трогать мини-плеер и списки.
   -------------------------------------------------------------------------- */
.ios-player-modal {
  /* --tint задаёт JS по обложке трека (applyPlayerTint); до ответа — запасной цвет. */
  --tint: 65, 45, 75;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  border-radius: 0;
  background: linear-gradient(180deg,
    color-mix(in srgb, rgb(var(--tint)) 88%, #000) 0%,
    color-mix(in srgb, rgb(var(--tint)) 62%, #000) 50%,
    color-mix(in srgb, rgb(var(--tint)) 46%, #000) 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #ffffff;
  animation: slideUpModal var(--dur-move) var(--ease-move);
}

.ios-main-content.player-expanded {
  transform: scale3d(0.935, 0.935, 1) translateY(6px);
  border-radius: 28px;
  /* Затемнение даёт opacity: filter: brightness() на весь экран перерисовывался
     бы на каждом кадре перехода. */
  opacity: 0.66;
  pointer-events: none;
  will-change: transform, opacity;
}

/* Скругление остаётся на время возврата, иначе углы становятся прямыми в начале анимации. */
.ios-main-content.player-closing {
  border-radius: 28px;
  will-change: transform, opacity;
}

@keyframes slideUpModal {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* Шапка: только маркер для свайпа и подпись источника («Моя волна», «Микс: …»). */
.ios-player-modal .player-modal-nav {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: calc(var(--tg-header-clearance) + 8px) var(--s4) 0;
  position: relative;
  z-index: 3;
  touch-action: none;
}
.ios-player-modal .player-modal-grabber {
  position: absolute;
  top: max(8px, calc(var(--sat) + 6px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 48px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  touch-action: none;
}
.ios-player-modal .player-modal-grabber::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 58px;
  height: 5px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.35);
}
.ios-player-modal .player-modal-grabber:focus-visible,
.ios-lyrics-sheet .lyrics-grabber:focus-visible,
.ios-studio-sheet .sheet-grabber:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
  border-radius: 8px;
}
.ios-player-modal .player-nav-title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}

/* Кнопки избранного и «ещё» — без подложки, только иконки. */
.ios-track-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}
.ios-player-modal .track-circle-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #ffffff;
  padding: 0;
  transition: transform var(--d-fast) var(--ease), color var(--d-fast) var(--ease);
}
.ios-player-modal .track-circle-btn.is-pressed {
  scale: 0.88;
}
.ios-player-modal .track-circle-btn svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}
.ios-player-modal #trackMoreBtn svg {
  fill: currentColor;
  stroke: none;
}
.ios-player-modal .track-circle-btn.favorited {
  color: var(--heart-color);
}
.ios-player-modal .track-circle-btn.favorited svg {
  fill: currentColor;
}

.ios-player-modal .player-modal-scroll-body {
  /* Тело заходит на 56px в шапку: зона затухания начинается у кнопок и идёт мягче.
     Верхний падинг на те же 56px компенсирует смещение, обложка остаётся на месте. */
  --scroll-mask-top: 112px;
  flex: 1 1 auto;
  min-height: 0;
  margin-top: -56px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 84px var(--s5) calc(var(--s3) + var(--sab));
  display: flex;
  flex-direction: column;
}

/* Обложка почти во всю ширину, как в Apple Music. */
.ios-player-modal .ios-art-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 0 var(--s3);
}
.ios-player-modal .ios-art-card {
  position: relative;
  z-index: 1;
  /* Ширина как у строки с названием: от левого до правого края содержимого. */
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
  /* Тень короткая: не должна ложиться на строку с названием. */
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
  transition: transform var(--dur-page) var(--spring);
}
/* Ширина обложки должна совпадать с названием, поэтому пульс при игре здесь выключен. */
.ios-player-modal .ios-art-card.is-playing {
  transform: none;
}
.ios-player-modal .ios-art-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* На время перехода картинка — квадрат по большей стороне карточки, по центру:
   пропорции ей возвращает обратный масштаб из playerArtworkImageFrames (app.js). */
.ios-player-modal.player-morphing .ios-art-card img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--art-morph-side);
  height: var(--art-morph-side);
  max-width: none;
}

/* Название и исполнитель слева, избранное и «ещё» справа в той же строке. */
.ios-player-modal .ios-track-meta {
  /* Строка выше обложки в стеке: её тень не перекрывает название. */
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: var(--s5);
}
.ios-player-modal .ios-track-text {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}
/* Название прижато влево; индикатор «играет» — сразу за ним, не по центру. */
.ios-player-modal .ios-track-title-wrap {
  justify-content: flex-start;
  min-width: 0;
}
.ios-player-modal .ios-track-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ios-player-modal .ios-track-artist {
  font-size: 17px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ios-player-modal .ios-track-artist svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  transform: translateY(1px);
}

/* Таймлайн: тонкая полоса, ползунок виден только при касании. */
:is(.ios-player-modal, .lyrics-player-controls) .ios-scrubber-section {
  margin-bottom: var(--s2);
}
:is(.ios-player-modal, .lyrics-player-controls) .ios-slider-track {
  position: relative;
  height: 6px;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 3px;
  cursor: pointer;
  touch-action: none;
}
/* Невидимая зона касания: сама полоса 6px, попасть в неё пальцем нереально. */
:is(.ios-player-modal, .lyrics-player-controls) .ios-slider-track::after {
  content: "";
  position: absolute;
  inset: -18px -8px;
}
/* Клип держит скругление, пока заливку двигает transform, а не ширина. */
:is(.ios-player-modal, .lyrics-player-controls) .ios-slider-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 3px;
  pointer-events: none;
}
/* Сколько трека уже загружено: вторая, более бледная заливка под прогрессом. */
:is(.ios-player-modal, .lyrics-player-controls) .ios-slider-buffer {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: rgba(255, 255, 255, 0.2);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--dur-page) var(--ease);
  will-change: transform;
}
:is(.ios-player-modal, .lyrics-player-controls) .ios-slider-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: color-mix(in srgb, rgb(var(--tint)) 60%, #ffffff);
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}
:is(.ios-player-modal, .lyrics-player-controls) .ios-time-row {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  font-variant-numeric: tabular-nums;
}

/* Управление: крупные prev/play/next, по бокам перемешивание и повтор. */
:is(.ios-player-modal, .lyrics-player-controls) .ios-controls-cluster {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--s1);
  margin: var(--s1) 0 var(--s2);
}
:is(.ios-player-modal, .lyrics-player-controls) .ios-icon-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  position: relative;
  transition: transform var(--d-fast) var(--ease), color var(--d-fast) var(--ease);
}
:is(.ios-player-modal, .lyrics-player-controls) .ios-icon-btn svg {
  width: 24px;
  height: 24px;
}
:is(.ios-player-modal, .lyrics-player-controls) .ios-icon-btn.ctrl-prev,
:is(.ios-player-modal, .lyrics-player-controls) .ios-icon-btn.ctrl-next {
  width: 54px;
  height: 54px;
  color: rgba(255, 255, 255, 0.84);
}
:is(.ios-player-modal, .lyrics-player-controls) .ios-icon-btn.ctrl-prev svg,
:is(.ios-player-modal, .lyrics-player-controls) .ios-icon-btn.ctrl-next svg {
  width: 34px;
  height: 34px;
}
:is(.ios-player-modal, .lyrics-player-controls) .ios-icon-btn.is-pressed {
  scale: 0.88;
}
/* Включённый режим — белым, с точкой под иконкой (цвет не единственный признак). */
:is(.ios-player-modal, .lyrics-player-controls) .ios-icon-btn.active {
  color: #ffffff;
}
:is(.ios-player-modal, .lyrics-player-controls) .ios-icon-btn.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  translate: -50% 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffffff;
}

.repeat-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 11px;
  font-weight: 800;
  background: #ffffff;
  color: #000000;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  display: none;
  align-items: center;
  justify-content: center;
}
.ctrl-repeat.is-one .repeat-badge {
  display: flex;
}

:is(.ios-player-modal, .lyrics-player-controls) .ios-play-hero {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: none;
  /* Мягче чисто белого — как в Apple Music: главная кнопка светлая, но не режет. */
  color: rgba(255, 255, 255, 0.84);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--d-fast) var(--spring);
}
:is(.ios-player-modal, .lyrics-player-controls) .ios-play-hero.is-pressed {
  scale: 0.92;
}
:is(.ios-player-modal, .lyrics-player-controls) .ios-play-hero svg {
  width: 56px;
  height: 56px;
  fill: currentColor;
}
:is(.ios-player-modal, .lyrics-player-controls) #playIcon {
  margin-left: 4px;
}

/* Громкость: тонкая полоса без ползунка, по бокам динамики. */
:is(.ios-player-modal, .lyrics-player-controls) .ios-modal-volume-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  margin-bottom: var(--s2);
}
:is(.ios-player-modal, .lyrics-player-controls) .vol-icon,
:is(.ios-player-modal, .lyrics-player-controls) .vol-icon-btn {
  color: rgba(255, 255, 255, 0.7);
}
:is(.ios-player-modal, .lyrics-player-controls) .vol-icon-btn svg,
:is(.ios-player-modal, .lyrics-player-controls) .vol-icon {
  width: 18px;
  height: 18px;
}
:is(.ios-player-modal, .lyrics-player-controls) .vol-slider-wrap {
  flex: 1;
  display: flex;
  align-items: center;
}
:is(.ios-player-modal, .lyrics-player-controls) #volumeSlider {
  width: 100%;
  height: 24px;
  -webkit-appearance: none;
  background: transparent;
  outline: none;
}
:is(.ios-player-modal, .lyrics-player-controls) #volumeSlider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right,
    color-mix(in srgb, rgb(var(--tint)) 60%, #ffffff) var(--vol-fill, 100%),
    rgba(255, 255, 255, 0.28) var(--vol-fill, 100%));
}
/* Ползунок прозрачный: тянуть за полосу можно, а видна только заливка. */
:is(.ios-player-modal, .lyrics-player-controls) #volumeSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -9px;
  background: transparent;
  cursor: pointer;
}

/* Нижний ряд: четыре иконки без подписей. */
:is(.ios-player-modal, .lyrics-player-controls) .ios-player-bottom-dock {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s2);
  margin-top: auto;
}
:is(.ios-player-modal, .lyrics-player-controls) .player-dock-cell {
  background: none;
  border: none;
  padding: 2px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: rgba(255, 255, 255, 0.8);
  transition: color var(--d-fast) var(--ease), transform var(--d-fast) var(--ease);
}
:is(.ios-player-modal, .lyrics-player-controls) .player-dock-cell.is-pressed {
  scale: 0.88;
}
:is(.ios-player-modal, .lyrics-player-controls) .player-dock-cell svg {
  width: 24px;
  height: 24px;
}
/* Подписи убраны: смысл иконок очевиден, названия остаются в title и aria-label. */
:is(.ios-player-modal, .lyrics-player-controls) .player-dock-cell .dock-label {
  display: none;
}
:is(.ios-player-modal, .lyrics-player-controls) .player-dock-cell.active,
:is(.ios-player-modal, .lyrics-player-controls) .player-dock-cell.eq-active {
  color: #ffffff;
}
/* Точки-индикатора «эквалайзер включён» нет: владелец её убрал. */

.ios-player-modal .player-queue-title {
  color: #ffffff;
}

/* Embedded Queue in Player */
.player-queue-container {
  margin-top: 60px;
  padding-top: var(--s4);
  border-top: 1px solid var(--line-soft);
}
.player-queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s3);
}
.player-queue-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

/* --------------------------------------------------------------------------
   13. Action Sheet & Bottom Modals
   -------------------------------------------------------------------------- */
.ios-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 var(--s3) calc(var(--s3) + var(--sab));
  animation: fadeInBackdrop var(--dur-move) var(--ease-move);
}
@keyframes fadeInBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ios-action-sheet-card {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  box-sizing: border-box;
  background: var(--glass-dock);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 0 10px 10px;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  animation: slideUpSheet var(--dur-move) var(--ease-move);
}
@keyframes slideUpSheet {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.sheet-grabber {
  width: 44px;
  height: 5px;
  border-radius: 3px;
  background: var(--text-muted);
  opacity: .55;
  margin: 10px auto 6px;
}

.action-sheet-track-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 12px;
  box-sizing: border-box;
}

.sheet-track-thumb {
  width: 46px !important;
  height: 46px !important;
  min-width: 46px;
  min-height: 46px;
  max-width: 46px;
  max-height: 46px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--inset);
  flex-shrink: 0;
}

.sheet-track-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.sheet-track-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet-track-artist {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet-close-btn {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  margin-left: auto;
  border: 0;
  border-radius: 50%;
  background: var(--bg-surface-raised);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--d-fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.sheet-close-btn svg { width: 15px; height: 15px; }
.sheet-close-btn.is-pressed { background: var(--bg-card-hover); }

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

.sheet-action-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  padding: 15px 16px;
  background: var(--bg-surface-raised);
  border: 0;
  border-radius: 16px;
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.015em;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background var(--d-fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

.sheet-action-row.is-pressed {
  scale: 0.985;
}

.sheet-action-row svg {
  width: 22px;
  height: 22px;
  color: var(--text);
  flex-shrink: 0;
}

.sheet-action-row span {
  flex: 1;
  min-width: 0;
}

.sheet-action-row svg.sheet-row-chevron {
  width: 9px;
  height: 15px;
  color: var(--text-secondary);
  margin-left: auto;
}

.sheet-action-row.sheet-action-danger,
.sheet-action-row.sheet-action-danger svg {
  color: #ff453a;
}

/* Выбор исполнителя у совместной записи («Mav-d & Bufo»): круглое фото вместо значка. Плоское, без рамки и
   тени (DESIGN.md: аватар — круг); цвета и стекло у шторки и кусочка, не у фото. */
.sheet-action-row .menu-person-avatar {
  display: block;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--inset);
}
#menuSheet.is-popover .sheet-action-row .menu-person-avatar {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
}

/* Закрытие — крестик в шапке, тап мимо и свайп вниз; отдельная кнопка не нужна. */
.sheet-cancel-btn {
  display: none;
}

/* Информация об артисте — окно у кнопки «i» (openMenuSheet + core/popover.js):
   один кусочек стекла, как у меню ⋮; жидкая капля растёт из самой кнопки.
   Своего стекла здесь нет — только вёрстка внутри .glass-group.
   Длительностей и кривых нет совсем: движение целиком у NMPopover/NMLiquidPop. */
#menuSheet.is-popover:has(.glass-group.artist-info) > #menuSheetCard {
  width: min(320px, calc(100vw - 12px));
}
.artist-info { gap: 0; color: var(--text); }
.artist-info .ai-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px 14px; }
.artist-info .ai-photo {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--accent-soft);
}
.artist-info .ai-photo:not([src]), .artist-info .ai-photo[src=""] { display: none; }
.artist-info .ai-title { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.artist-info .ai-genre {
  font-size: 12px;
  line-height: 1.2;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.artist-info .ai-name {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.artist-info .ai-bio {
  margin: 0;
  padding: 0 18px 16px;
  font-size: 14px;
  line-height: 1.45;
  color: color-mix(in srgb, var(--text) 86%, transparent);
}
.artist-info .ai-facts {
  display: flex;
  border-top: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
}
.artist-info .ai-fact {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 2px;
  min-width: 0;
  padding: 12px 14px 14px;
}
.artist-info .ai-fact + .ai-fact { border-left: 1px solid color-mix(in srgb, var(--text) 14%, transparent); }
.artist-info .ai-fact b { font-size: 19px; white-space: nowrap; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.artist-info .ai-fact span { font-size: 11px; line-height: 1.25; color: var(--text-muted); }
.artist-info .ai-head:last-child { padding-bottom: 16px; }

/* --------------------------------------------------------------------------
   Music Wrapped — экран «Итоги года»: баннер, сводка и кнопка «Поделиться».
   -------------------------------------------------------------------------- */
.wrapped-top-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: calc(var(--tg-header-clearance) + 6px);
  background: transparent;
}
.wrapped-top-nav.is-scrolled { background: var(--scroll-header-fade); }
.wrapped-top-nav .subview-nav-title {
  font-size: var(--title-size-hero);
  font-weight: 700;
  letter-spacing: var(--title-track-hero);
  line-height: var(--title-line-hero);
  text-align: left;
}

/* Баннер: фото заката над городом, поверх — бренд и крупный заголовок.
   Без фото (ошибка загрузки) остаётся тёплый градиент подложки. */
.wrapped-banner {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 1.12;
  margin: 4px 0 18px;
  background: linear-gradient(160deg, #341c3a 0%, #7a3450 46%, #d97a55 82%, #e99b82 100%);
  isolation: isolate;
}
.wrapped-banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Лёгкое затемнение сверху и снизу — текст читается на любом фото. */
.wrapped-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 6, 14, 0.34) 0%, rgba(10, 6, 14, 0) 30%, rgba(10, 6, 14, 0) 52%, rgba(10, 6, 14, 0.5) 100%);
  pointer-events: none;
}
.wrapped-banner-brand {
  position: absolute;
  top: 16px;
  left: 18px;
  z-index: 1;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}
.wrapped-banner-title {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 1;
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

/* Сводка переиспользует карточку статистики; отступы под баннер и кнопку. */
.wrapped-summary-card { margin: 0 0 22px; }
.wrapped-artist-art {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 12px;
  object-fit: cover;
  background: var(--bg-card-hover);
}

/* «Поделиться итогами» — персиковая пилюля на всю ширину, как в макете. */
.wrapped-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  padding: 16px;
  border: 0;
  border-radius: 999px;
  background: var(--accent-fill);
  color: #2a1408;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--d-fast) var(--ease), filter var(--d-fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.wrapped-share-btn.is-pressed {
  scale: 0.98;
  filter: brightness(0.94);
}
.wrapped-share-btn svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

/* Studio Equalizer Sheet */
.ios-studio-sheet {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--glass-dock);
  backdrop-filter: var(--glass-blur);
  padding: calc(var(--tg-header-clearance) + var(--s3)) var(--s4) calc(var(--sab) + var(--s4));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  animation: slideUpModal var(--dur-move) var(--ease-move);
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sheet-title-row {
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.sheet-title-row h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.sheet-sub {
  font-size: 12px;
  color: var(--text-muted);
}
.eq-header-right-cluster {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

/* iOS Switch */
.ios-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
}
.ios-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.ios-switch .switch-track {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  transition: background-color var(--dur-micro) var(--ease);
}
.ios-switch .switch-thumb {
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform var(--dur-micro) var(--ease-micro);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.ios-switch input:checked + .switch-track {
  background: var(--accent-fill);
}
.ios-switch input:checked + .switch-track .switch-thumb {
  transform: translateX(20px);
}

/* Equalizer Cards */
.eq-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s3);
}
.eq-glass-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-shelf);
  padding: var(--s3) var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.eq-card-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.eq-slider {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 2px;
  outline: none;
}
.eq-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
}

/* Segmented Control */
.ios-segmented-control {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: var(--inset);
  border-radius: 12px;
  padding: 3px;
}
.seg-btn {
  padding: 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  border-radius: 9px;
  color: var(--text-secondary);
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.seg-btn.active {
  background: var(--bg-surface);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Frequency Bands */
.eq-bands-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s2);
}
.simple-band-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-shelf);
  padding: var(--s3);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.band-name {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}
.band-val-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}
.band-range {
  font-size: 11px;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   15. Utilities & Gesture Dismiss Transitions
   -------------------------------------------------------------------------- */
.sheet-dismissing {
  transition: transform var(--dur-move) var(--ease-move) !important;
  transform: translateY(100%) !important;
}
/* Пока карточка уезжает, её затемнение светлеет тем же темпом — а не гаснет
   разом в конце, когда окно прячут. */
:is(.custom-popover-backdrop):has(.sheet-dismissing) {
  opacity: 0;
  animation: none;
  transition: opacity var(--dur-move) var(--ease-move);
}

/* --------------------------------------------------------------------------
   16. Artist Page Full Screen View (.ios-artist-page)
   -------------------------------------------------------------------------- */
.ios-artist-page {
  position: absolute;
  inset: 0;
  z-index: 1200;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.artist-nav-bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--tg-header-clearance) + 8px) var(--s4) 8px;
  pointer-events: none;
}
.artist-nav-circle-btn,
.artist-nav-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: var(--glass-blur-control);
  -webkit-backdrop-filter: var(--glass-blur-control);
  border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: auto;
  transition: transform var(--d-fast) var(--ease), background var(--d-fast) var(--ease);
}
.artist-nav-circle-btn.is-pressed,
.artist-nav-action-btn.is-pressed {
  scale: 0.9;
  background: rgba(0, 0, 0, 0.6);
}
.artist-nav-circle-btn svg,
.artist-nav-action-btn svg {
  width: 20px;
  height: 20px;
}
.artist-nav-circle-btn svg:not([fill="none"]),
.artist-nav-action-btn svg:not([fill="none"]) {
  fill: currentColor;
}
.artist-nav-actions {
  display: flex;
  align-items: center;
  pointer-events: auto;
}
.artist-nav-capsule {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: var(--glass-blur-control);
  -webkit-backdrop-filter: var(--glass-blur-control);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.artist-nav-capsule .artist-nav-action-btn {
  background: transparent;
  border: none;
  /* Стекло уже у капсулы: стекло в стекле ничего не добавляет. */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.artist-nav-divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.2);
}

.artist-body-container {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 var(--page-gutter) calc(var(--tabbar-h) + var(--mini-h) + var(--sab) + var(--s6));
}

.artist-header-stage {
  position: relative;
  margin: 0 calc(var(--s4) * -1) var(--s4);
  overflow: hidden;
}
.artist-header-img-wrap {
  width: 100%;
  height: 260px;
  background: var(--inset);
  position: relative;
}
.artist-header-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}
.artist-header-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(9, 11, 16, 0.45) 50%, var(--bg) 100%);
}
.artist-header-content {
  position: absolute;
  left: var(--s4);
  right: var(--s4);
  bottom: var(--s4);
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.artist-header-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}
.artist-actions-cluster {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-top: 4px;
}
.artist-hero-play-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: var(--accent-on);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  transition: transform var(--d-fast) var(--ease);
}
.artist-hero-play-btn.is-pressed {
  scale: 0.92;
}
.artist-hero-play-btn svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
  margin-left: 2px;
}
.artist-action-pill-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--d-fast) var(--ease);
}
.artist-action-pill-btn.is-pressed {
  scale: 0.9;
}
.artist-action-pill-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.artist-action-pill-btn.favorited {
  color: var(--heart-color);
  background: rgba(244, 63, 94, 0.25);
  border-color: rgba(244, 63, 94, 0.4);
}

.artist-featured-wrapper {
  margin: var(--s4) 0;
}
.artist-release-card {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3);
  border-radius: var(--r-card);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}
.release-art {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--inset);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.release-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.release-meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.release-date {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
}
.release-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.release-type-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.release-type {
  font-size: 12px;
  color: var(--text-secondary);
}
.release-add-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: var(--accent-soft);
  border: none;
  flex-shrink: 0;
  transition: transform var(--d-fast) var(--ease);
}
.release-add-btn.is-pressed {
  scale: 0.9;
}

.artist-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: var(--s4) 0 var(--s2);
}
.artist-section-header .section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 4px;
}
.artist-songs-list {
  display: flex;
  flex-direction: column;
}
.artist-albums-carousel {
  display: flex;
  gap: var(--s3);
  overflow-x: auto;
  padding-bottom: var(--s3);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.artist-albums-carousel::-webkit-scrollbar {
  display: none;
}

.artist-album-card {
  flex: 0 0 116px;
  width: 116px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: transform var(--d-fast) var(--ease);
}
.artist-album-card.is-pressed {
  scale: 0.97;
}
.artist-album-card img,
.artist-album-skeleton-cover {
  width: 116px;
  height: 116px;
  border-radius: var(--r-shelf);
  object-fit: cover;
  background: var(--inset);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--line-soft);
  display: block;
}
.artist-album-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.artist-album-year {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.2;
}
/* Последняя карточка карусели: «Ещё» открывает следующие релизы. Плоская плитка того же размера, что обложка. */
.artist-album-more-tile {
  width: 116px;
  height: 116px;
  border-radius: var(--r-shelf);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  background: var(--inset);
  border: 1px solid var(--line-soft);
}

/* --------------------------------------------------------------------------
   17. Empty & Loading States
   -------------------------------------------------------------------------- */
.ios-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px var(--s4);
  text-align: center;
  color: var(--text-muted);
}
.ios-empty-state p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}
.ios-player-modal .player-queue-list .ios-empty-state p {
  color: #ffffff;
}
.empty-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 8px;
  color: var(--text-muted);
  opacity: 0.6;
}
.empty-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}
.empty-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   18. Synced Lyrics Modal Sheet
   -------------------------------------------------------------------------- */
.ios-lyrics-sheet {
  --tint: 65, 45, 75;
  position: absolute;
  inset: 0;
  z-index: 1500;
  background: #000;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUpModal var(--dur-move) var(--ease-move);
}
/* Фон: обложка, размытая и тонированная цветом трека (как в Apple Music). */
.lyrics-backdrop {
  position: absolute;
  inset: -40px;
  background-size: cover;
  background-position: center;
  filter: blur(40px) saturate(170%);
  transform: scale(1.1);
  z-index: 0;
}
.lyrics-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(var(--tint), 0.5) 0%, rgba(0, 0, 0, 0.5) 100%);
}
.lyrics-top {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  padding: calc(var(--tg-header-clearance) + 42px) var(--s4) var(--s3);
  touch-action: none;
}
/* Маркер сверху: за него и тянут, чтобы закрыть. */
.lyrics-grabber {
  position: absolute;
  top: max(8px, calc(var(--sat) + 6px));
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  touch-action: none;
}
.lyrics-grabber::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 58px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.35);
}
.lyrics-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lyrics-head-art {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.25);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}
.lyrics-head-meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lyrics-head-title {
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lyrics-head-artist {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lyrics-head-btn {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  color: #ffffff;
  transition: transform var(--d-fast) var(--ease), color var(--d-fast) var(--ease);
}
.lyrics-head-btn.is-pressed {
  scale: 0.88;
}
.lyrics-head-btn svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}
#lyricsMoreBtn svg {
  fill: currentColor;
  stroke: none;
}
#lyricsStarBtn.favorited {
  color: var(--heart-color);
}
#lyricsStarBtn.favorited svg {
  fill: currentColor;
}
.sheet-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sheet-meta h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.sheet-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}
.sheet-close-btn svg {
  width: 14px;
  height: 14px;
}
.sheet-lyrics-body {
  --scroll-mask-top: 56px;
  --scroll-mask-bottom: 96px;
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  /* Низ с запасом: последняя строка тоже может встать по центру экрана. */
  padding: 32px var(--s5) 55vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.lyrics-line {
  font-size: 27px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: rgba(255, 255, 255, 0.34);
  cursor: pointer;
  transition: color var(--dur-short) var(--ease), opacity var(--dur-short) var(--ease);
}
.lyrics-line.active {
  color: #ffffff;
}
.lyrics-line.is-pressed {
  opacity: 0.85;
}
:where(.is-pressed[data-press="highlight"].lyrics-line) {
  scale: none;
  background-color: transparent !important;
}
/* Текст без таймкодов: подсветки нет, весь текст читается целиком. */
.sheet-lyrics-body.is-plain .lyrics-line {
  font-size: 24px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  cursor: default;
}
.sheet-lyrics-body.is-plain .lyrics-line.is-pressed {
  opacity: 1;
}
.lyrics-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: var(--text-muted);
  gap: 8px;
}

/* Текст, распознанный по звуку, а не взятый из каталога: честная пометка в конце. */
#lyricsContent[data-source="asr"]::after {
  content: "Текст распознан автоматически, возможны ошибки";
  display: block;
  padding: var(--s4, 16px) 0 var(--s2, 8px);
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   19. Custom Playlist Picker Popover Modal
   -------------------------------------------------------------------------- */
.custom-popover-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2100;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 var(--s3) calc(var(--s3) + var(--sab));
  animation: fadeInBackdrop var(--dur-move) var(--ease-move);
}
.custom-popover-card {
  width: 100%;
  max-width: 414px;
  background: var(--glass-dock);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  animation: slideUpSheet var(--dur-move) var(--ease-move);
}
.custom-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--s4);
  border-bottom: 1px solid var(--line-soft);
}
.custom-popover-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.custom-popover-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.custom-popover-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px var(--s4);
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  transition: background var(--d-fast) var(--ease);
}
.custom-popover-item:last-child {
  border-bottom: none;
}
.custom-popover-item.is-pressed {
  scale: 0.985;
}
.custom-popover-item-left {
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.custom-popover-check {
  width: 18px;
  height: 18px;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.custom-popover-item.active .custom-popover-check {
  display: flex;
}
.custom-popover-icon {
  font-size: 16px;
}
.custom-popover-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
}
.custom-popover-count {
  font-size: 12px;
  color: var(--text-muted);
}
.custom-popover-item-right {
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.popover-del-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color var(--d-fast) var(--ease), background var(--d-fast) var(--ease);
}
.popover-del-btn:hover,
.popover-del-btn.is-pressed {
  color: #ff453a;
  background: rgba(255, 69, 58, 0.12);
}

/* --------------------------------------------------------------------------
   20. Playlist Filter Chips & Badges
   -------------------------------------------------------------------------- */
.playlist-chips-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 var(--s3);
  scrollbar-width: none;
}
.playlist-chips-scroll::-webkit-scrollbar { display: none; }

.playlist-chip {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.playlist-chip.active {
  background: var(--accent-soft);
  border-color: rgba(var(--accent-rgb), 0.4);
  color: var(--accent);
}
.playlist-chip.is-pressed {
  scale: 0.96;
}
.chip-count {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.8;
}

.ios-explicit-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  background: var(--inset);
  padding: 1px 4px;
  border-radius: 3px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.sync-connect-error {
  font-size: 12px;
  color: var(--heart-color);
  min-height: 16px;
  margin: 0;
}

/* ==========================================================================
   Слой интеракций: длительности, отклик нажатия, смахивание строк.
   Лежит в конце файла, чтобы перекрывать прежние значения.
   ========================================================================== */

/* Переходы были 0.15s и 0.25s: на глаз они читались как рывок. Пружинные
   кривые оставляем, меняем только длительности. */
:root {
  --d-fast: 0.22s;
  --d-mid: 0.34s;
  --d-slow: 0.5s;
}

/* Строки смахиваются влево: вертикальный скролл остаётся у браузера. */
.ios-track-item {
  touch-action: pan-y;
}

.swipe-row {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin-bottom: 6px;
  border-radius: var(--r-detail);
}

/* Подпись действия под строкой. Видна только пока идёт жест: в покое строка
   может быть полупрозрачной (активный трек), и красный просвечивал бы сквозь неё. */
.swipe-row-action {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 22px;
  background: #ff453a;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  opacity: 0;
  transition: opacity var(--d-fast) var(--ease);
}

.swipe-row.swipe-active > .swipe-row-action {
  opacity: 1;
}

.swipe-row > .ios-track-item {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
  will-change: transform;
}

.swipe-row.swipe-settling > .ios-track-item {
  transition: transform var(--d-mid) var(--spring-card);
}

@media (prefers-reduced-motion: reduce) {
  .swipe-row.swipe-settling > .ios-track-item {
    transition: none;
  }
}

/* Переход между вкладками — core/nav.js (slideTabs): уходящая вкладка на время
   смены вынута из потока, стоит там, где была на экране, и уезжает ПОД
   новой, как непрозрачная шторка. Новая под ней уже целиком готова: её стекло
   не мигает, потому что прозрачность анимируется только у уходящей. */
.nav-tab-leaving {
  display: block !important;
  position: fixed;
  z-index: 2;
  background: var(--bg);
  pointer-events: none;
}
.tab-pane.nav-tab-entering {
  position: relative;
  z-index: 1;
  min-height: 100%;
}
/* Смена вкладки сдвигом: сверху та, что правее; у неё непрозрачный фон и
   тень по левому краю, как у страницы поверх стека. */
.nav-tab-entering.nav-tab-over,
.nav-tab-leaving.nav-tab-over {
  z-index: 3 !important;
  background: var(--bg);
  box-shadow: -10px 0 28px rgba(0, 0, 0, 0.28);
}
:is(#homeTab, #libraryTab, #searchTab).nav-tab-leaving,
:is(#homeTab, #libraryTab, #searchTab).nav-tab-entering.nav-tab-over,
:is(#homeTab, #libraryTab, #searchTab).nav-tab-leaving.nav-tab-over {
  background: transparent;
}
:is(#homeTab, #libraryTab, #searchTab).nav-tab-entering.nav-tab-over,
:is(#homeTab, #libraryTab, #searchTab).nav-tab-leaving.nav-tab-over { background: transparent; box-shadow: none; }

/* Окно очереди: кнопки подгрузки соседних строк. */
.queue-more-btn {
  display: block;
  width: 100%;
  margin: 8px 0;
  padding: 12px 16px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-secondary, rgba(255, 255, 255, 0.7));
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* У строки плейлиста высота задана жёстко: 42px обложка + 16px отступов + 2px
   рамка. Раньше строки вне экрана резервировали 80px (62px размера содержимого
   плюс отступы и рамка), а при прокрутке сжимались до настоящих 60px. Список
   прыгал на 20px на каждую строку, пока шла прокрутка и подгрузка страниц; на
   iPhone с плейлистом в тысячи треков это, вероятно, и вешало приложение.
   Страницы по 200 строк и так лёгкие, поэтому content-visibility не нужен. */
#trackList .ios-track-item {
  height: 60px;
  box-sizing: border-box;
}

/* Обложка под пальцем: без сглаживания, иначе она отстаёт от касания. */
.ios-art-card.art-swiping {
  transition: none;
  will-change: transform;
}

/* Индикатор буферизации в кнопке воспроизведения. Раньше CSS не было вовсе:
   на время загрузки значок прятался, а вместо него оставался пустой круг. */
.btn-spinner {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid currentColor;
  border-right-color: transparent;
  opacity: 0.85;
  animation: btnSpin var(--dur-spin) var(--ease-linear) infinite;
}
.btn-spinner-sm {
  width: 18px;
  height: 18px;
  border-width: 2.5px;
}
.btn-spinner.hidden { display: none; }
@keyframes btnSpin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Эквалайзер (шторка). Разметка в index.html давно ушла вперёд от стилей:
   классов .studio-sheet-body, .eq-fader, .ios-switch-slider и других в CSS не
   было, и шторка выглядела как страница без стилей.
   ========================================================================== */
.ios-studio-sheet {
  padding: 0;
  gap: 0;
  overflow: hidden;
  background: var(--bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.ios-studio-sheet .sheet-grabber {
  flex: 0 0 auto;
  margin: calc(var(--tg-header-clearance) + 8px) auto 6px;
}
.ios-studio-sheet .sheet-header {
  flex: 0 0 auto;
  gap: var(--s3);
  padding: var(--s2) var(--s4) var(--s3);
  border-bottom: 1px solid var(--line-soft);
}
.ios-studio-sheet .sheet-meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sheet-title-icon { color: var(--accent); width: 22px; height: 22px; flex: 0 0 auto; }
.sheet-close-circle-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-surface-raised);
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.sheet-close-circle-btn svg { width: 14px; height: 14px; }
.eq-master-toggle-wrap { display: flex; align-items: center; gap: var(--s2); }
.eq-toggle-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.eq-toggle-label.active { color: var(--accent); }

.studio-sheet-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: var(--s4) var(--s4) calc(var(--s6) + var(--sab));
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

/* Переключатели */
.ios-switch,
.ios-switch-sm { position: relative; display: inline-block; flex: 0 0 auto; }
.ios-switch { width: 50px; height: 30px; }
.ios-switch-sm { width: 42px; height: 26px; }
.ios-switch input,
.ios-switch-sm input {
  touch-action: pan-y;   /* влево-вправо — ведение переключателя, вверх-вниз — прокрутка */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.ios-switch-slider {
  position: absolute;
  inset: 0;
  border-radius: var(--r-pill);
  background: var(--bg-card-active);
  transition: background var(--d-mid) var(--ease);
  pointer-events: none;
}
.ios-switch-slider::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: transform var(--d-mid) var(--ease-out);
}
.ios-switch-sm .ios-switch-slider::before { width: 22px; height: 22px; }
.ios-switch input:checked + .ios-switch-slider,
.ios-switch-sm input:checked + .ios-switch-slider { background: var(--accent); }
.ios-switch input:checked + .ios-switch-slider::before { transform: translateX(20px); }
.ios-switch-sm input:checked + .ios-switch-slider::before { transform: translateX(16px); }

/* Стеклянный переключатель (core/glassctl.js, 16.11, как iOS 26 / Aave):
   пока палец держит ручку, она — прозрачная линза над копией дорожки.
   Размеры линзы и ход считает скрипт (--ctl-*), силу изгиба — его фильтр.
   Правило владельца: тонкая полоса под линзой толстеет, толстая — тоньшает.
   --ctl-k — во сколько раз линза меняет то, что под ней: у переключателя
   (толстая дорожка) меньше 1, у ползунков (тонкая) больше 1. У переключателя
   тоньшает только толщина (--ctl-kx = 1): если уменьшить и длину, в линзе
   виден весь переключатель-малютка, а не полоса, идущая сквозь неё. */
:root.glass-ctl[data-glass="full"] :is(.ios-switch, .ios-switch-sm) { --ctl-x: 0px; --ctl-k: 0.6; }
/* Положение линзы (--ctl-x) и её набухание (--ctl-gx/--ctl-gy) ведут пружины
   core/glassctl.js, а не переходы: CSS-переход на каждом кадре начинался бы заново. */
/* Под уменьшающей линзой настоящую дорожку не видно: пока держат, в ней
   вырезана дырка формы линзы (маска с исключением). Линза — сосед дорожки,
   маска её не режет. */
:root.glass-ctl[data-glass="full"] :is(.ios-switch, .ios-switch-sm) :is(input.is-pressed + .ios-switch-slider, .sw-hold > .ios-switch-slider)[data-glass-ctl] {
  -webkit-mask: var(--ctl-hole) no-repeat calc(var(--ctl-l) + var(--ctl-x)) calc(var(--ctl-t) + var(--ctl-y, 0px)) / var(--ctl-lw) var(--ctl-lh), linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: var(--ctl-hole) no-repeat calc(var(--ctl-l) + var(--ctl-x)) calc(var(--ctl-t) + var(--ctl-y, 0px)) / var(--ctl-lw) var(--ctl-lh) exclude, linear-gradient(#000 0 0);
}
.glass-ctl-lens,
.glass-ctl-rim { display: none; }
:root.glass-ctl[data-glass="full"] :is(.glass-ctl-lens, .glass-ctl-rim) {
  display: block;
  position: absolute;
  left: var(--ctl-l);
  top: var(--ctl-t);
  width: var(--ctl-lw);
  height: var(--ctl-lh);
  border-radius: var(--r-pill);
  transform: translateX(var(--ctl-x));
  translate: 0 var(--ctl-y, 0px);
  scale: var(--ctl-gx, 0.72) var(--ctl-gy, 0.72);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--d-fast) var(--ease);
}
.glass-ctl-lens { overflow: hidden; background-color: rgba(255, 255, 255, 0.06); }
.glass-ctl-bend { position: absolute; inset: 0; }
.glass-ctl-copy {
  position: absolute;
  left: calc(-1 * var(--ctl-l));
  top: calc(-1 * var(--ctl-t));
  width: var(--ctl-w);
  height: var(--ctl-h);
  border-radius: var(--r-pill);
  background: var(--ctl-track, transparent);
  /* Уменьшение — вокруг середины линзы; середина едет вместе с ней тем же
     токеном, поэтому не уплывает в ходе. */
  transform: translate(calc(-1 * var(--ctl-x)), calc(-1 * var(--ctl-y, 0px))) scale(var(--ctl-kx, 1), var(--ctl-k, 1));
  transform-origin: calc(var(--ctl-l) + var(--ctl-x) + var(--ctl-lw) / 2) calc(var(--ctl-t) + var(--ctl-lh) / 2);
  transition: background var(--d-mid) var(--ease);   /* дорожка меняет цвет на середине хода */
}
/* Кромка без фильтра: блик сверху, отсвет снизу, мягкая тень наружу. */
.glass-ctl-rim {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 55%);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.18),
    0 8px 18px rgba(0, 0, 0, 0.12),
    inset 0 1px 0.5px rgba(255, 255, 255, 0.85),
    inset 0 -1px 0.5px rgba(255, 255, 255, 0.35),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.4),
    inset 0 0 8px rgba(255, 255, 255, 0.16);
}
:root.glass-ctl[data-glass="full"] .ios-switch-slider::before {
  transition: transform var(--d-mid) var(--ease-out), scale var(--d-fast) var(--ease-micro), opacity var(--d-fast) var(--ease);
}
:root.glass-ctl[data-glass="full"] :is(.ios-switch, .ios-switch-sm) :is(input.is-pressed + .ios-switch-slider, .sw-hold > .ios-switch-slider)::before { opacity: 0; scale: 1.3; }
:root.glass-ctl[data-glass="full"] :is(.ios-switch, .ios-switch-sm) input.is-pressed ~ :is(.glass-ctl-lens, .glass-ctl-rim),
:root.glass-ctl[data-glass="full"] :is(.ios-switch, .ios-switch-sm).sw-hold > :is(.glass-ctl-lens, .glass-ctl-rim) { opacity: 1; }
/* Стеклянный ползунок: слой той же раскладки и поворота, что у input, линза
   на месте ручки и копия ползунка в ней (core/glassctl.js). Ручку CSS называет
   скрипту сам: --ctl-thumb — её ширина у каждого класса. */
.band-knob-slider { --ctl-thumb: 26px; }
.eq-fader { --ctl-thumb: 22px; }
.eq-range-slider { --ctl-thumb: 22px; }
.ios-studio-sheet .eq-range-slider { --ctl-thumb: 26px; }
.glass-rng { display: none; }
:root.glass-ctl[data-glass="full"] .glass-rng {
  display: block;
  position: absolute;
  margin: 0;
  pointer-events: none;
  z-index: 1;
  --ctl-k: 1.8;
}
/* Линза едет и набухает на пружинах (core/glassctl.js); от CSS — только прозрачность. */
:root.glass-ctl[data-glass="full"] .glass-rng.is-on :is(.glass-ctl-lens, .glass-ctl-rim) { opacity: 1; }
:root.glass-ctl[data-glass="full"] .glass-rng input.glass-rng-clone {
  position: absolute;
  left: calc(-1 * var(--ctl-l));
  top: calc(-1 * var(--ctl-t));
  width: var(--ctl-w);
  height: var(--ctl-h);
  margin: 0;
  /* Увеличение вокруг середины линзы (она стоит на ручке). */
  transform: translate(calc(-1 * var(--ctl-x)), calc(-1 * var(--ctl-y, 0px))) scale(var(--ctl-k, 1));
  transform-origin: calc(var(--ctl-l) + var(--ctl-x) + var(--ctl-lw) / 2) calc(var(--ctl-t) + var(--ctl-lh) / 2);
  pointer-events: none;
}
/* Копия ползунка в линзе больше самой линзы. Без обрезки фильтр линзы берёт
   за основу не её коробку, а коробку с выступающей копией: карта растягивается
   не по линзе, и тонкая дорожка в линзе уезжает вбок. Режем по линзе. */
:root.glass-ctl[data-glass="full"] :is(.glass-rng, .eq-mode-segments, .ios-switch, .ios-switch-sm) .glass-ctl-bend { overflow: hidden; }
:root.glass-ctl[data-glass="full"] .glass-rng input.glass-rng-clone::-webkit-slider-thumb { opacity: 0; }
:root.glass-ctl[data-glass="full"] input[type="range"].ctl-drag::-webkit-slider-thumb { opacity: 0; }
/* Стеклянные сегменты (core/glassctl.js): пока держат или пока выбор едет,
   плашка — линза над кнопками, в ней увеличенная копия ряда с подписями.
   Подписи тонкие — линза их увеличивает (--ctl-k > 1). Настоящие подписи под
   линзой вырезаны дыркой, и дырка едет тем же токеном, что линза. */
:root.glass-ctl[data-glass="full"] .eq-mode-segments[data-glass-ctl] { position: relative; --ctl-k: 1.2; --ctl-kx: 1.2; }
:root.glass-ctl[data-glass="full"] .eq-mode-segments[data-glass-ctl] > .eq-seg-btn {
  transition: background var(--d-fast) var(--ease), color var(--d-fast) var(--ease);
}
:root.glass-ctl[data-glass="full"] .eq-mode-segments.ctl-lens > .eq-seg-btn {
  -webkit-mask: var(--ctl-hole) no-repeat calc(var(--ctl-l) + var(--ctl-x) - var(--ctl-bx)) calc(var(--ctl-t) - var(--ctl-by)) / var(--ctl-lw) var(--ctl-lh), linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: var(--ctl-hole) no-repeat calc(var(--ctl-l) + var(--ctl-x) - var(--ctl-bx)) calc(var(--ctl-t) - var(--ctl-by)) / var(--ctl-lw) var(--ctl-lh) exclude, linear-gradient(#000 0 0);
}
/* Пока линза в деле, плашки у кнопки нет — её роль играет линза. */
:root.glass-ctl[data-glass="full"] .eq-mode-segments.ctl-lens > .eq-seg-btn.active { background: transparent; box-shadow: none; color: var(--text); }
:root.glass-ctl[data-glass="full"] .eq-mode-segments.ctl-lens > :is(.glass-ctl-lens, .glass-ctl-rim) { opacity: 1; }
.glass-seg-label {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-style: normal;
  color: var(--text);
}
/* Тонкая настоящая дорожка не просвечивает сквозь увеличивающую линзу. */
:root.glass-ctl[data-glass="full"] input[type="range"].ctl-drag {
  -webkit-mask: var(--ctl-hole) no-repeat calc(var(--ctl-l) + var(--ctl-x)) calc(var(--ctl-t) + var(--ctl-y, 0px)) / var(--ctl-lw) var(--ctl-lh), linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: var(--ctl-hole) no-repeat calc(var(--ctl-l) + var(--ctl-x)) calc(var(--ctl-t) + var(--ctl-y, 0px)) / var(--ctl-lw) var(--ctl-lh) exclude, linear-gradient(#000 0 0);
}
/* Кромка подсветки меню движется на пружинах --hl-* из app.js.
   Надписи и иконки остаются в настоящих кнопках: без копий и масок. */
.glass-pop-lens,
.glass-pop-rim { display: none; }
:root.glass-ctl[data-glass="full"] .pop-lens-host {
  --pl-w: var(--hl-w, 0px);
  --pl-h: min(52px, calc(var(--hl-h, 48px) - 4px));
  --pl-x: calc(var(--hl-left, 5px) + var(--hl-x, 0px));
  --pl-y: calc(var(--hl-y, 0px) + (var(--hl-h, 48px) - var(--pl-h)) / 2);
  --ctl-k: 1;
}
:root.glass-ctl[data-glass="full"] .pop-lens-on > :is(.glass-pop-lens, .glass-pop-rim) {
  display: block;
  position: absolute;
  z-index: 2;
  left: 0;
  top: 0;
  width: var(--pl-w);
  height: var(--pl-h);
  translate: var(--pl-x) var(--pl-y);
  scale: var(--hl-sx, 1) var(--hl-sy, 1);
  border-radius: 19px;
  pointer-events: none;
}
.glass-pop-lens { overflow: hidden; }
/* Выбор пункта — плоская подсветка, без второго стекла поверх меню. */
.glass-pop-rim {
  background: none;
  box-shadow: none;
}

/* Карточки */
.eq-card-cluster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.eq-glass-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-card);
  padding: var(--s3) var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  min-width: 0;
}
.card-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.knob-control-wrap { display: flex; flex-direction: column; gap: 6px; }
.knob-readout { font-size: 13px; font-weight: 600; color: var(--text-secondary); font-variant-numeric: tabular-nums; }

/* Горизонтальные ползунки */
.eq-range-slider,
.preamp-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  --fill: 50%;
}
.eq-range-slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: var(--bg-card-active);
}
.eq-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -9px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.45);
}
.eq-range-slider::-moz-range-track { height: 4px; border-radius: 2px; background: var(--bg-card-active); }
.eq-range-slider::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: #ffffff; }

/* Пространственное аудио */
.card-header-toggle { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.card-header-left { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.spatial-icon { color: var(--accent); display: grid; place-items: center; }
.spatial-icon svg { width: 20px; height: 20px; fill: currentColor; }
.card-headline-sm { font-size: 15px; font-weight: 600; }
.spatial-controls {
  display: none;
  margin-top: var(--s2);
  padding-top: var(--s3);
  border-top: 1px solid var(--line-soft);
  flex-direction: column;
  gap: var(--s3);
}
.eq-spatial-card.is-on .spatial-controls { display: flex; }
.spatial-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.spatial-label { font-size: 13px; color: var(--text-secondary); flex: 0 0 auto; }
.spatial-slider-wrap { flex: 1 1 auto; display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.spatial-val { font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }

/* Выбор режима и пресета */
.eq-nav-bar { display: flex; flex-direction: column; gap: var(--s3); }
.eq-mode-segments {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  background: var(--inset);
}
.eq-seg-btn {
  /* Глобальный сброс кнопок оставляет text-align:start и padding:0 — подписи
     прижимались к левому краю сегмента и выглядели обрезанными. */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  text-align: center;
  white-space: nowrap;
  height: 34px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: background var(--d-fast) var(--ease), color var(--d-fast) var(--ease);
}
.eq-seg-btn.active { background: var(--bg-surface-raised); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }
.eq-preset-wrap { display: flex; align-items: center; gap: var(--s2); }
.eq-glass-select,
.eq-glass-select-sm {
  flex: 1 1 auto;
  min-width: 0;
  height: 42px;
  padding: 0 var(--s7) 0 var(--s3);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background-color: var(--bg-surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  -webkit-appearance: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-secondary) 50%),
    linear-gradient(135deg, var(--text-secondary) 50%, transparent 50%);
  background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.eq-glass-select-sm { flex: 0 1 190px; height: 36px; font-size: 13px; }
.eq-reset-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.eq-reset-btn svg { width: 18px; height: 18px; }
.eq-reset-btn.is-pressed { color: var(--accent); }

/* Кривая отклика */
.eq-curve-card { padding: var(--s2) var(--s3); }
.eq-curve { display: block; width: 100%; height: 110px; }

/* Режимы */
.eq-mode-view { display: none; }
.eq-mode-view.active { display: block; }

.simple-eq-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.simple-band-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-card);
  padding: var(--s3) var(--s2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.band-tag { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--text-muted); }
.knob-container { width: 100%; height: 150px; position: relative; }
.band-knob-slider {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 150px;
  height: 32px;
  margin: 0;
  background: transparent;
  transform: translate(-50%, -50%) rotate(-90deg);
}
.band-knob-slider::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--bg-card-active); }
.band-knob-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -10px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}
.band-knob-slider::-moz-range-track { height: 6px; border-radius: 3px; background: var(--bg-card-active); }
.band-knob-slider::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: #ffffff; }
.band-db-badge { font-size: 13px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.band-freq-sub { font-size: 11px; color: var(--text-muted); }

.eq-preamp-row { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s3); }
.preamp-label { font-size: 13px; color: var(--text-secondary); flex: 0 0 auto; }
.preamp-badge { font-size: 12px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; min-width: 52px; text-align: right; }

.eq-sliders-board {
  display: flex;
  gap: var(--s2);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-card);
  padding: var(--s3) var(--s2);
}
.eq-scale-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  /* Высота совпадает с фейдером; верх и низ подписей — на краях дорожки. */
  height: 150px;
  margin-top: 22px;
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
  text-align: right;
}
.eq-bands-wrapper { flex: 1 1 auto; min-width: 0; display: flex; gap: 0; }
.eq-band-channel { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1 1 0; min-width: 0; }
.channel-freq { font-size: 11px; font-weight: 700; color: var(--text-secondary); height: 16px; }
.channel-db { font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fader-track { position: relative; width: 100%; height: 150px; }
.fader-zero-line {
  position: absolute;
  left: 30%;
  right: 30%;
  top: 50%;
  height: 1px;
  background: var(--line);
  pointer-events: none;
}
.eq-fader {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 150px;
  height: 32px;
  margin: 0;
  background: transparent;
  transform: translate(-50%, -50%) rotate(-90deg);
}
.eq-fader::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--bg-card-active); }
.eq-fader::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -9px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}
.eq-fader::-moz-range-track { height: 4px; border-radius: 2px; background: var(--bg-card-active); }
.eq-fader::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: #ffffff; }

/* Скорость */
.eq-collapsible-fx { border-radius: var(--r-card); background: var(--bg-surface); border: 1px solid var(--border-subtle); }
.eq-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 var(--s4);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.eq-summary-row::-webkit-details-marker { display: none; }
.summary-chevron { width: 20px; height: 20px; color: var(--text-muted); transition: transform var(--d-mid) var(--ease); }
.summary-chevron svg { width: 20px; height: 20px; fill: currentColor; }
.eq-collapsible-fx[open] .summary-chevron { transform: rotate(180deg); }
.tempo-pills-row { display: flex; flex-wrap: wrap; gap: var(--s2); padding: 0 var(--s4) var(--s4); }
.tempo-pill {
  height: 34px;
  padding: 0 var(--s3);
  border-radius: var(--r-pill);
  background: var(--bg-surface-raised);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  transition: background var(--d-fast) var(--ease), color var(--d-fast) var(--ease);
}
.tempo-pill.active { background: var(--accent); color: var(--accent-on); }

/* ==========================================================================
   Эквалайзер занимает ту же оболочку приложения, что и полный плеер.
   Он не выходит за границы .ios-app-viewport на широком экране.
   ========================================================================== */
.ios-studio-sheet {
  --tint: 65, 45, 75;
  --accent: #ffffff;
  --accent-fill: #ffffff;
  --accent-rgb: 255, 255, 255;
  --accent-on: #000000;
  --accent-soft: rgba(255, 255, 255, 0.14);
  /* Подписи и сетка графика читаются на тёмном фоне обложки. */
  --text-muted: rgba(255, 255, 255, 0.78);
  --line: rgba(255, 255, 255, 0.16);
  position: absolute;
  inset: 0;
  z-index: 1500;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
  background: #000000;
  animation: slideUpModal var(--dur-move) var(--ease-move);
  color: #ffffff;
}
/* Фон: обложка, размытая и тонированная цветом трека. */
.eq-backdrop {
  position: absolute;
  inset: -40px;
  background-size: cover;
  background-position: center;
  filter: blur(40px) saturate(170%);
  transform: scale(1.1);
  z-index: 0;
}
.eq-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(var(--tint), 0.5) 0%, rgba(0, 0, 0, 0.55) 100%);
}
.ios-studio-sheet > .sheet-grabber,
.ios-studio-sheet > .sheet-header,
.ios-studio-sheet > .studio-sheet-body {
  position: relative;
  z-index: 1;
}
.ios-studio-sheet .sheet-grabber {
  position: relative;
  z-index: 1;
  flex: 0 0 24px;
  width: 48px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  margin: calc(var(--tg-header-clearance) + 8px) auto 6px;
  cursor: pointer;
  touch-action: none;
}
.ios-studio-sheet .sheet-grabber::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 58px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.35);
}
.ios-studio-sheet .sheet-header {
  padding: 4px var(--s4) var(--s3);
  border-bottom: none;
  align-items: center;
}
.ios-studio-sheet .eq-header-right-cluster { gap: 10px; }
.ios-studio-sheet .sheet-meta h3 {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
}
.ios-studio-sheet .sheet-sub,
.ios-studio-sheet .eq-toggle-label {
  display: none;
}
.ios-studio-sheet .sheet-title-icon {
  color: #ffffff;
  width: 26px;
  height: 26px;
}
.ios-studio-sheet .ios-switch {
  width: 51px;
  height: 31px;
}
.ios-studio-sheet .ios-switch-slider {
  background: rgba(255, 255, 255, 0.22);
}
/* Большой переключатель: кружок 27px в дорожке 51×31 (ход 20px). */
.ios-studio-sheet .ios-switch .ios-switch-slider::before {
  width: 27px;
  height: 27px;
}
/* Включённый — зелёный с белым кружком, как у системного. Оба размера переключателя. */
.ios-studio-sheet .ios-switch input:checked + .ios-switch-slider,
.ios-studio-sheet .ios-switch-sm input:checked + .ios-switch-slider {
  background: #34c759;
}
.ios-studio-sheet .ios-switch input:checked + .ios-switch-slider::before,
.ios-studio-sheet .ios-switch-sm input:checked + .ios-switch-slider::before {
  background: #ffffff;
}
.ios-studio-sheet .studio-sheet-body {
  --scroll-mask-top: 16px;
  --scroll-mask-bottom: 40px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: var(--s1) var(--s4) calc(var(--sab) + var(--s6));
  display: flex;
  flex-direction: column;
  gap: 14px;
}
@media (max-width: 600px) {
  .ios-studio-sheet .sheet-header { padding-inline: 16px; }
  .ios-studio-sheet .studio-sheet-body { padding-inline: 14px; }
  .ios-studio-sheet .sheet-meta h3 { font-size: 21px; }
  .ios-studio-sheet .ios-switch { width: 46px; height: 28px; }
}
.ios-studio-sheet .eq-sliders-board {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 18px;
}
.ios-studio-sheet .eq-card-cluster {
  gap: 12px;
}
.ios-studio-sheet .eq-glass-card {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 18px;
  padding: 14px 16px;
  gap: 10px;
}
.ios-studio-sheet .card-tag {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(255, 255, 255, 0.6);
}
.ios-studio-sheet .knob-control-wrap {
  gap: 8px;
}
.ios-studio-sheet .knob-readout {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
}
.ios-studio-sheet .eq-range-slider::-webkit-slider-runnable-track {
  height: 5px;
  background: rgba(255, 255, 255, 0.25);
}
.ios-studio-sheet .eq-range-slider::-webkit-slider-thumb {
  width: 26px;
  height: 26px;
  margin-top: -10.5px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.ios-studio-sheet .eq-range-slider::-moz-range-track {
  height: 5px;
  background: rgba(255, 255, 255, 0.25);
}
.ios-studio-sheet .eq-range-slider::-moz-range-thumb {
  width: 26px;
  height: 26px;
  background: #ffffff;
}
.ios-studio-sheet .card-headline-sm {
  font-size: 17px;
  font-weight: 600;
}
.ios-studio-sheet .spatial-label,
.ios-studio-sheet .spatial-val {
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
}
.ios-studio-sheet .eq-glass-select-sm,
.ios-studio-sheet .eq-glass-select {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #ffffff;
  border-radius: 14px;
  font-size: 15px;
}
.ios-studio-sheet .eq-glass-select {
  height: 44px;
  flex: 1 1 auto;
}
.ios-studio-sheet .eq-nav-bar {
  gap: 12px;
}
.ios-studio-sheet .eq-mode-segments {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 999px;
  padding: 3px;
}
.ios-studio-sheet .eq-seg-btn {
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  font-weight: 600;
  border-radius: 999px;
  padding: 9px 8px;
}
.ios-studio-sheet .eq-seg-btn.active {
  background: #ffffff;
  color: #000000;
  box-shadow: none;
}
.ios-studio-sheet .eq-reset-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}
.ios-studio-sheet .eq-curve-card {
  padding: 12px;
}
.ios-studio-sheet .eq-curve {
  height: 130px;
}
.ios-studio-sheet .simple-eq-grid {
  gap: 10px;
}
.ios-studio-sheet .simple-band-card {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 18px;
}
.ios-studio-sheet .band-tag {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}
.ios-studio-sheet .band-db-badge {
  color: #ffffff;
  font-size: 15px;
}
.ios-studio-sheet .band-freq-sub {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}
.ios-studio-sheet .band-knob-slider::-webkit-slider-runnable-track {
  background: rgba(255, 255, 255, 0.25);
}
.ios-studio-sheet .band-knob-slider::-webkit-slider-thumb {
  background: #ffffff;
}
.ios-studio-sheet .preamp-label,
.ios-studio-sheet .eq-headroom-note {
  color: rgba(255, 255, 255, 0.6);
}
.ios-studio-sheet .preamp-badge {
  color: #ffffff;
  font-size: 14px;
}
.ios-studio-sheet .channel-freq {
  color: rgba(255, 255, 255, 0.75);
}
.ios-studio-sheet .channel-db,
.ios-studio-sheet .eq-scale-labels span {
  color: rgba(255, 255, 255, 0.5);
}
.ios-studio-sheet .fader-zero-line {
  background: rgba(255, 255, 255, 0.3);
}
.ios-studio-sheet .eq-fader::-webkit-slider-runnable-track {
  background: rgba(255, 255, 255, 0.25);
}
.ios-studio-sheet .eq-fader::-webkit-slider-thumb {
  background: #ffffff;
}
.ios-studio-sheet .eq-fader::-moz-range-track {
  background: rgba(255, 255, 255, 0.25);
}
.ios-studio-sheet .eq-collapsible-fx {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 18px;
}
.ios-studio-sheet .eq-summary-row {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
}
.ios-studio-sheet .tempo-pill {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: none;
}
.ios-studio-sheet .tempo-pill.active {
  background: #ffffff;
  color: #000000;
}

/* ==========================================================================
   Меню-шторка, диалоги, обложки плейлистов, выбор плейлиста
   ========================================================================== */
.menu-sheet-backdrop { z-index: 2300; }
.menu-sheet-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 12px;
}
.menu-sheet-head .menu-head-art { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 10px; overflow: hidden; }
.menu-sheet-head .menu-head-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.menu-head-title { font-size: 17px; font-weight: 700; letter-spacing: -.015em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-head-sub { font-size: 15px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-sheet-body { max-height: min(62vh, 520px); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--bg-surface-raised) transparent; }
.menu-sheet-body::-webkit-scrollbar { width: 6px; }
.menu-sheet-body::-webkit-scrollbar-thumb { background: var(--bg-surface-raised); border-radius: 3px; }
.menu-sheet-note { padding: 12px 6px 4px; font-size: 13px; color: var(--text-secondary); }

.charts-country-search {
  --scroll-header-fade-color: var(--glass-dock);
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin: 0;
  padding: 7px 16px;
  background: var(--scroll-header-fade);
  border-bottom: 0;
  box-sizing: border-box;
}
.charts-country-search > svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--text-secondary);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.charts-country-search:focus-within > svg { stroke: var(--accent); }
.charts-country-search input {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  appearance: none;
  -webkit-appearance: none;
}
.charts-country-search input::placeholder { color: var(--text-secondary); opacity: 1; }
.charts-country-search input::-webkit-search-cancel-button { cursor: pointer; }
.charts-country-pinned { border-bottom: 1px solid var(--line-soft); }
.chart-country-row[hidden] { display: none; }
.chart-country-row .chart-country-flag,
.charts-country-control .chart-country-flag {
  position: relative;
  display: block;
  width: 24px;
  height: 18px;
  flex: 0 0 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 5px;
  background: var(--inset);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.chart-country-flag img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.chart-country-flag::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(112deg, rgba(255, 255, 255, 0.2), transparent 42%, rgba(0, 0, 0, 0.08));
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.24), inset 0 -1px 1px rgba(0, 0, 0, 0.12);
  content: "";
  pointer-events: none;
}
.sheet-action-row .chart-country-check {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.charts-country-empty {
  padding: 18px;
  color: var(--text-secondary);
  font-size: 14px;
  text-align: center;
}

/* Сетка выбора обложки из треков */
.cover-pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px 18px 18px; }
.cover-pick-item { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--inset); padding: 0; }
.cover-pick-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Обложка плейлиста: одиночная картинка или мозаика 2×2 */
.pl-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-surface-raised);
  display: block;
}
.pl-cover > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-cover.mosaic { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 1px; }
.pl-cover.mosaic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-cover.pl-fav {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ff5f7a, #e0334f);
}
.pl-cover.pl-fav svg { width: 46%; height: 46%; fill: #ffffff; }

/* Строки каталога плейлистов */
.playlist-catalog-item { position: relative; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
.playlist-catalog-art .pl-cover { border-radius: inherit; height: 100%; aspect-ratio: auto; }
.playlist-catalog-more {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
}
.playlist-catalog-more.is-pressed { background: var(--bg-card-active); }
.playlist-catalog-more svg { width: 18px; height: 18px; fill: currentColor; }

/* Герой плейлиста */
.playlist-art-wrap .pl-cover { height: 100%; aspect-ratio: auto; border-radius: inherit; }

/* Выбор плейлиста */
.custom-popover-scroller {
  max-height: min(56vh, 460px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.custom-popover-item { gap: 12px; padding: 10px var(--s4); }
.custom-popover-item-left { flex: 1 1 auto; min-width: 0; gap: 12px; }
.custom-popover-art { width: 44px; height: 44px; flex: 0 0 auto; }
.custom-popover-art .pl-cover { border-radius: 9px; }
.custom-popover-name { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.custom-popover-count { font-variant-numeric: tabular-nums; }
.custom-popover-check { width: 22px; height: 22px; flex: 0 0 auto; }
.custom-popover-check svg { width: 18px; height: 18px; }
.custom-popover-footer { padding: 10px var(--s4) var(--s3); border-top: 1px solid var(--line-soft); }
.custom-popover-new-btn {
  width: 100%;
  height: 46px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.custom-popover-new-btn svg { width: 18px; height: 18px; }

/* Добавление трека в плейлисты: шторка с двумя положениями — половина экрана
   и весь экран (docs/LIQUID-GLASS.md, разделы 1, 2, 6). Шторка — ОДИН кусочек стекла;
   кнопки, поле поиска и строки внутри плоские: стекла в стекле нет. Затемнение —
   отдельный слой рядом, а не предок: opacity у предка отрезала бы фон у стекла. */
.add-playlist-screen {
  position: fixed;
  inset: 0;
  z-index: 2300;
  color: var(--text);
}
.add-playlist-scrim { position: absolute; inset: 0; background: var(--scrim-tint); }
.add-playlist-sheet {
  --glass-blur: var(--piece-refract, var(--piece-filter));
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: calc(var(--tg-header-clearance) + 8px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 0 max(18px, var(--sar)) 0 max(18px, var(--sal));
  border: 1px solid transparent;
  border-radius: 28px 28px 0 0;
  background: var(--piece-tint);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--piece-shadow);
  will-change: transform;
}
.add-playlist-grabber {
  align-self: center;
  flex: 0 0 auto;
  width: 64px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.add-playlist-grabber span { width: 36px; height: 5px; border-radius: 3px; background: var(--text-muted); opacity: .5; }
.add-playlist-header {
  display: grid;
  align-items: center;
  /* по бокам — место под кнопки шапки (.add-playlist-controls) */
  padding: 0 56px;
  min-height: 48px;
}
/* Слой кнопок шапки: стоит там же, где шапка шторки, и ездит вместе с ней. */
.add-playlist-controls {
  position: absolute;
  left: max(18px, var(--sal));
  right: max(18px, var(--sar));
  /* 1px рамки шторки + 22px ручки + 2px до кнопки внутри строки в 48px */
  top: calc(var(--tg-header-clearance) + 8px + 25px);
  height: 0;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  will-change: transform;
}
.add-playlist-controls .add-playlist-circle { pointer-events: auto; }
.add-playlist-header h2 { text-align: center; font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Круглая кнопка — отдельный кусочек стекла (docs/LIQUID-GLASS.md §1.1), как «Моя волна».
   Лежит рядом со шторкой, а не в ней: стекло в стекле фона для размытия не имеет. */
.add-playlist-circle {
  --glass-blur: var(--piece-refract, var(--piece-filter));
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: var(--piece-tint);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--piece-shadow);
  color: var(--text);
  cursor: pointer;
}
.add-playlist-circle svg { width: 22px; height: 22px; }
.add-playlist-circle:focus-visible, .add-playlist-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Подтверждение — то же стекло, подкрашенное акцентом (цвет — смесью токенов, не литералом). */
.add-playlist-confirm { background: color-mix(in srgb, var(--accent) 62%, var(--piece-tint)); color: var(--accent-on); }
.add-playlist-confirm:disabled { opacity: .4; }
.add-playlist-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 12px 0 4px;
  padding: 0 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 10%, transparent);
  color: var(--text-secondary);
}
.add-playlist-search svg { width: 19px; height: 19px; }
.add-playlist-search input { min-width: 0; width: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; }
.add-playlist-search input::placeholder { color: var(--text-secondary); }
.add-playlist-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: calc(84px + var(--sab)); -webkit-overflow-scrolling: touch; }
/* На половине экрана список не прокручивается: жест вверх сначала раскрывает шторку. */
.add-playlist-sheet[data-detent="half"] .add-playlist-list { overflow-y: hidden; }
.add-playlist-section-title { margin: 18px 0 6px; font-size: 15px; font-weight: 700; }
.add-playlist-row {
  width: 100%;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 0;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.add-playlist-row.is-pressed { background: var(--inset); }
.add-playlist-art { width: 52px; height: 52px; flex: 0 0 52px; }
.add-playlist-art .pl-cover { width: 100%; height: 100%; border-radius: 9px; }
.add-playlist-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.add-playlist-check { width: 22px; height: 22px; flex: 0 0 22px; box-sizing: border-box; display: grid; place-items: center; border: 1.5px solid var(--text-muted); border-radius: 50%; color: var(--accent-on); font-size: 14px; font-weight: 700; }
.add-playlist-row[aria-pressed="true"] .add-playlist-check { border-color: var(--accent); background: var(--accent); }
.add-playlist-empty { margin-top: 30px; text-align: center; color: var(--text-secondary); }
/* Кнопки внизу плавают над шторкой у края экрана; полосы стекла под ними нет. */
.add-playlist-toolbar {
  position: absolute;
  bottom: 0;
  left: max(18px, var(--sal));
  right: max(18px, var(--sar));
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* До нижнего края — столько же, сколько до бокового (владелец 15.11). */
  padding: 0 0 max(18px, var(--sal));
  pointer-events: none;
}
.add-playlist-toolbar button { pointer-events: auto; }
.add-playlist-multi-off { display: none; }
.add-playlist-screen.is-selecting .add-playlist-multi-off { display: block; }
.add-playlist-screen.is-selecting #addPlaylistMulti > svg:not(.add-playlist-multi-off) { display: none; }
.add-playlist-screen.is-selecting #addPlaylistCreate { visibility: hidden; }

/* Диалоги ввода и подтверждения */
.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2400;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s5);
  animation: fadeInBackdrop var(--dur-move) var(--ease-move);
}
.dialog-card {
  width: 100%;
  max-width: 340px;
  background: var(--glass-dock);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-control-edge, var(--glass-border));
  border-radius: var(--control-surface-radius, 24px);
  padding: var(--s5) var(--s5) var(--s4);
  box-shadow: inset 0 1px 0 var(--glass-control-highlight, transparent), var(--glass-shadow);
  animation: dialogPop var(--dur-move) var(--ease-move);
}
@keyframes dialogPop { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.dialog-backdrop.is-closing {
  animation: dialogBackdropOut var(--dur-short) var(--ease) forwards;
  pointer-events: none;
}
.dialog-backdrop.is-closing .dialog-card {
  animation: dialogCardOut var(--dur-short) var(--ease) forwards;
}
@keyframes dialogBackdropOut { to { opacity: 0; } }
@keyframes dialogCardOut { to { opacity: 0; transform: scale(.96); } }
.dialog-title { font-size: 18px; font-weight: 700; color: var(--text); margin: 0 0 var(--s2); text-align: center; }
.dialog-text { margin: 0 0 var(--s3); font-size: 14px; line-height: 1.4; color: var(--text-secondary); text-align: center; }
.dialog-input {
  width: 100%;
  box-sizing: border-box;
  height: 46px;
  margin: var(--s2) 0 var(--s2);
  padding: 0 var(--s3);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--glass-control, var(--bg-surface));
  color: var(--text);
  font: inherit;
  font-size: 16px; /* 16px: меньше — iOS приближает страницу при фокусе */
  outline: none;
}
.dialog-input:focus { border-color: var(--accent); }
.dialog-input:focus-visible { border-color: var(--border-subtle); }
.dialog-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); margin-top: var(--s3); }
.dialog-btn {
  /* Глобальный сброс кнопок ставит text-align:start: подписи прижимались влево. */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  text-align: center;
  height: 46px;
  border-radius: 14px;
  background: var(--glass-control, var(--bg-card-active));
  border: 1px solid var(--glass-control-edge, var(--glass-border));
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}
.dialog-btn-primary { background: var(--accent); color: var(--accent-on); }
.dialog-btn-danger { background: #e5453a; color: #ffffff; }

/* История поиска */
.search-history-head { display: flex; align-items: center; justify-content: space-between; margin: var(--s4) 0 var(--s2); }
.search-history-head .search-discovery-header { margin: 0; }
.search-history-clear { font-size: 13px; font-weight: 600; color: var(--accent); padding: 6px 4px; }
.search-history-list { display: flex; flex-direction: column; }
.search-history-row { display: flex; align-items: center; gap: 12px; padding: 8px 2px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.search-history-row:last-child { border-bottom: 0; }
.search-history-art { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 9px; object-fit: cover; background: var(--bg-surface-raised); display: grid; place-items: center; }
.search-history-art.round { border-radius: 50%; }
.search-history-art.icon { color: var(--text-secondary); }
.search-history-art.icon svg { width: 22px; height: 22px; }
.search-history-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.search-history-title { font-size: 15px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-history-sub { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-history-del { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; color: var(--text-muted); }
.search-history-del svg { width: 14px; height: 14px; }
.search-history-del.is-pressed { background: var(--bg-card-active); }

/* ==========================================================================
   Страница артиста: прокручивается целиком. Раньше шапка и список были
   соседями во flex-колонке: шапку сжимало до 120px, а прокрутка пропадала.
   ========================================================================== */
.ios-artist-page {
  --scroll-header-fade-height: calc(var(--tg-header-clearance) + 88px);
  display: block;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.artist-nav-bar {
  position: sticky;
  top: 0;
  left: auto;
  right: auto;
  height: 0;
  padding: 0 var(--s4);
  align-items: flex-start;
  overflow: visible;
}
.artist-nav-bar > * { margin-top: calc(var(--tg-header-clearance) + 8px); }
.artist-header-stage { margin: 0 0 var(--s4); }
.artist-header-img-wrap { height: calc(280px + var(--tg-header-clearance)); }
.artist-body-container {
  overflow: visible;
  padding-top: 0;
}
.artist-section-count { font-size: 14px; font-weight: 600; color: var(--text-secondary); margin-left: 4px; }
.artist-library-block { margin-bottom: var(--s4); }

/* Вкладка «Миксы» */
.shelf-basis { margin: -4px 0 var(--s3); font-size: 13px; color: var(--text-secondary); line-height: 1.35; }
.mix-card .mix-card-sub { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mix-card.album-card .mix-art-wrap { border-radius: 10px; }
.mix-card.album-card .home-album-play { pointer-events: auto; padding: 0; cursor: pointer; }
.mood-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.mood-card {
  /* Карточка, а не pill: высота по содержимому, текст сверху. Слой pill-кнопок
     (height:36px, justify-content:center) раньше наезжал на эмодзи и название. */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  height: auto;
  min-height: 112px;
  padding: var(--s3) var(--s3) var(--s4);
  border-radius: var(--r-card);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  text-align: left;
  white-space: normal;
  cursor: pointer;
  transition: background var(--d-fast) var(--ease), transform var(--d-fast) var(--ease);
}
.mood-card.is-pressed {
  scale: 0.97;
  background: var(--bg-card-active);
}
.mood-card-emoji { font-size: 26px; line-height: 1; margin-bottom: 4px; }
.mood-card-title { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.25; }
.mood-card-desc { font-size: 12px; line-height: 1.35; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ==========================================================================
   Синхронизация: второй уровень и недостающие классы
   ========================================================================== */
/* Раньше лежал внутри прокручиваемого подэкрана и позиционировался от его
   нулевой точки: при прокрутке списка сервисов панель оставалась наверху, экран
   «улетал» вверх и возвращался. Теперь это брат подэкрана, а не потомок. */
.sync-detail {
  position: absolute;
  inset: 0;
  z-index: 850;
  overscroll-behavior: contain;
}
.sync-empty {
  padding: var(--s6) var(--s4);
  text-align: center;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-muted);
}
.sync-pl { grid-template-columns: minmax(0, 1fr) auto; }
.sync-pl-title { overflow-wrap: anywhere; }
.sync-pl.syncing { opacity: 0.6; pointer-events: none; }
.sync-remove {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: 12.5px;
  color: var(--text-secondary);
}
.sync-run {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--s3);
  align-items: center;
  padding: var(--s2) var(--s3);
  border-radius: var(--r-card);
  background: var(--bg-surface);
  font-size: 12.5px;
}
.sync-run-delta { color: var(--text-secondary); }
.sync-run-time { color: var(--text-muted); font-variant-numeric: tabular-nums; }
/* Кнопка «обновить» в шапке подэкрана рисовалась белым по светлому фону. */
.subview-nav-right-slot .ios-icon-btn {
  width: 36px;
  height: 36px;
  color: var(--text);
  background: var(--bg-surface-raised);
}

/* Единый hit-area и видимая граница у управляющих кнопок экрана синхронизации. */
#syncView #syncReloadBtn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--r-icon);
}
#syncView #syncReloadBtn svg {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   Закрытие меню трека: уходит вся шторка сразу
   Карточка действий, «Отмена» и фон двигаются одним переходом. Раньше уходила
   только карточка, а кнопка «Отмена» исчезала в самом конце без анимации.
   ========================================================================== */
.menu-sheet-backdrop,
#trackActionSheet {
  transition: opacity var(--dur-move) var(--ease-move);
}
.menu-sheet-backdrop.menu-sheet-leaving,
#trackActionSheet.sheet-leaving {
  opacity: 0;
  animation: none;
}
.menu-sheet-backdrop.menu-sheet-leaving .ios-action-sheet-card,
.menu-sheet-backdrop.menu-sheet-leaving .sheet-cancel-btn,
#trackActionSheet.sheet-leaving :is(.ios-action-sheet-card, .sheet-cancel-btn) {
  transition: transform var(--dur-move) var(--ease-move);
  transform: translate3d(0, 100vh, 0);
}

/* ==========================================================================
   Меню у кнопки (core/popover.js): та же шторка, но небольшим окном у кнопки,
   которой её вызвали, как контекстное меню iOS 26. Фон не темнеет, шапки,
   «ручки» и «Отмены» нет, подпись слева, значок справа.
   ========================================================================== */
.ios-sheet-backdrop.is-popover {
  display: block;
  padding: 0;
  background: transparent;
  animation: none;
}
.ios-sheet-backdrop.is-popover > .ios-action-sheet-card {
  position: fixed;
  width: min(258px, calc(100vw - 24px));
  max-width: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 26px;
  padding: 6px 0;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42), 0 2px 8px rgba(0, 0, 0, 0.22);
  animation: none;
}
.ios-sheet-backdrop.is-popover :is(.sheet-grabber, .sheet-cancel-btn, .action-sheet-track-row, .menu-sheet-head) { display: none !important; }
.ios-sheet-backdrop.is-popover .menu-sheet-body { max-height: none; overflow: visible; }
.ios-sheet-backdrop.is-popover .sheet-action-row {
  flex-direction: row-reverse;
  gap: 14px;
  min-height: 46px;
  padding: 11px 20px;
  border-bottom-color: var(--line-soft);
  font-size: 16px;
  font-weight: 500;
}
.ios-sheet-backdrop.is-popover .sheet-action-row svg { width: 20px; height: 20px; color: currentColor; }
.ios-sheet-backdrop.is-popover .sheet-action-row.sheet-action-danger svg { color: #ff453a; }
.menu-sheet-backdrop.is-popover.menu-sheet-leaving { opacity: 1; }
.menu-sheet-backdrop.is-popover.menu-sheet-leaving .ios-action-sheet-card { transition: none; transform: none; }

/* Подпись про запас от клиппинга под предусилителем. */
.eq-headroom-note {
  margin: calc(var(--s2) * -1) 0 var(--s3);
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--text-muted);
}

/* ==========================================================================
   Выбор нескольких: метки в строках, панель действий
   ========================================================================== */
.select-mark {
  display: none;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-right: 12px;
  border-radius: 50%;
  border: 1.5px solid var(--text-muted);
  align-items: center;
  justify-content: center;
  transition: background var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease);
}
.is-selecting .select-mark { display: flex; }
.is-selected .select-mark { background: var(--accent); border-color: var(--accent); }
.is-selected .select-mark::after {
  content: "";
  width: 6px;
  height: 11px;
  margin-top: -2px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.is-selecting .track-item-more-btn,
.is-selecting .playlist-catalog-more { display: none; }
.is-selected.ios-track-item,
.is-selected.playlist-catalog-item { background: var(--accent-soft); }

/* Панель над мини-плеером: не перекрывает его и не прячет список. */
.select-bar {
  position: absolute;
  left: var(--page-gutter);
  right: var(--page-gutter);
  bottom: calc(var(--tabbar-h) + var(--mini-h) + var(--dock-bottom));
  z-index: 1350;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 10px 8px;
  border-radius: 16px;
  background: var(--glass-dock);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
/* Стекло панели выбора. */
.select-bar {
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
.select-bar-count {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
}
.select-bar-actions { display: flex; gap: 6px; }
.select-bar-btn {
  flex: 1 1 0;
  min-width: 0;
  height: 36px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--bg-surface-raised);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}
.select-bar-btn:disabled { opacity: 0.4; }
.select-bar-danger { color: #e5453a; }

/* Список не прячется под панелью, когда выбор включён. */
body.is-selecting .ios-playlists-catalog-list,
body.is-selecting #trackList { padding-bottom: 150px; }

.subview-nav-text-btn {
  height: 36px;
  padding: 0 12px;
  border-radius: 18px;
  background: var(--bg-surface-raised);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Прогресс переноса в синхронизации: шкала под связкой плейлиста
   ========================================================================== */
.sync-progress {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: var(--s2);
}
.sync-progress-track {
  height: 6px;
  border-radius: 3px;
  background: var(--inset);
  overflow: hidden;
}
.sync-progress-track > span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--accent-gradient);
  transition: opacity var(--dur-micro) var(--ease);
}
.sync-progress.is-running .sync-progress-track > span {
  animation: syncPulse var(--dur-breathe) var(--ease-breathe) infinite;
}
@keyframes syncPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.sync-progress-label {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}
.sync-progress.is-done .sync-progress-label { color: #10b981; }
.sync-progress.is-error .sync-progress-label { color: #e5453a; }/* Синхронизация: направление читается без догадок. Сегменты центрируются
   (кнопки по умолчанию брали text-align: start),
подпись объясняет выбор,
флажок — тот же переключатель,
что у связки { align-items: stretch; }
.sync-remove {
  justify-content: space-between;
  width: 100%;
  font-size: 13px;
  line-height: 1.35;
}
.sync-pl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}
.sync-pl-actions .sync-btn { flex: 1 1 auto; }
.sync-pl-actions .sync-btn-ghost { color: var(--text-secondary); }

/* Хвост списка плейлиста («Все 2 трека») не имел ни одного правила: шрифт
   и цвет падали на тело страницы и выглядели как обычный текст. */
.list-tail {
  padding: var(--s3) 0 var(--s2);
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── Синхронизация, второй проход: два экрана вместо одного перегруженного ───
   Экран сервисов: одна карточка на сервис и одна фраза о его состоянии.
   Экран сервиса: переключатель у плейлиста, настройки раскрываются по нажатию. */
.sync-howto {
  padding: var(--s3) var(--s4);
  border-radius: var(--r-card);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--text-secondary);
}
.sync-howto summary {
  display: flex;
  align-items: center;
  gap: var(--s2);
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}
.sync-howto summary::-webkit-details-marker { display: none; }
.sync-howto summary::marker { content: ""; }
.sync-howto-chevron {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--text-muted);
  transition: transform var(--d-fast) var(--ease);
}
.sync-howto[open] .sync-howto-chevron { transform: rotate(90deg); }
.sync-howto ul {
  margin: var(--s2) 0 0;
  padding-left: 18px;
  line-height: 1.5;
}

.sync-service-list {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.sync-service {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  padding: var(--s3) var(--s4);
  border-radius: var(--r-card);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font: inherit;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}
.sync-service:disabled {
  opacity: 0.5;
  cursor: default;
}
.sync-service.is-pressed { scale: 0.99; }
.sync-service-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand);
  background: var(--bg-surface-raised);
  color: var(--brand);
  border: 1px solid var(--border-subtle);
}
.sync-service-logo {
  display: block;
  width: 22px;
  height: 22px;
  background-color: currentColor;
  -webkit-mask: var(--service-logo) center / contain no-repeat;
  mask: var(--service-logo) center / contain no-repeat;
}
.sync-service-logo-fallback {
  font-size: 15px;
  font-weight: 700;
}
.sync-service-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sync-service-name {
  font-size: 15px;
  font-weight: 600;
}
.sync-service-line {
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}
.sync-service.tone-warn .sync-service-line { color: #d98a1f; }
.sync-service-chev {
  font-size: 22px;
  line-height: 1;
  color: var(--text-muted);
}

.sync-detail-top {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding: var(--s2) 0 var(--s3);
}
.sync-explain {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.sync-btn-wide { width: 100%; }
.sync-btn-danger { color: #e5453a; }
.sync-banner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s2);
  margin-bottom: var(--s3);
  padding: var(--s3) var(--s4);
  border-radius: var(--r-card);
  background: rgba(217, 138, 31, 0.12);
  border: 1px solid rgba(217, 138, 31, 0.35);
  font-size: 13px;
  color: var(--text);
}
.sync-banner p { margin: 0; }

.sync-pl-list {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.sync-pl {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--s2);
  padding: var(--s3) var(--s4);
  border-radius: var(--r-card);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}
.sync-pl.is-open { border-color: var(--border-strong, var(--border-subtle)); }
.sync-pl-head {
  display: flex;
  align-items: center;
  gap: var(--s3);
}
.sync-pl-text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  color: var(--text);
}
.sync-pl-open { cursor: pointer; }
.sync-pl-title {
  font-size: 14.5px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.sync-pl-meta {
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--text-secondary);
}

.sync-pl-settings {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding-top: var(--s3);
  border-top: 1px solid var(--border-subtle);
}
.sync-field-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.sync-options {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.sync-option {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  width: 100%;
  padding: var(--s3);
  border-radius: var(--r-card);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font: inherit;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}
.sync-option.is-active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.sync-option-dot {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
}
.sync-option.is-active .sync-option-dot {
  border-color: var(--accent);
  background: radial-gradient(circle, var(--accent) 45%, transparent 50%);
}
.sync-option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sync-option-title {
  font-size: 14px;
  font-weight: 600;
}
.sync-option-desc {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text-secondary);
}
.sync-remove {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
}
.sync-pl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}
.sync-pl-actions .sync-btn { flex: 1 1 auto; }

.sync-history {
  font-size: 13px;
  color: var(--text-secondary);
}
.sync-history summary {
  cursor: pointer;
  padding: var(--s2) 0;
  font-weight: 600;
  color: var(--text);
}
.sync-detail-foot {
  display: flex;
  justify-content: center;
  padding-top: var(--s4);
}

/* ─── Подключение сервисов с токеном: шапка, шаги с иконками, карточка токена ─── */
.sync-ico {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}
.sync-mark-lg {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  font-size: 20px;
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.20);
}
.sync-connect {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  padding-top: var(--s2);
}
.sync-connect-head {
  display: flex;
  align-items: center;
  gap: var(--s3);
}
.sync-connect-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.sync-connect-title h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.sync-connect-title p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
}
.sync-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
}
.sync-subhead {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.sync-steps {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.sync-step {
  display: grid;
  grid-template-columns: 24px 32px 1fr;
  align-items: start;
  gap: var(--s2);
  padding: var(--s3);
  border-radius: var(--r-card);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text);
}
.sync-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}
.sync-step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--inset);
  color: var(--accent);
}
.sync-step-icon .sync-ico { width: 17px; height: 17px; }
.sync-step-text { padding-top: 4px; }

.sync-note {
  display: flex;
  align-items: flex-start;
  gap: var(--s2);
  padding: var(--s3) var(--s4);
  border-radius: var(--r-card);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-secondary);
}
.sync-note .sync-ico { margin-top: 1px; color: var(--text-muted); }
.sync-note-warn {
  background: rgba(217, 138, 31, 0.10);
  border-color: rgba(217, 138, 31, 0.32);
  color: var(--text);
}
.sync-note-warn .sync-ico { color: #d98a1f; }
.sync-note-error {
  background: rgba(229, 69, 58, 0.10);
  border-color: rgba(229, 69, 58, 0.32);
  color: var(--text);
}
.sync-note-error .sync-ico { color: #e5453a; }

.sync-link-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s2);
}
.sync-link-btn {
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-width: 0;
  padding: var(--s3);
  border-radius: var(--r-card);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}
.sync-link-btn span {
  overflow-wrap: anywhere;
}
.sync-link-btn .sync-ico { color: var(--accent); }
.sync-link-btn.is-pressed { scale: 0.98; }

.sync-token-card {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding: var(--s4);
  border-radius: var(--r-card);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}
.sync-token-card .sync-field-title {
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.sync-token-card .sync-field-title .sync-ico { color: var(--accent); }
.sync-token-card textarea,
.sync-token-card input[type="url"] {
  width: 100%;
  box-sizing: border-box;
  padding: var(--s3);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  font: inherit;
  font-size: 13px;
  color: var(--text);
  resize: vertical;
}
.sync-privacy {
  display: flex;
  align-items: flex-start;
  gap: var(--s2);
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
}
.sync-privacy .sync-ico { color: #10b981; margin-top: 1px; }

/* Перенос по ссылке: предпросмотр найденного плейлиста перед переносом. */
.sync-link-preview {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.sync-link-preview-head {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-width: 0;
}
.sync-link-preview-head .sync-service-text { min-width: 0; }
.sync-link-sample {
  margin: 0;
  padding-left: var(--s5);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

/* Метка сервиса в шапке экрана не должна ужиматься во флекс-строке. */
.sync-connect-head > .sync-service-mark { flex-shrink: 0; }

/* ==========================================================================
   Правки после QA: поиск, карточка исполнителя, медиатека, плеер, главная
   ========================================================================== */

/* Поиск в «Артистах» оформлен как поле поиска приложения */
#artistsDirSearchInput {
  flex: 1;
  width: 100%;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 15px;
}
#artistsDirSearchInput::placeholder { color: var(--text-muted); }

/* Поиск: очистка поля, спиннер загрузки, повтор после ошибки */
.search-clear-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}
.search-clear-btn.is-pressed { opacity: 0.6; }
.search-spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--text);
  animation: searchSpin var(--dur-spin) var(--ease-linear) infinite;
}
@keyframes searchSpin { to { transform: rotate(360deg); } }

/* Ожидание поиска (setSearchPending в app.js): результаты под размытием, один индикатор. */
#searchResultsArea { position: relative; }
#searchResultsArea > :not(.search-pending) {
  transition: filter var(--dur-sheet) var(--ease-sheet), opacity var(--dur-sheet) var(--ease-sheet);
}
#searchResultsArea.is-searching > :not(.search-pending) {
  filter: blur(10px);
  opacity: 0.55;
  pointer-events: none;
}
.search-pending {
  position: absolute;
  left: 50%;
  top: 112px;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-left: -26px;
  border-radius: 50%;
  background: var(--glass-control, rgba(40, 40, 46, 0.7));
  opacity: 0;
  scale: 0.8;
  pointer-events: none;
  transition: opacity var(--dur-micro) var(--ease), scale var(--dur-micro) var(--ease-micro);
}
#searchResultsArea.is-searching .search-pending { opacity: 1; scale: 1; }
.search-artists-skel { display: flex; gap: 14px; overflow: hidden; }
.search-artists-skel .search-artist-card { pointer-events: none; }
.search-artists-skel .nm-skel-art { width: 64px; height: 64px; border-radius: 50%; }
.search-artists-skel i { display: block; width: 52px; height: 10px; border-radius: 5px; background: rgba(255, 255, 255, 0.07); }
/* Мгновенный режим гасит переходы, но размытие ожидания остаётся. */
html[data-motion="instant"] #searchResultsArea.is-searching > :not(.search-pending) { filter: blur(10px); }
.search-retry-btn {
  margin-top: 10px;
  padding: 8px 16px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

/* Прокрутка: над контентом у шапки есть подложка, строки не просвечивают под кнопками */
.artist-nav-bar.is-scrolled {
  background: var(--bg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}
/* Жанр поверх фото читается и в светлой теме */
.artist-eyebrow-badge { background: rgba(0, 0, 0, 0.45); color: #fff; }
/* --------------------------------------------------------------------------
   Страница исполнителя: шаблон карточки автора (как в Apple Music).
   Фото сверху уходит в цвет фона; имя и кнопки по центру; релиз — стеклянная
   карточка; треки без рамок, с разделителями. Цвет фона — --artist-tint
   (доминантный цвет фото, см. renderArtistPage). Блок перекрывает старые правила выше.
   -------------------------------------------------------------------------- */
.ios-artist-page {
  --artist-gutter: 20px;
  /* Шкала заголовков общая; на странице артиста текст всегда белый — задаём
     цвет в том же месте, где шкала его берёт. */
  --text: #fff;
  color: #fff;
  /* Фон — тёмный тон низа фото (--artist-bg, renderArtistPage); без фото — почти чёрный. */
  background: rgb(var(--artist-bg, 14, 14, 16));
  transition: background-color var(--dur-short) var(--ease);
}
/* Отдельный слой под прокручиваемым содержимым, а не под всей навигацией. */
.ios-artist-page.has-artist-ambient::after {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background: var(--artist-artwork) center / cover no-repeat;
  filter: blur(55px) brightness(.28) saturate(1.1);
  animation: album-ambient-drift var(--dur-ambient-slow) var(--ease-breathe) infinite alternate;
}
.ios-artist-page .artist-body-container { position: relative; z-index: 1; }
.ios-artist-page.hidden.has-artist-ambient::after { animation-play-state: paused; }
:root[data-glass="solid"] .ios-artist-page.has-artist-ambient::after { display: none; }
@media (prefers-reduced-motion: reduce) {
  .ios-artist-page.has-artist-ambient::after { animation: none; }
}
html[data-motion="instant"] .ios-artist-page.has-artist-ambient::after { animation: none; }
.ios-artist-page .artist-nav-bar > * { margin-top: calc(var(--tg-header-clearance) + 6px); }
/* «Назад» в Telegram даёт нативная кнопка, поэтому капсула «поделиться» остаётся справа */
.ios-artist-page .artist-nav-actions { margin-left: auto; }
/* При прокрутке шапка и подложка под ней — в тон фото, а не чёрной полосой */
.ios-artist-page .artist-nav-bar.is-scrolled {
  background: none;
  box-shadow: none;
}
/* Затухание под шапкой плавное, на всю высоту, без плотной полосы сверху */
.ios-artist-page::before {
  background: linear-gradient(180deg,
    rgba(var(--artist-tint), 0.9) 0%,
    rgba(var(--artist-tint), 0.5) 55%,
    rgba(var(--artist-tint), 0) 100%);
}
.ios-artist-page .artist-nav-circle-btn,
.ios-artist-page .artist-nav-action-btn {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.18);
  border: none;
}
.ios-artist-page .artist-nav-capsule {
  background: rgba(255, 255, 255, 0.18);
  border: none;
}
.ios-artist-page .artist-nav-capsule .artist-nav-action-btn { width: 52px; }

/* Фото занимает верхнюю часть и растворяется в фоне страницы, без границы */
.ios-artist-page .artist-header-stage {
  margin: 0;
  height: clamp(440px, 60dvh, 560px);
  z-index: 1;
}
/* Маска на обёртке, а не на картинке: параллакс двигает картинку вниз при прокрутке,
   и её нижний край уходил бы за блок. Обёртка неподвижна, а всё за её пределами прозрачно. */
.ios-artist-page .artist-header-img-wrap {
  height: 100%;
  background: transparent;
}
.ios-artist-page.has-artist-ambient .artist-header-img-wrap {
  /* Граница принадлежит самой шапке: движется ровно со скроллом, без опережения. */
  -webkit-mask-image: linear-gradient(to bottom, #000 25%, rgba(0, 0, 0, 0.96) 36%, rgba(0, 0, 0, 0.84) 48%, rgba(0, 0, 0, 0.68) 60%, rgba(0, 0, 0, 0.5) 70%, rgba(0, 0, 0, 0.28) 80%, rgba(0, 0, 0, 0.08) 91%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 25%, rgba(0, 0, 0, 0.96) 36%, rgba(0, 0, 0, 0.84) 48%, rgba(0, 0, 0, 0.68) 60%, rgba(0, 0, 0, 0.5) 70%, rgba(0, 0, 0, 0.28) 80%, rgba(0, 0, 0, 0.08) 91%, transparent 100%);
}
.ios-artist-page.has-artist-ambient .artist-header-veil { display: none; }
.ios-artist-page.has-artist-ambient .artist-header-img {
  filter: blur(calc(var(--veil, 0) * 16px));
}
:root:is([data-glass="lite"], [data-glass="solid"]) .ios-artist-page.has-artist-ambient .artist-header-img { filter: none; }
.ios-artist-page.has-artist-ambient.is-scrolled::before { opacity: 0; }
:root[data-glass="solid"] .ios-artist-page.has-artist-ambient .artist-header-img-wrap {
  -webkit-mask-image: none;
  mask-image: none;
}
:root[data-glass="solid"] .ios-artist-page.has-artist-ambient .artist-header-veil { display: block; }
/* Размытие в цвете фото поверх низа фото, как в Apple Music: не чёрная заливка,
   а фото, размытое и окрашенное в --artist-bg.
   Размытие НАРАСТАЕТ: шесть слоёв (1→32px, каждый вдвое сильнее), каждый виден
   своей полосой, полосы перекрываются. Один слой с маской давал «кирпич» —
   резкое фото сразу переходило в сильно размытое.
   У самой обёртки нет маски и прозрачности намеренно: они отрезали бы слоям
   то, что под ними (backdrop-filter видел бы пустоту). Цвет — в ::after.
   --veil (0…1, app.js) растёт при прокрутке: всё ползёт вверх, пока шапка
   не станет заливкой. */
.ios-artist-page .artist-header-stage { --veil: 0; }
.ios-artist-page .artist-header-veil {
  /* Наверху страницы фото резкое до середины: размытие начинается чуть выше
     названия (оно на ~71% высоты шапки) и набирает полную силу к кнопкам. */
  --veil-top: calc(58% - var(--veil) * 90%);
  --veil-step: 5%;
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.ios-artist-page .artist-header-veil > i {
  --k: 0;
  --a: calc(var(--veil-top) + var(--k) * var(--veil-step));
  position: absolute;
  inset: 0;
  -webkit-backdrop-filter: var(--glass-blur-veil);
  backdrop-filter: var(--glass-blur-veil);
  -webkit-mask-image: linear-gradient(180deg, transparent var(--a),
    #000 calc(var(--a) + var(--veil-step)), #000 calc(var(--a) + 2 * var(--veil-step)),
    transparent calc(var(--a) + 3 * var(--veil-step)));
  mask-image: linear-gradient(180deg, transparent var(--a),
    #000 calc(var(--a) + var(--veil-step)), #000 calc(var(--a) + 2 * var(--veil-step)),
    transparent calc(var(--a) + 3 * var(--veil-step)));
}
.ios-artist-page .artist-header-veil > i:nth-child(1) { --k: 0; --glass-blur-veil: blur(1px); }
.ios-artist-page .artist-header-veil > i:nth-child(2) { --k: 1; --glass-blur-veil: blur(2px); }
.ios-artist-page .artist-header-veil > i:nth-child(3) { --k: 2; --glass-blur-veil: blur(4px); }
.ios-artist-page .artist-header-veil > i:nth-child(4) { --k: 3; --glass-blur-veil: blur(8px); }
.ios-artist-page .artist-header-veil > i:nth-child(5) { --k: 4; --glass-blur-veil: blur(16px); }
/* Последний слой — самый сильный — тянется до низа шапки, без хвоста. */
.ios-artist-page .artist-header-veil > i:nth-child(6) {
  --k: 5;
  --glass-blur-veil: blur(32px) saturate(1.5);
  -webkit-mask-image: linear-gradient(180deg, transparent var(--a), #000 calc(var(--a) + var(--veil-step)));
  mask-image: linear-gradient(180deg, transparent var(--a), #000 calc(var(--a) + var(--veil-step)));
}
/* Цвет фото: нарастает по плавной S-кривой (девять точек) на длинном отрезке
   --fade — до 62% высоты шапки. Короткий последний отрезок давал видимую
   границу «размытое фото | сплошной цвет». Наверху страницы отрезок
   укорачивается до низа шапки: там цвет обязан стать сплошным, иначе будет
   шов со страницей. Каждая точка с прокруткой (--veil²) ещё густеет. */
.ios-artist-page .artist-header-veil::after {
  --fade: min(62%, calc(100% - var(--veil-top)));
  --v2: calc(var(--veil) * var(--veil));
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(var(--artist-bg, 14, 14, 16), calc(0.9 * var(--v2))) var(--veil-top),
    rgba(var(--artist-bg, 14, 14, 16), calc(0.03 + 0.97 * var(--v2))) calc(var(--veil-top) + var(--fade) * 0.12),
    rgba(var(--artist-bg, 14, 14, 16), calc(0.1 + 0.9 * var(--v2))) calc(var(--veil-top) + var(--fade) * 0.25),
    rgba(var(--artist-bg, 14, 14, 16), calc(0.22 + 0.78 * var(--v2))) calc(var(--veil-top) + var(--fade) * 0.38),
    rgba(var(--artist-bg, 14, 14, 16), calc(0.38 + 0.62 * var(--v2))) calc(var(--veil-top) + var(--fade) * 0.5),
    rgba(var(--artist-bg, 14, 14, 16), calc(0.55 + 0.45 * var(--v2))) calc(var(--veil-top) + var(--fade) * 0.62),
    rgba(var(--artist-bg, 14, 14, 16), calc(0.72 + 0.28 * var(--v2))) calc(var(--veil-top) + var(--fade) * 0.75),
    rgba(var(--artist-bg, 14, 14, 16), calc(0.87 + 0.13 * var(--v2))) calc(var(--veil-top) + var(--fade) * 0.88),
    rgb(var(--artist-bg, 14, 14, 16)) calc(var(--veil-top) + var(--fade)));
}
/* Облегчённое и простое стекло: без живого размытия, только цвет. */
:root:is([data-glass="lite"], [data-glass="solid"]) .ios-artist-page .artist-header-veil > i {
  display: none;
}
/* Стекло кнопок шапки — токеном, чтобы режимы качества его выключали. */
.ios-artist-page { --glass-blur-artist-play: blur(3px); }
:root:is([data-glass="lite"], [data-glass="solid"]) .ios-artist-page { --glass-blur-artist-play: none; }
.ios-artist-page .artist-header-img {
  object-position: center 22%;
}
.ios-artist-page .artist-header-gradient {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.22) 0%, transparent 28%);
}
/* Бейдж жанра — пилюля по центру, а не полоса на всю ширину */
.ios-artist-page .artist-header-content {
  left: var(--artist-gutter);
  right: var(--artist-gutter);
  bottom: 14px;
  align-items: center;
  text-align: center;
  gap: 12px;
}
.ios-artist-page .artist-eyebrow-badge {
  align-self: center;
  width: auto;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}
.ios-artist-page .artist-header-title {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-shadow: none;
  text-align: center;
}
#artistHeaderName {
  max-inline-size: 100%;
  overflow-wrap: anywhere;
}
#artistHeaderName[data-title-style="compact"] {
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}
#artistHeaderName[data-title-style="block"] {
  font-family: Impact, "Arial Black", var(--font);
  font-size: 3.75rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}
#artistHeaderName[data-title-style="slant"] {
  font-size: 3.25rem;
  font-style: italic;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}
#artistHeaderName[data-title-style="editorial"] {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.65rem;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}
#artistHeaderName:has(.artist-wordmark-image:not([hidden])) {
  font-size: 0;
  line-height: 1;
  max-inline-size: min(100%, 360px);
}
#artistHeaderName .artist-wordmark-text {
  font-size: 1rem;
}
#artistHeaderName .artist-wordmark-image {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .2));
}
.ios-artist-page .artist-actions-cluster {
  justify-content: center;
  gap: 26px;
  margin-top: 8px;
}
/* Кнопки по краям — тёмные полупрозрачные кружки, значок в цвете фото
   (--artist-accent, renderArtistPage). Обе одинаково яркие: «инфо» не гаснет. */
.ios-artist-page .artist-action-pill-btn {
  width: 50px;
  height: 50px;
  background: color-mix(in srgb, var(--text) 12%, transparent);
  box-shadow: none;
  border: none;
  color: var(--text);
  transition: transform var(--d-fast) var(--ease), background-color var(--d-mid) var(--ease), color var(--d-mid) var(--ease);
}
.ios-artist-page .artist-action-pill-btn svg { width: 24px; height: 24px; }
.ios-artist-page .artist-icon-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ios-artist-page .artist-icon-line circle { fill: currentColor; stroke: none; }
.ios-artist-page #artistBioBtn svg { width: 26px; height: 26px; }
/* Звезда: контур — не в избранном, заливка — в избранном. Цвет тот же. */
.ios-artist-page .artist-star-icon {
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linejoin: round;
  transition: fill var(--d-fast) var(--ease);
}
.ios-artist-page .artist-action-pill-btn.favorited {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 12%, transparent);
  border: none;
}
.ios-artist-page .artist-action-pill-btn.favorited .artist-star-icon { fill: currentColor; }
.ios-artist-page #artistStarBtn.is-popping svg { animation: artist-star-pop var(--dur-short) var(--ease-micro); }
@keyframes artist-star-pop {
  0% { scale: 1; }
  45% { scale: 1.28; }
  100% { scale: 1; }
}
/* Непрозрачный диск сам закрывает размытие везде, кроме выреза. */
.ios-artist-page .artist-hero-play-btn {
  width: 78px;
  height: 78px;
  background: transparent;
  color: rgb(var(--artist-ink, 20, 22, 26));
  box-shadow: none;
  position: relative;
  transition: transform var(--d-fast) var(--ease);
}
.ios-artist-page .artist-hero-play-btn svg {
  width: 100%;
  height: 100%;
  margin: 0;
  position: relative;
}
.artist-play-disc { fill: rgb(var(--artist-accent, 255, 255, 255)); mask: url(#artistPlayCutout); }
.artist-play-pause { display: none; }
.artist-hero-play-btn.is-playing .artist-play-disc { mask: none; }
.artist-hero-play-btn.is-playing .artist-play-pause { display: inline; }
.ios-artist-page .artist-hero-play-btn:not(.is-playing)::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  -webkit-backdrop-filter: var(--glass-blur-artist-play);
  backdrop-filter: var(--glass-blur-artist-play);
}

/* Окно информации: одна существующая поверхность шторки, без вложенного стекла. */
#menuSheet:has(.artist-info-sheet) { padding: 0; }
#menuSheet:has(.artist-info-sheet) > #menuSheetCard {
  max-width: var(--app-max);
  padding: 0;
  border-radius: 28px 28px 0 0;
  background: var(--bg);
  border: 0;
}
#menuSheet:has(.artist-info-sheet) :is(#menuSheetGrabber, #menuSheetCancel) { display: none; }
#menuSheet:has(.artist-info-sheet) .menu-sheet-body { max-height: 85dvh; }
.artist-info-sheet { position: relative; color: var(--text); padding-bottom: calc(var(--s6) + var(--sab)); }
.artist-info-close {
  position: absolute; z-index: 2; top: var(--s4); left: var(--s4);
  width: 44px; height: 44px; border-radius: 50%;
  background: color-mix(in srgb, var(--bg) 55%, transparent); color: var(--text);
  display: grid; place-items: center;
}
.artist-info-photo { height: min(55vh, 420px); position: relative; }
.artist-info-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.artist-info-photo::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, var(--bg)); }
.artist-info-content { position: relative; margin-top: calc(-1 * var(--s6)); padding: 0 var(--s5); }
.artist-info-content h3 { font-size: var(--title-size-hero); margin: 0 0 var(--s4); }
.artist-info-content h4 { font-size: var(--title-size-section); margin: var(--s6) 0 var(--s3); }
.artist-info-content p { color: var(--text-secondary); line-height: 1.5; white-space: pre-wrap; }
.artist-info-label { color: var(--text-muted); margin-bottom: var(--s2); }
.artist-info-genre { display: inline-block; padding: var(--s1) var(--s3); border-radius: var(--r-pill); background: var(--bg-surface-raised); }
.artist-info-facts { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); color: var(--text-secondary); font-size: var(--subtitle-size); }

.artist-heart-morph {
  --dur-artist-heart: calc(var(--dur-ambient-slow) + var(--dur-breathe));
  --artist-tip-dot: path("M9 4C10.1 4 11 4.9 11 6C11 7.1 10.1 8 9 8C7.9 8 7 7.1 7 6C7 4.9 7.9 4 9 4Z");
  --artist-tip-heart: path("M9 1C13 1 17.2 3 16.5 6C15.4 8.1 11.2 11.8 9 13.5C6.8 11.8 2.6 8.1 1.5 6C.8 3 5 1 9 1Z");
}
.artist-heart-assembly, .artist-heart-piece {
  animation: var(--artist-heart-motion) var(--dur-artist-heart) var(--ease-breathe) infinite;
}
.artist-heart-assembly { --artist-heart-motion: artist-heart-beat; transform-origin: center; }
.artist-heart-left { --artist-heart-motion: artist-heart-lobe; --side: 1; }
.artist-heart-right { --artist-heart-motion: artist-heart-lobe; --side: -1; }
.artist-heart-left, .artist-heart-right { transform: translate(calc(12px - 3.8px * var(--side)), 9px) scale(2.4); }
.artist-heart-tip { --artist-heart-motion: artist-heart-tip; clip-path: var(--artist-tip-heart); transform: translate(3px, 6px); }
@keyframes artist-heart-lobe {
  0%, 29%, 78%, 100% { transform: translate(calc(12px - 7px * var(--side)), 12px); }
  34% { transform: translate(calc(12px - 8.5px * var(--side)), 10px) scale(.86); }
  40% { transform: translate(calc(12px - 5.8px * var(--side)), 7.5px) scale(1.62); }
  47%, 64% { transform: translate(calc(12px - 3.8px * var(--side)), 9px) scale(2.4); }
  72% { transform: translate(calc(12px - 7.5px * var(--side)), 9px) scale(1.13); }
}
@keyframes artist-heart-tip {
  0%, 29%, 78%, 100% { clip-path: var(--artist-tip-dot); transform: translate(3px, 6px); }
  34% { clip-path: var(--artist-tip-dot); transform: translate(3px, 8px); }
  47%, 64% { clip-path: var(--artist-tip-heart); transform: translate(3px, 6px); }
  72% { clip-path: var(--artist-tip-dot); transform: translate(3px, 9px); }
}
@keyframes artist-heart-beat {
  0%, 48%, 59%, 100% { transform: scale(1); }
  53% { transform: scale(1.14); }
  56% { transform: scale(.96); }
}
@media (prefers-reduced-motion: reduce) { :is(.artist-heart-assembly, .artist-heart-piece) { animation: none; } }
html[data-motion="instant"] :is(.artist-heart-assembly, .artist-heart-piece) { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .ios-artist-page #artistStarBtn.is-popping svg { animation: none; }
}

/* Релиз: стеклянная карточка, без акцентных цветов */
.ios-artist-page .artist-body-container {
  padding-inline: var(--artist-gutter);
}
.ios-artist-page .artist-featured-wrapper { margin: 26px 0 0; }
.ios-artist-page .artist-release-card {
  gap: 14px;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.14);
  border: none;
}
.ios-artist-page .release-art {
  width: 92px;
  height: 92px;
  border-radius: 14px;
  box-shadow: none;
}
.ios-artist-page .release-meta { gap: 3px; }
.ios-artist-page .release-date {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
  text-transform: none;
}
.ios-artist-page .release-title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.ios-artist-page .release-type { font-size: 15px; color: rgba(255, 255, 255, 0.72); }
.ios-artist-page .release-add-btn {
  width: 40px;
  height: 40px;
  background: transparent;
  color: #fff;
}
.ios-artist-page .release-add-btn svg { width: 24px; height: 24px; }

/* Заголовки секций: крупные, белые, со стрелкой */
.ios-artist-page .artist-section-header { margin: 30px 0 8px; }
.ios-artist-page .artist-section-header .section-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}
.ios-artist-page .artist-section-header .chevron svg { width: 18px; height: 18px; fill: currentColor; }
.ios-artist-page .artist-section-count { font-size: 17px; color: rgba(255, 255, 255, 0.72); }

/* Треки: без карточек, разделитель снизу, название и подзаголовок как в Apple Music */
.ios-artist-page .ios-track-item {
  gap: 14px;
  padding: 10px 0;
  margin: 0;
  background: none;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.ios-artist-page .ios-track-item.is-pressed { scale: 0.985; }
.ios-artist-page .ios-track-item.active-track { background: none; border-color: rgba(255, 255, 255, 0.14); }
/* Текущий трек в списке остаётся с акцентным названием: это состояние, а не часть шаблона */
.ios-artist-page .ios-track-item.active-track .track-name-main span { color: var(--accent); }
.ios-artist-page .ios-track-item .track-cover-sm {
  width: 54px;
  height: 54px;
  border-radius: 8px;
}
.ios-artist-page .track-name-main {
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  gap: 6px;
}
.ios-artist-page .track-artist-sub {
  margin-top: 2px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.72);
}
.ios-artist-page .episode-more-btn { color: #fff; }

/* Альбомы и синглы — те же цвета, что у остального экрана */
.ios-artist-page .artist-album-card img { border: none; box-shadow: none; }
.ios-artist-page .artist-album-title { color: #fff; }
.ios-artist-page .artist-album-year { color: rgba(255, 255, 255, 0.72); }
.ios-artist-page .artist-album-more-tile { color: #fff; background: rgba(255, 255, 255, 0.14); border: none; }

/* Release loading uses the live cards' dimensions, including both caption lines. */
.artist-albums-loading {
  display: flex;
  gap: inherit;
  animation: artist-releases-loading-in var(--dur-micro) var(--ease-audio-player);
}
.artist-album-skeleton { cursor: default; }
.ios-artist-page .artist-album-skeleton-cover {
  background: rgba(255, 255, 255, 0.10);
  border: none;
  box-shadow: none;
}
.artist-album-skeleton :is(.artist-album-title, .artist-album-year) {
  position: relative;
}
.artist-album-skeleton :is(.artist-album-title, .artist-album-year)::before {
  content: "";
  position: absolute;
  inset-block: 25%;
  inset-inline-start: 0;
  width: 70%;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.14);
}
.artist-album-skeleton .artist-album-year::before { width: 42%; }
@keyframes artist-releases-loading-in {
  from { opacity: 0; transform: translateY(var(--s1)); }
  to { opacity: 1; transform: translateY(0); }
}
html[data-motion="instant"] .artist-albums-loading { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .artist-albums-loading { animation: none; }
}

/* Скрытое [hidden] не должно перебиваться display у новых блоков */
.ios-artist-page [hidden] { display: none !important; }

/* Заголовок «Популярные треки» — кнопка, стрелка поворачивается при раскрытии */
.ios-artist-page .artist-section-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: left;
  cursor: pointer;
}
.ios-artist-page .artist-section-toggle .chevron svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  transition: transform var(--d-fast) var(--ease);
}
.ios-artist-page .artist-section-toggle[aria-expanded="true"] .chevron svg { transform: rotate(90deg); }

/* Клипы: 16:9, от нового к старому, горизонтальная лента */
.ios-artist-page .artist-clips-carousel {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
}
.ios-artist-page .artist-clips-carousel::-webkit-scrollbar { display: none; }
.ios-artist-page .artist-clip-card {
  flex: 0 0 240px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  border: none;
  background: none;
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ios-artist-page .artist-clip-art {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}
.ios-artist-page .artist-clip-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ios-artist-page .artist-clip-title {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ios-artist-page .artist-clip-year {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
}

/* Клип в основном плеере: вместо обложки, с теми же кнопками и прогрессом */
.clip-media-host[hidden] { display: none !important; }
.ios-player-modal.clip-mode {
  z-index: 1250; /* выше карточки артиста (1200), под которой плеер и открыли */
}
.ios-player-modal.clip-mode .clip-media-host {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 20px;
  background: #000;
}
.clip-media-host video,
.clip-media-host iframe,
.clip-media-slot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.ios-player-modal.clip-mode .ios-art-stage {
  flex: none !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 8px 0 12px !important;
}
.ios-player-modal.clip-mode #artworkCard,
.ios-player-modal.clip-mode #playerArtist,
.ios-player-modal.clip-mode #trackStarBtn,
.ios-player-modal.clip-mode .player-queue-modes,
.ios-player-modal.clip-mode #prevBtn,
.ios-player-modal.clip-mode #nextBtn,
.ios-player-modal.clip-mode #shuffleBtn,
.ios-player-modal.clip-mode #repeatBtn {
  display: none !important;
}

/* Видео использует тот же транспорт, но собирает его сразу под видео. */
.clip-close-btn, .clip-nav-label, .clip-player-caption, .clip-player-status, .clip-skip-btn { display: none; }
#nowPlayingModal.clip-mode { z-index: 2000; background: #161618; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
#nowPlayingModal.clip-mode .player-album-backdrop { opacity: .22; }
#nowPlayingModal.clip-mode .player-modal-nav {
  flex: 0 0 auto; height: calc(var(--tg-header-clearance) + 44px); margin: 0;
  padding: var(--tg-header-clearance) var(--s5) 0; justify-content: center;
}
#nowPlayingModal.clip-mode .player-modal-grabber { display: none; }
#nowPlayingModal.clip-mode .clip-close-btn {
  display: grid; place-items: center; position: absolute; left: var(--s5);
  bottom: 0; width: 40px; height: 40px; border: 0; border-radius: 50%;
  color: #fff; background: rgba(255,255,255,.12); cursor: pointer;
}
#nowPlayingModal.clip-mode .clip-close-btn svg { width: 22px; height: 22px; }
#nowPlayingModal.clip-mode .clip-nav-label {
  display: block; color: rgba(255,255,255,.64); font-size: 11px;
  font-weight: 700; letter-spacing: .08em;
}
#nowPlayingModal.clip-mode .player-modal-scroll-body {
  position: relative; inset: auto; translate: none; flex: 0 0 auto; min-height: 0;
  width: 100%; max-width: 600px; height: auto; margin: 0 auto;
  padding: var(--s4) var(--s5) 0; gap: var(--s4); overflow: visible;
  mask-image: none; -webkit-mask-image: none;
}
#nowPlayingModal.clip-mode .ios-art-stage { width: 100%; padding: 0 !important; }
#nowPlayingModal.clip-mode .clip-media-host { min-width: 200px; min-height: 200px; border-radius: var(--r-card); }
#nowPlayingModal.clip-mode .ios-track-meta { margin: 0; align-items: flex-start; }
#nowPlayingModal.clip-mode .ios-track-text { flex: 1; min-width: 0; }
#nowPlayingModal.clip-mode .ios-track-actions { display: flex; padding: 0; gap: 0; align-self: center; }
#nowPlayingModal.clip-mode #trackMoreBtn {
  display: flex; width: 44px; height: 44px; margin-right: -6px;
  background: none; border: 0; box-shadow: none;
}
#nowPlayingModal.clip-mode #trackMoreBtn svg { width: 26px; height: 26px; }
#nowPlayingModal.clip-mode .player-dock-cell:disabled { opacity: .3; cursor: default; }
#nowPlayingModal.clip-mode .ios-track-title {
  font-size: var(--title-size-section); line-height: 1.2; white-space: normal;
  overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; overflow: hidden;
}
#nowPlayingModal.clip-mode .clip-player-caption { display: block; margin: var(--s1) 0 0; color: rgba(255,255,255,.64); font-size: var(--subtitle-size); }
#nowPlayingModal.clip-mode .clip-player-status:not(:empty) { display: block; margin: var(--s2) 0 0; color: rgba(255,255,255,.74); font-size: var(--subtitle-size); }
#nowPlayingModal.clip-mode .player-fixed-controls {
  position: relative; inset: auto; translate: none; flex: 0 0 auto;
  width: calc(100% - 40px); max-width: 560px; height: auto;
  margin: var(--s5) auto 0; grid-template-rows: auto 68px auto; gap: var(--s3);
}
#nowPlayingModal.clip-mode .player-fixed-controls .ios-controls-cluster { justify-content: center; gap: clamp(28px, 10vw, 56px); }
#nowPlayingModal.clip-mode .clip-skip-btn { display: grid; place-items: center; width: 48px; height: 48px; border: 0; background: transparent; color: rgba(255,255,255,.78); cursor: pointer; }
#nowPlayingModal.clip-mode .clip-skip-btn svg { width: 30px; height: 30px; }
#nowPlayingModal.clip-mode .clip-skip-btn text { fill: currentColor; font-size: 9px; font-weight: 700; }
#nowPlayingModal.clip-mode #playBtn { width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.14); }
#nowPlayingModal.clip-mode .player-fixed-controls #playBtn svg { width: 34px; height: 34px; }
#nowPlayingModal.clip-mode #playBtn { display: grid; place-items: center; }
#nowPlayingModal.clip-mode #playBtn :is(#playIcon, #pauseIcon, #playBtnSpinner) { grid-area: 1 / 1; }
#nowPlayingModal.clip-mode #playBtn :is(#playIcon, #pauseIcon) {
  display: block !important; margin: 0; pointer-events: none;
  opacity: 1; transform: scale(1);
  transition: opacity var(--dur-release) var(--ease-move), transform var(--dur-move) var(--ease-settle);
}
#nowPlayingModal.clip-mode #playBtn :is(#playIcon, #pauseIcon).hidden {
  opacity: 0; transform: scale(.72);
}
#nowPlayingModal.clip-mode #playBtn.is-buffering :is(#playIcon, #pauseIcon) {
  opacity: 0; transition: none;
}
#nowPlayingModal.clip-mode .ios-modal-volume-row { display: flex; }
#nowPlayingModal.clip-mode #volumeSlider::-webkit-slider-thumb {
  width: 1px; height: 6px; margin-top: 0; box-shadow: none; background: transparent;
}
#nowPlayingModal.clip-mode #volumeSlider::-moz-range-thumb {
  width: 1px; height: 6px; border: 0; box-shadow: none; background: transparent;
}

#nowPlayingModal.clip-mode :is(.clip-close-btn, .clip-skip-btn, #playBtn):focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Портретный экран клипа: композиция по референсу владельца 18.11. */
@media (orientation: portrait) {
  #nowPlayingModal.clip-mode { background: #000; }
  #nowPlayingModal.clip-mode .player-album-backdrop { display: none; }
  #nowPlayingModal.clip-mode .player-modal-nav {
    position: absolute; inset: 0 0 auto; height: 0; padding: 0; z-index: 4;
  }
  #nowPlayingModal.clip-mode .clip-close-btn {
    left: 50%; top: max(48px, calc(var(--sat) + 7px)); bottom: auto;
    transform: translateX(-50%); width: 80px; height: 32px; background: transparent;
  }
  #nowPlayingModal.clip-mode .clip-close-btn::before {
    content: ""; width: 60px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.36);
  }
  #nowPlayingModal.clip-mode .clip-close-btn svg, #nowPlayingModal.clip-mode .clip-nav-label { display: none; }
  #nowPlayingModal.clip-mode .player-modal-scroll-body {
    display: flex; flex-direction: column; flex: 1 0 auto; justify-content: flex-end;
    width: 100%; max-width: none; min-height: 0; height: 60dvh;
    padding: 0 32px 20px; gap: 0;
  }
  #nowPlayingModal.clip-mode .ios-art-stage {
    position: absolute; top: 0; left: 0; width: 100%; height: 53dvh !important;
    display: flex; align-items: center; justify-content: center;
  }
  #nowPlayingModal.clip-mode .clip-media-host {
    width: 100%; max-width: 700px; min-width: 200px; min-height: 200px; border-radius: 0;
  }
  #nowPlayingModal.clip-mode .ios-track-meta { width: 100%; min-height: 58px; padding: 0; }
  #nowPlayingModal.clip-mode .ios-track-title {
    font-size: 20px; font-weight: 700; line-height: 24px; letter-spacing: -.025em;
    display: block; white-space: nowrap; text-overflow: ellipsis;
  }
  #nowPlayingModal.clip-mode .clip-player-caption {
    margin-top: 3px; color: rgba(255,255,255,.65); font-size: 20px; line-height: 25px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  #nowPlayingModal.clip-mode .player-fixed-controls {
    flex: 0 0 34dvh; width: auto; max-width: none; margin: 0 32px;
    padding: 0 0 calc(8px + var(--sab)); display: grid;
    grid-template-rows: 40px minmax(64px, 1fr) 40px 48px; gap: 12px;
  }
  #nowPlayingModal.clip-mode .player-fixed-controls > * { margin: 0; padding: 0; }
  #nowPlayingModal.clip-mode .player-fixed-controls .ios-controls-cluster {
    display: grid; grid-template-columns: repeat(3, 1fr); justify-items: center; gap: 0;
  }
  #nowPlayingModal.clip-mode :is(.clip-skip-btn, #playBtn) {
    width: 64px; height: 64px; padding: 0; border: 0; background: none; box-shadow: none; color: #fff;
  }
  #nowPlayingModal.clip-mode .clip-skip-btn svg { width: 38px; height: 38px; }
  #nowPlayingModal.clip-mode .player-fixed-controls #playBtn svg { width: 48px; height: 48px; }
  #nowPlayingModal.clip-mode .ios-slider-track { height: 7px; background: rgba(255,255,255,.18); }
  #nowPlayingModal.clip-mode .ios-slider-fill { background: rgba(255,255,255,.65); }
  #nowPlayingModal.clip-mode .ios-time-row { margin-top: 11px; color: rgba(255,255,255,.48); font-size: 12px; }
  #nowPlayingModal.clip-mode :is(.vol-icon, .vol-icon-btn) { color: rgba(255,255,255,.55); }
  @media (max-height: 740px) {
    #nowPlayingModal.clip-mode .player-modal-scroll-body { height: 57dvh; }
    #nowPlayingModal.clip-mode .ios-art-stage { height: 49dvh !important; }
    #nowPlayingModal.clip-mode .player-fixed-controls { flex-basis: 38dvh; gap: 8px; }
  }
  @media (max-width: 350px) {
    #nowPlayingModal.clip-mode .player-modal-scroll-body { padding-inline: 24px; }
    #nowPlayingModal.clip-mode .player-fixed-controls { margin-inline: 24px; }
  }
}


/* Похожие артисты: круглые аватары в ленте внизу страницы */
.ios-artist-page .artist-related-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}
.ios-artist-page .artist-related-row::-webkit-scrollbar { display: none; }
.ios-artist-page .artist-related-card {
  flex: 0 0 96px;
  width: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: none;
  background: none;
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.ios-artist-page .artist-related-card img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.12);
}
.ios-artist-page .artist-related-name {
  width: 100%;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Кнопка «•••» у строки: зона нажатия не меньше 32 px, сама иконка прежняя */
.episode-more-btn {
  min-width: 32px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.artist-library-more {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

/* Медиатека: название подэкрана не уходит под кнопки справа */
.subview-nav-right-slot { flex: 0 0 auto; }

/* Плеер: кнопка громкости с нормальной зоной нажатия */
.vol-icon-btn {
  min-width: 32px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Главная: ссылка «Все артисты» с нормальной высотой нажатия */
#homeOpenAllArtistsBtn { min-height: 32px; }

/* Карточки на div с ролью кнопки: видно фокус с клавиатуры */
[role="button"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   OFFLINE: скачанная музыка и режим «играть с устройства»
   -------------------------------------------------------------------------- */
.offline-mode-card {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-shelf);
}
.offline-mode-text {
  flex: 1 1 auto;
  min-width: 0;
}
.offline-mode-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.offline-mode-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-secondary);
}
.offline-usage {
  margin: var(--s4) 0 var(--s3);
  font-size: 12px;
  color: var(--text-muted);
}
.offline-actions {
  display: flex;
  gap: var(--s3);
  margin-bottom: var(--s4);
}
.offline-track-list {
  display: flex;
  flex-direction: column;
}
.offline-row {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
}
.offline-row:last-child {
  border-bottom: 0;
}
.offline-row-thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  flex: 0 0 auto;
  background: var(--inset);
}
.offline-row-info {
  flex: 1 1 auto;
  min-width: 0;
}
.offline-row-title,
.offline-row-artist {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.offline-row-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.offline-row-artist {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-secondary);
}
.offline-row-remove {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
}
.offline-row-remove.is-pressed {
  background: var(--bg-card-active);
}
.offline-hint {
  margin: var(--s5) 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-muted);
  text-align: center;
}
/* Включённое состояние строки шторки: таймер сна, плавный переход. */
.sheet-action-row.is-downloaded svg {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   РАСПОЗНАННЫЕ
   -------------------------------------------------------------------------- */
.recognize-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s3);
  padding: var(--s5) var(--s4);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-shelf);
  text-align: center;
}
.recognize-btn {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-gradient);
  color: var(--accent-on);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  transition: transform var(--d-fast) var(--ease);
}
.recognize-btn.is-pressed {
  scale: 0.94;
}
.recognize-btn.is-listening::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: recognize-pulse var(--dur-pulse) var(--ease) infinite;
}
.recognize-btn:disabled {
  opacity: 0.6;
}
@keyframes recognize-pulse {
  from { transform: scale(0.9); opacity: 0.9; }
  to { transform: scale(1.35); opacity: 0; }
}
.recognize-status {
  font-size: 14px;
  color: var(--text);
  min-height: 20px;
}
.recognize-progress {
  width: 60%;
  height: 4px;
  border-radius: 2px;
  background: var(--bg-card-active);
  overflow: hidden;
}
.recognize-progress-fill {
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--dur-release) var(--ease-linear);
}
.recognize-file {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: underline;
  cursor: pointer;
}
.offline-row-date {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--text-muted);
}
.recognized-row-new .offline-row-title {
  color: var(--accent);
}

/* Распознавание по ссылке на ролик: бот сам скачивает звук Reels/TikTok/Shorts. */
.recognize-link {
  display: flex;
  gap: var(--s2);
  width: 100%;
}
.recognize-link-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card-active);
  color: var(--text);
  font-size: 14px;
}
.recognize-link-input::placeholder {
  color: var(--text-muted);
}
.recognize-link-btn {
  flex: 0 0 auto;
}
.recognize-link-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   СОВПАДЕНИЕ ВКУСОВ
   -------------------------------------------------------------------------- */
.match-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  word-break: break-all;
}
.match-share-btn {
  flex: 0 0 auto;
  padding: 8px 18px;
}
.match-hint {
  text-align: left;
  margin: var(--s3) 0 var(--s4);
}
.match-input-row {
  display: flex;
  gap: var(--s2);
}
.match-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--glass-border);
  background: var(--glass-card);
  color: var(--text);
  font-size: 13px;
}
.match-input-row .playlist-btn-secondary {
  flex: 0 0 auto;
}
.match-result {
  margin-top: var(--s5);
}
.match-score {
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  color: var(--accent);
}
.match-score-bar {
  height: 6px;
  margin: var(--s3) 0;
  border-radius: 3px;
  background: var(--bg-card-active);
  overflow: hidden;
}
.match-score-fill {
  height: 100%;
  width: 100%;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--dur-player) var(--ease);
}
.match-partner {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
}
.match-approx {
  margin: var(--s3) 0;
  padding: var(--s2) var(--s3);
  border-radius: var(--r-shelf);
  background: var(--inset);
  font-size: 12px;
  color: var(--text-secondary);
}
.match-artists {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: var(--s3) 0 var(--s4);
  justify-content: center;
}
.match-chip {
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--bg-card-active);
  font-size: 12px;
  color: var(--text);
}

/* --------------------------------------------------------------------------
   СОВМЕСТНЫЙ ДОСТУП: бейдж у плейлиста
   -------------------------------------------------------------------------- */
.collab-note {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Главная: крупный заголовок, аватар справа в строке заголовка, большие карточки миксов (как в Apple Music). */
#homeTab .ios-page-title-row {
  align-items: center;
  padding: 8px 0 18px;
}
#homeTab .ios-large-title {
  font-size: var(--title-size-hero);
  letter-spacing: var(--title-track-hero);
}
#homeTab #homeGreetingSub {
  display: none;
}
#homeTab #homeUserAvatar {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  margin-left: auto;
  font-size: 14px;
}
#homeTab .ios-shelf-section {
  margin-top: 30px;
}
#homeTab .shelf-header {
  align-items: flex-end;
  margin-bottom: 12px;
}
#homeTab .shelf-title {
  font-size: var(--title-size-section);
  letter-spacing: var(--title-track-section);
}
/* Миксы, медиатека, поиск: те же масштабы, что на главной. */
:is(#mixesTab, #libraryTab, #searchTab) .ios-page-title-row {
  align-items: center;
  padding: 8px 0 18px;
}
:is(#mixesTab, #libraryTab, #searchTab) .ios-large-title {
  font-size: var(--title-size-hero);
  letter-spacing: var(--title-track-hero);
}
:is(#mixesTab, #libraryTab, #searchTab) .ios-page-title-row > .ios-circle-avatar {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  margin-left: auto;
  font-size: 14px;
}
:is(#mixesTab, #libraryTab, #searchTab) .ios-shelf-section {
  margin-top: 30px;
}
:is(#mixesTab, #libraryTab, #searchTab) .shelf-header {
  align-items: flex-end;
  margin-bottom: 12px;
}
:is(#mixesTab, #libraryTab, #searchTab) .shelf-title {
  font-size: var(--title-size-section);
  letter-spacing: var(--title-track-section);
}

#mixesTab #mixesAlbumsContainer .mix-card {
  flex: 0 0 min(72vw, 260px);
  width: min(72vw, 260px);
}
#mixesTab #mixesAlbumsContainer .mix-art-wrap,
#mixesTab #mixesAlbumsContainer .mix-art-wrap img {
  width: 100%;
  height: auto;
  border-radius: 18px;
}
#mixesTab #mixesAlbumsContainer .mix-card-name {
  font-size: 17px;
}
#mixesTab #mixesAlbumsContainer .mix-card-sub {
  font-size: 13px;
}

/* Вложенные экраны медиатеки: крупный заголовок слева под кнопками, плоские строки с разделителями. */
.ios-subview .ios-subview-nav {
  flex-wrap: nowrap;
}
.ios-subview .subview-nav-title {
  order: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--title-size-hero);
  font-weight: 700;
  letter-spacing: var(--title-track-hero);
  line-height: var(--title-line-hero);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ios-subview .subview-nav-right-slot {
  margin-left: auto;
}
.ios-subview .ios-playlists-catalog-list {
  gap: 0;
}
.ios-subview .playlist-catalog-item {
  padding: 12px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
}
.ios-subview .playlist-catalog-art {
  width: 56px;
  height: 56px;
  border-radius: 12px;
}
.ios-subview .playlist-catalog-title {
  font-size: 17px;
  font-weight: 600;
}
.ios-subview .playlist-catalog-sub {
  font-size: 14px;
}

/* Промо на главной: карточка как в референсе, цвета из темы приложения. */
#homeTab .home-promo-card {
  margin-top: 4px;
  padding: 18px;
  border-radius: 22px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}
#homeTab .home-promo-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
#homeTab .home-promo-icon {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
#homeTab .home-promo-icon svg {
  width: 28px;
  height: 28px;
}
#homeTab .home-promo-text {
  flex: 1 1 auto;
  margin: 2px 0 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}
#homeTab .home-promo-close {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: var(--bg-surface-raised);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}
#homeTab .home-promo-action {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  border: 0;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 17px;
  font-weight: 600;
}


/* Плейлисты, плейлист и артисты — карточные экраны по референсу, цвета из темы приложения. */
.subview-brand { padding: 6px 0 0; min-height: 0; }
#playlistsOverviewView .ios-subview-nav,
#artistsDirectoryView .ios-subview-nav,
#playlistsDetailView .ios-subview-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: calc(var(--tg-header-clearance) + 6px);
  background: transparent;
}
#playlistsOverviewView .ios-subview-nav.is-scrolled,
#artistsDirectoryView .ios-subview-nav.is-scrolled,
#playlistsDetailView .ios-subview-nav.is-scrolled {
  background: var(--scroll-header-fade);
}
#playlistsOverviewView .subview-nav-title,
#artistsDirectoryView .subview-nav-title {
  font-size: var(--title-size-hero);
  font-weight: 700;
  letter-spacing: var(--title-track-hero);
  line-height: var(--title-line-hero);
}
#playlistsOverviewView .subview-nav-right-slot {
  background: transparent;
  border-radius: 0;
  padding: 0;
}
#playlistsOverviewView .subview-nav-circle-btn {
  width: 40px;
  height: 40px;
  background: var(--bg-surface-raised);
  border: 0;
}

/* Поиск в каталогах: одна пилюля на всю ширину. */
.dir-search-wrap { margin: 0 0 var(--s3); }
.dir-search-pill {
  height: 44px;
  margin: 0;
  padding: 0 16px;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  background: var(--bg-surface-raised);
}
.dir-search-pill:focus-within { border: 0; box-shadow: 0 0 0 3px var(--accent-soft); }
.dir-search-pill .search-lens-icon { width: 18px; height: 18px; flex: 0 0 auto; color: var(--text-secondary); }
.dir-search-pill input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font-size: 16px;
}
.dir-search-pill input::placeholder { color: var(--text-muted); }

/* Каталог плейлистов: карточка с обложкой слева и вертикальным меню справа. */
#playlistsOverviewView .ios-playlists-catalog-list { gap: 12px; margin-top: 0; }
#playlistsOverviewView .playlist-catalog-item {
  position: relative;
  min-height: 0;
  padding: 4px;
  gap: 16px;
  background: var(--bg-surface-raised);
  border: 0;
  border-radius: 20px;
}
#playlistsOverviewView .playlist-catalog-item::after { content: none; }
#playlistsOverviewView .playlist-catalog-art {
  width: 88px;
  height: 88px;
  flex: 0 0 auto;
  border-radius: 16px;
  box-shadow: none;
}
#playlistsOverviewView .playlist-catalog-info { gap: 4px; padding-right: 4px; }
#playlistsOverviewView .playlist-catalog-title { font-size: 18px; font-weight: 700; }
#playlistsOverviewView .playlist-catalog-sub { font-size: 14px; color: var(--text-secondary); }
#playlistsOverviewView .playlist-catalog-more {
  width: 40px;
  height: 40px;
  margin-right: 6px;
  background: transparent;
  color: var(--text-secondary);
}

/* Место для отметки раскрывается вместе с содержимым карточки. */
#playlistsOverviewView .playlist-catalog-item .select-mark {
  display: flex;
  box-sizing: border-box;
  flex: 0 0 0;
  width: 0;
  margin: 0 -16px 0 0;
  opacity: 0;
  transform: scale(.65);
  pointer-events: none;
  transition: flex-basis var(--d-mid) var(--ease), width var(--d-mid) var(--ease),
    margin var(--d-mid) var(--ease), opacity var(--d-mid) var(--ease),
    transform var(--d-mid) var(--ease), background var(--d-fast) var(--ease),
    border-color var(--d-fast) var(--ease);
}
#playlistsOverviewView .is-selecting .playlist-catalog-item:not([data-id="favorites"]) .select-mark {
  flex-basis: 22px;
  width: 22px;
  margin-left: 10px;
  margin-right: 0;
  opacity: 1;
  transform: scale(1);
}
#playlistsOverviewView .is-selecting .playlist-catalog-item[data-id="favorites"] {
  opacity: .55;
}
#playlistsOverviewView .is-selecting .playlist-catalog-item.is-selected {
  background: var(--accent-soft);
}

/* Шапка плейлиста: назад слева, название при прокрутке, меню справа. */
.playlist-back-btn {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.playlist-back-btn svg { width: 22px; height: 22px; fill: currentColor; }
#playlistsDetailView .playlist-top-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--title-size-nav);
  font-weight: 700;
  letter-spacing: var(--title-track-nav);
  line-height: var(--title-line-nav);
  text-align: center;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease);
}
/* Название в верхней панели не показываем: при прокрутке оно ложилось поверх обложки (14.11). */
#playlistsDetailView .playlist-top-nav .subview-nav-right-slot {
  background: transparent;
  border-radius: 0;
  padding: 0;
}
#playlistsDetailView .playlist-top-nav .subview-nav-circle-btn {
  width: 40px;
  height: 40px;
  background: var(--bg-surface-raised);
  border: 0;
  color: var(--text);
}

/* Карточка плейлиста: обложка по центру, серая подпись, персиковая «Слушать». */
#playlistsDetailView .playlist-stage-header { padding: 4px 0 var(--s4); }
#playlistsDetailView .playlist-art-stage {
  width: min(46vw, 190px);
  height: min(46vw, 190px);
  margin: 0 auto 18px;
}
#playlistsDetailView .playlist-art-wrap {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}
#playlistsDetailView .playlist-art-glow { opacity: 0; }
#playlistsDetailView .playlist-hero-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
}
#playlistsDetailView .playlist-hero-sub {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 18px;
}
#playlistsDetailView .playlist-action-dual-buttons { max-width: none; gap: 12px; }
#playlistsDetailView .playlist-btn-primary {
  background: var(--accent-fill);
  color: var(--accent-on);
  border: 0;
  border-radius: 999px;
  padding: 13px 16px;
  font-size: 16px;
  font-weight: 600;
}
#playlistsDetailView .playlist-btn-secondary {
  background: var(--bg-surface-raised);
  color: var(--text);
  border: 0;
  border-radius: 999px;
  padding: 13px 16px;
  font-size: 16px;
  font-weight: 600;
}

/* Треки плейлиста: плоские строки без разделителей, длительность и вертикальное меню. */
#playlistsDetailView .ios-track-item {
  min-height: 0;
  padding: 7px 0;
  gap: 12px;
  margin-bottom: 0;
  background: transparent;
  border-radius: 12px;
  border: 0;
  box-shadow: none;
}
#playlistsDetailView .ios-track-scroll-area {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
#playlistsDetailView .track-cover-sm {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 10px;
  border: 0;
  box-shadow: none;
}
#playlistsDetailView .track-name-main { font-size: 16px; font-weight: 600; }
#playlistsDetailView .track-artist-sub { font-size: 14px; color: var(--text-secondary); }
#playlistsDetailView .track-duration {
  flex: 0 0 auto;
  font-size: 14px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
#playlistsDetailView .track-item-more-btn { width: 36px; height: 36px; color: var(--text-secondary); }
/* Ручки переноса видны только в режиме «Выбрать». */
#trackList .track-drag-handle { display: none; }
#trackList.is-selecting .track-drag-handle { display: flex; }

/* Артисты: тем же списком, что и плейлисты — плоские строки, фото 80×80,
   разделитель начинается от текста, справа тонкий шеврон. */
#artistsDirectoryView .ios-artists-directory-list { gap: 0; }
#artistsDirectoryView .artist-dir-row {
  position: relative;
  min-height: 0;
  padding: 7px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  justify-content: flex-start;
}
#artistsDirectoryView .artist-dir-row::after {
  content: "";
  position: absolute;
  left: 94px;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--line-soft);
}
#artistsDirectoryView .artist-dir-row:last-child::after { content: none; }
#artistsDirectoryView .artist-dir-left { flex: 1 1 auto; gap: 14px; }
#artistsDirectoryView .artist-dir-avatar {
  width: 80px;
  height: 80px;
  flex: 0 0 80px;
  border-radius: 9px;
  border: 0;
  background: var(--bg-surface-raised);
}
#artistsDirectoryView .artist-dir-name { font-size: 19px; font-weight: 500; letter-spacing: -0.015em; }
#artistsDirectoryView .artist-dir-chevron {
  width: 9px;
  height: 15px;
  margin: 0 6px 0 4px;
  color: var(--text-muted);
}
#artistsDirectoryView .artist-dir-chevron svg { width: 9px; height: 15px; fill: none; }
/* Заголовок того же размера и веса, что «Плейлисты». */
#artistsDirectoryView .ios-subview-nav .subview-nav-title {
  font-size: var(--title-size-hero);
  font-weight: 700;
  letter-spacing: var(--title-track-hero);
  line-height: var(--title-line-hero);
}

/* Закреплённый плейлист: значок рядом с названием в списке медиатеки. */
.playlist-pin-mark {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  color: var(--accent);
  vertical-align: middle;
}
.playlist-pin-mark svg {
  width: 13px;
  height: 13px;
}

/* Replay: месяцы, заголовок-предложение и карточки топ-артистов месяца. */
/* Статистика: годовая сводка карточками, как в референсе. */
.replay-top-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: calc(var(--tg-header-clearance) + 6px);
  background: transparent;
}
.replay-top-nav.is-scrolled { background: var(--scroll-header-fade); }
.replay-top-nav .subview-nav-title {
  font-size: var(--title-size-hero);
  font-weight: 700;
  letter-spacing: var(--title-track-hero);
  line-height: var(--title-line-hero);
  text-align: left;
}
.replay-year-row { display: flex; justify-content: center; margin: 2px 0 18px; }
.replay-wrapped-link { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; margin: 0 0 16px; padding: 16px 18px; border: 1px solid var(--border-color, rgba(255,255,255,.08)); border-radius: 20px; background: var(--bg-surface-raised); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.replay-wrapped-copy { display: flex; flex-direction: column; gap: 4px; }
.replay-wrapped-copy strong { font-size: 17px; }
.replay-wrapped-copy span { color: var(--text-secondary); font-size: 13px; }
.replay-wrapped-link svg { width: 20px; height: 20px; flex: none; color: var(--text-secondary); }
.replay-year-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--bg-surface-raised);
  color: var(--text);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--d-fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.replay-year-pill.is-pressed { background: var(--bg-card-hover); }
.replay-year-pill svg { width: 14px; height: 14px; color: var(--text-secondary); }
.replay-summary-card {
  display: flex;
  flex-direction: column;
  padding: 6px 18px;
  border-radius: 24px;
  background: var(--bg-surface-raised);
  margin-bottom: 26px;
}
.replay-summary-row { display: flex; align-items: center; gap: 16px; padding: 16px 0; }
.replay-summary-row > svg { width: 26px; height: 26px; flex: 0 0 auto; color: var(--text); }
.replay-summary-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 auto; }
.replay-summary-label { font-size: 15px; color: var(--text-secondary); }
.replay-summary-value { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
.replay-summary-divider { height: 1px; background: var(--line-soft); margin-left: 42px; }
.replay-top-header { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.replay-section-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
}
.replay-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  padding: 6px 0;
  color: var(--text-secondary);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.replay-all-btn svg { width: 8px; height: 13px; }
.replay-artists { display: flex; flex-direction: column; gap: 12px; }
.replay-artist-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 18px;
  background: var(--bg-surface-raised);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background var(--d-fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}
.replay-artist-card.is-pressed { background: var(--bg-card-hover); }
.replay-artist-avatar {
  width: 60px;
  height: 60px;
  flex: 0 0 auto;
  border-radius: 12px;
  object-fit: cover;
  background: var(--inset);
}
.replay-artist-copy { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.replay-artist-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.replay-artist-sub { font-size: 14px; color: var(--text-secondary); }
.replay-artist-card .profile-chevron { width: 9px; height: 15px; flex: 0 0 auto; color: var(--text-secondary); margin-right: 8px; }
.replay-artist-rank {
  width: 24px;
  flex: 0 0 auto;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-secondary);
}
.replay-all-list { display: flex; flex-direction: column; gap: 8px; }

/* Очередь — самостоятельный вид плеера; прокручивается только список. */
.ios-player-modal .player-queue-container,
.ios-player-modal .player-queue-modes { display: none; }
.ios-player-modal.queue-mode .player-modal-nav {
  min-height: calc(44px + var(--tg-header-clearance));
  padding: 0;
}
.ios-player-modal.queue-mode .player-modal-scroll-body {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  grid-template-rows: 76px 44px minmax(80px, 1fr) auto 76px 24px 44px;
  column-gap: 16px;
  row-gap: 16px;
  width: 100%;
  max-width: 600px;
  align-self: center;
  margin: 0;
  padding: 12px 24px max(20px, var(--sab));
  overflow: hidden;
  -webkit-mask-image: none;
  mask-image: none;
}
.ios-player-modal.queue-mode .ios-art-stage {
  grid-area: 1 / 1;
  padding: 0;
  align-self: start;
}
.ios-player-modal.queue-mode .ios-art-card {
  width: 76px;
  height: 76px;
  border-radius: 12px;
  box-shadow: none;
}
.ios-player-modal.queue-mode .ios-track-meta {
  grid-area: 1 / 2;
  margin: 0;
  gap: 8px;
}
.ios-player-modal.queue-mode .ios-track-title { font-size: 18px; }
.ios-player-modal.queue-mode .ios-track-artist { font-size: 15px; }
.ios-player-modal.queue-mode .ios-track-actions { gap: 8px; }
.ios-player-modal.queue-mode .track-circle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.ios-player-modal.queue-mode .track-circle-btn svg { width: 23px; height: 23px; }
.ios-player-modal.queue-mode .player-queue-modes {
  grid-area: 2 / 1 / 3 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.ios-player-modal.queue-mode .player-queue-modes .ios-icon-btn {
  width: 100%;
  height: 44px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.13);
  color: #fff;
}
.ios-player-modal.queue-mode .player-queue-modes .ios-icon-btn.active {
  background: rgba(255,255,255,.88);
  color: rgb(var(--tint));
}
.ios-player-modal.queue-mode .player-queue-modes .ios-icon-btn.active::after { content: none; }
.ios-player-modal.queue-mode .player-queue-modes .repeat-badge {
  top: 9px;
  right: calc(50% - 24px);
}
.ios-player-modal.queue-mode .player-queue-container {
  grid-area: 3 / 1 / 4 / -1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
}
.ios-player-modal.queue-mode .player-queue-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin: 0 0 14px;
  flex: 0 0 auto;
}
.ios-player-modal.queue-mode .player-queue-title {
  grid-area: 1 / 1;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.ios-player-modal.queue-mode .player-queue-list {
  position: relative;
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 20px;
  -webkit-mask-image: linear-gradient(#000 calc(100% - 20px), transparent);
  mask-image: linear-gradient(#000 calc(100% - 20px), transparent);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.25) transparent;
}
.ios-player-modal.queue-mode .player-queue-list .ios-track-item {
  flex: 0 0 auto;
  min-height: 72px;
  gap: 8px;
  padding: 8px 0;
  margin: 0;
  background: none;
  border: 0;
  border-radius: 10px;
}
.queue-track-select {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: 16px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  padding: 0;
  cursor: pointer;
}
.ios-player-modal.queue-mode .player-queue-list .track-cover-sm {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  box-shadow: none;
  border: 0;
}
.ios-player-modal.queue-mode .player-queue-list .track-name-main {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.25;
}
.ios-player-modal.queue-mode .player-queue-list .track-artist-sub {
  font-size: 15px;
  line-height: 1.3;
  color: rgba(255,255,255,.72);
}
.ios-player-modal.queue-mode .player-queue-list .track-drag-handle {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  padding: 0;
  color: rgba(255,255,255,.48);
  cursor: grab;
  touch-action: none;
}
.ios-player-modal.queue-mode .track-drag-handle svg { width: 23px; height: 16px; }
.ios-player-modal.queue-mode .player-queue-list .is-dragging {
  background: rgba(255,255,255,.06);
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  opacity: 1;
}
.ios-player-modal.queue-mode .player-queue-list .queue-drag-origin { opacity: 0; }
/* Поднятая строка: сплошная плашка цвета плеера чуть светлее (сквозь
   полупрозрачную раньше просвечивали тексты расступающихся строк) и тень.
   Позиция — через translate (композитор), подъём и посадка — переходами. */
.ios-player-modal.queue-mode .player-queue-list .queue-drag-ghost {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  margin: 0;
  pointer-events: none;
  border-radius: 10px;
  background: transparent;
  box-shadow: 0 0 0 rgba(0,0,0,0);
  transition: background-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  will-change: translate;
}
.ios-player-modal.queue-mode .player-queue-list .queue-drag-ghost.is-lifted {
  background: color-mix(in srgb, #fff 9%, color-mix(in srgb, rgb(var(--tint)) 28%, #4b4746));
  box-shadow: 0 10px 26px rgba(0,0,0,.34);
}
.ios-player-modal.queue-mode .player-queue-list .queue-drag-ghost.is-settling {
  transition: translate var(--dur-release) var(--ease-release), background-color var(--dur-release) var(--ease), box-shadow var(--dur-release) var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  .ios-player-modal.queue-mode .player-queue-list .queue-drag-ghost { transition: none !important; }
}
.player-queue-empty { padding: 24px 0; }
.player-queue-empty p { color: #fff; font-size: 17px; font-weight: 600; margin: 0 0 8px; }
.player-queue-empty span { display: block; color: rgba(255,255,255,.72); font-size: 15px; line-height: 1.4; }
.ios-player-modal.queue-mode .ios-scrubber-section { grid-area: 4 / 1 / 5 / -1; margin: 0; }
.ios-player-modal.queue-mode .ios-controls-cluster {
  grid-area: 5 / 1 / 6 / -1;
  margin: 0;
  padding: 0 24px;
}
.ios-player-modal.queue-mode .ios-modal-volume-row { grid-area: 6 / 1 / 7 / -1; margin: 0; }
.ios-player-modal.queue-mode .ios-player-bottom-dock {
  grid-area: 7 / 1 / 8 / -1;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  margin: 0;
}
.ios-player-modal.queue-mode #playerShareBtn { display: none; }
.ios-player-modal.queue-mode #lyricsToggleBtn { order: 1; }
.ios-player-modal.queue-mode #openEqBtn { order: 2; }
.ios-player-modal.queue-mode #queueToggleBtn {
  order: 3;
  width: 44px;
  height: 44px;
  justify-self: center;
  border-radius: 50%;
  background: rgba(255,255,255,.88);
  color: rgb(var(--tint));
}
.ios-player-modal.queue-mode :is(.queue-track-select, .track-drag-handle, .ios-icon-btn, .player-dock-cell):focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  border-radius: 10px;
}
.ios-player-modal.queue-mode .is-dragging .track-drag-handle:focus-visible { outline: none; }
@media (max-height: 700px) {
  .ios-player-modal.queue-mode .player-modal-scroll-body {
    grid-template-columns: 64px minmax(0,1fr);
    grid-template-rows: 64px 40px minmax(64px,1fr) auto 60px 24px 40px;
    row-gap: 12px;
    padding-top: 8px;
    padding-bottom: max(12px, var(--sab));
  }
  .ios-player-modal.queue-mode .ios-art-card { width: 64px; height: 64px; }
  .ios-player-modal.queue-mode .player-queue-modes .ios-icon-btn { height: 40px; }
  .ios-player-modal.queue-mode .player-queue-title { font-size: 20px; }
  .ios-player-modal.queue-mode .player-queue-list .ios-track-item { min-height: 64px; }
  .ios-player-modal.queue-mode .player-queue-list .track-cover-sm { width: 44px; height: 44px; }
}
@media (max-width: 360px) {
  .ios-player-modal.queue-mode .player-modal-scroll-body { column-gap: 12px; padding-inline: 16px; }
  .ios-player-modal.queue-mode .ios-track-actions { gap: 4px; }
  .ios-player-modal.queue-mode .track-circle-btn { width: 32px; height: 40px; }
  .ios-player-modal.queue-mode .player-queue-list .track-name-main { font-size: 17px; }
}

/* Search browse: photographic categories and a persistent bottom search field. */
.search-browse-heading { font-size: 22px; font-weight: 700; letter-spacing: -.025em; margin: 8px 0 18px; }
.search-browse-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-bottom: 32px; }
.search-browse-card {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1.78;
  min-width: 0;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  background: color-mix(in srgb, var(--category-color) 82%, #111216);
  text-align: left;
  padding: 16px;
  color: #fff;
  cursor: pointer;
  box-shadow: none;
}
.search-browse-card img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.95) contrast(1.08) brightness(0.7);
  mix-blend-mode: normal;
  opacity: 0.68;
}
.search-browse-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: color-mix(in srgb, var(--category-color) 52%, transparent);
  pointer-events: none;
}
.search-browse-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02) 20%, rgba(0, 0, 0, 0.68) 100%);
}
.search-browse-card.has-animated-cover canvas { position: absolute; z-index: -1; inset: 0; display: none; width: 100%; height: 100%; pointer-events: none; }
.search-browse-card.has-animated-cover.is-cover-ready canvas { display: block; }
.search-browse-card.has-animated-cover::after { z-index: 0; pointer-events: none; }
.search-browse-card.has-animated-cover span { z-index: 1; }
.search-browse-card span { position: absolute; bottom: 14px; left: 16px; right: 12px; font-size: clamp(18px,4.7vw,26px); font-weight: 700; line-height: 1.12; letter-spacing: -.025em; text-wrap: balance; }
.search-browse-card.is-pressed { scale: .98; }
.search-browse-card:focus-visible,.search-browse-home:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }
@media (hover:hover) { .search-browse-card:hover img { opacity: .92; } }
.search-bottom-dock { display: none; }
body:has(#searchTab.active) .search-bottom-dock { display: flex; align-items: center; gap: 12px; position: absolute; bottom: var(--dock-bottom); left: var(--page-gutter); right: var(--page-gutter); pointer-events: auto; }
/* Клавиатура (core/platform.js, --kb-inset): поле встаёт над ней, если клиент
   сам не ужал окно (iOS). Под клавиатурой безопасной зоны снизу нет. */
.search-bottom-dock { transition: transform var(--dur-release) var(--ease); }
html.kb-open body:has(#searchTab.active) .search-bottom-dock {
  bottom: 8px;
  transform: translate3d(0, calc(-1 * var(--kb-inset, 0px)), 0);
}
/* Набор текста (core/platform.js, html.nm-typing): остров с мини-плеером уезжает
   под нижний край и не всплывает над клавиатурой, когда Android ужимает окно. */
/* Свойство translate, а не transform: transform дока ведёт жест плеера (app.js). */
.ios-floating-island-dock { transition: translate var(--dur-sheet) var(--ease-sheet); }
html.nm-typing .ios-floating-island-dock { translate: 0 calc(100% + 24px); }
.search-bottom-dock .ios-search-bar-wrap { flex: 1; min-width: 0; }
.search-bottom-dock .ios-search-input-pill { height: var(--mini-h); border-radius: 999px; padding: 0 18px; margin: 0; background: var(--glass-dock); border: 1px solid var(--glass-border); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); }
.search-bottom-dock .search-lens-icon { width: 24px; height: 24px; flex: 0 0 auto; color: var(--text-secondary); }
.search-bottom-dock #searchInput { min-width: 0; font-size: 17px; }
.search-bottom-dock #searchInput::placeholder { color: var(--text-secondary); }
.search-browse-home { display: grid; place-items: center; flex: 0 0 var(--mini-h); width: var(--mini-h); height: var(--mini-h); border-radius: 50%; color: var(--text); background: var(--glass-dock); border: 1px solid var(--glass-border); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); }
.search-browse-home svg { width: 25px; height: 25px; }
@media (max-width: 360px) { .search-browse-grid { gap: 12px; } .search-browse-card span { left: 12px; bottom: 12px; font-size: 17px; } .search-bottom-dock .ios-search-input-pill { padding-inline: 12px; } .search-bottom-dock #searchInput { font-size: 15px; } }

/* Основной плеер: обложка задаёт атмосферу, живые элементы управления общие с очередью. */
.player-album-backdrop {
  position: absolute;
  inset: -80px;
  background-position: center;
  background-size: cover;
  filter: blur(70px) saturate(.65);
  opacity: .46;
  pointer-events: none;
}
.ios-player-modal.queue-mode .player-album-backdrop,
.ios-player-modal:not(.queue-mode)::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(55,44,44,.18), rgba(20,20,24,.62));
  pointer-events: none;
}
.ios-player-modal:not(.queue-mode) .player-modal-grabber::before {
  width: 58px;
  height: 5px;
  background: rgba(255,255,255,.55);
}
.ios-player-modal:not(.queue-mode) .player-modal-scroll-body {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  padding: 12px 28px max(20px, var(--sab));
  width: 100%;
  max-width: 600px;
  gap: 16px;
  mask-image: none;
  -webkit-mask-image: none;
}
.ios-player-modal:not(.queue-mode) .ios-art-stage {
  padding: 0;
  flex: 0 0 auto;
}
.ios-player-modal:not(.queue-mode) .ios-art-card {
  width: min(100%, calc(100dvh - 410px));
  min-width: 160px;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 20px 36px rgba(0,0,0,.22);
}
.ios-player-modal:not(.queue-mode) .ios-track-meta {
  margin: 5px 0 0;
  flex: 0 0 auto;
  align-items: flex-end;
  gap: 12px;
}

.ios-player-modal:not(.queue-mode) .ios-track-title { font-size: 23px; letter-spacing: -.025em; }
.ios-player-modal:not(.queue-mode) .ios-track-artist { font-size: 20px; font-weight: 400; }
.ios-player-modal:not(.queue-mode) .ios-track-actions { gap: 10px; padding-bottom: 7px; }
.ios-player-modal:not(.queue-mode) .track-circle-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
}
.ios-player-modal:not(.queue-mode) .ios-scrubber-section { margin: 0; }
.ios-player-modal:not(.queue-mode) .ios-slider-track { height: 7px; border-radius: 8px; }
.ios-player-modal:not(.queue-mode) .ios-slider-fill { background: rgba(255,255,255,.77); }
.ios-player-modal:not(.queue-mode) .ios-time-row { margin-top: 11px; font-size: 13px; font-weight: 400; }
.ios-player-modal:not(.queue-mode) .ios-controls-cluster {
  min-height: 88px;
  margin: 0;
  padding: 0;
  flex: 1 0 88px;
}
.ios-player-modal:not(.queue-mode) .ctrl-prev svg,
.ios-player-modal:not(.queue-mode) .ctrl-next svg { width: 42px; height: 42px; }
.ios-player-modal:not(.queue-mode) #playBtn svg { width: 54px; height: 54px; }
.ios-player-modal:not(.queue-mode) .ios-modal-volume-row { margin: 0; flex: 0 0 26px; }
.ios-player-modal:not(.queue-mode) .ios-player-bottom-dock { margin: 0; flex: 0 0 48px; }
.ios-player-modal:not(.queue-mode) .player-dock-cell { min-height: 48px; }
.ios-player-modal:not(.queue-mode) .player-dock-cell svg { width: 27px; height: 27px; }
.ios-player-modal:not(.queue-mode) #lyricsToggleBtn { order: 1; }
.ios-player-modal:not(.queue-mode) #openEqBtn { order: 2; }
.ios-player-modal:not(.queue-mode) #queueToggleBtn { order: 3; }
.ios-player-modal:not(.queue-mode) #playerShareBtn { order: 4; }
@media (max-height: 740px) {
  .ios-player-modal:not(.queue-mode) .player-modal-scroll-body { gap: 16px; padding-top: 4px; }
  .ios-player-modal:not(.queue-mode) .ios-art-card { width: min(100%, calc(100dvh - 370px)); }
  .ios-player-modal:not(.queue-mode) .ios-controls-cluster { min-height: 66px; flex-basis: 66px; }
}
@media (max-width: 360px) {
  .ios-player-modal:not(.queue-mode) .player-modal-scroll-body { padding-inline: 20px; }
  .ios-player-modal:not(.queue-mode) .ios-track-title { font-size: 20px; }
  .ios-player-modal:not(.queue-mode) .track-circle-btn { width: 38px; height: 38px; }
}

/* Один экран, четыре режима: контент занимает свободное место между шапкой и управлением. */
.ios-player-modal.queue-mode .player-album-backdrop { display: block; }
.ios-player-modal:is(.lyrics-mode,.equalizer-mode) .player-queue-container { display: none; }
.ios-player-modal .player-inline-panel {
  position: relative;
  inset: auto;
  z-index: auto;
  grid-area: 3 / 1 / 4 / -1;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  animation: none;
  transition: none;
  overflow: hidden;
}
.ios-player-modal .player-inline-panel.hidden { display: none; }
.ios-player-modal .player-inline-panel :is(.lyrics-top,.lyrics-backdrop,.eq-backdrop,.sheet-grabber,.lyrics-player-controls) { display: none; }
.ios-player-modal .player-inline-panel .sheet-lyrics-body {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  padding: 24px 4px 110px;
  gap: 28px;
  --scroll-mask-top: 24px;
  --scroll-mask-bottom: 65px;
}
.ios-player-modal .player-inline-panel .lyrics-sing-action {
  left: 4px;
  bottom: 8px;
}
.ios-player-modal .player-inline-panel .lyrics-vocal-control {
  right: 4px;
  bottom: 52px;
  width: 60px;
  height: 132px;
}
.ios-player-modal .player-inline-panel .lyrics-vocal-control svg { left: 12px; width: 36px; height: 36px; }
.ios-player-modal .player-inline-panel .sheet-header {
  padding: 0 0 12px;
  background: transparent;
  border-bottom: 1px solid rgba(255,255,255,.15);
}
.ios-player-modal .player-inline-panel .studio-sheet-body {
  min-height: 0;
  flex: 1;
  padding: 14px 0 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.ios-player-modal .player-inline-panel .sheet-sub { color: rgba(255,255,255,.65); }
.ios-player-modal #openEqBtn.view-active { border-radius: 24px; background: rgba(255,255,255,.2); }
@media (prefers-reduced-motion: reduce) {
  .ios-player-modal .player-inline-panel { animation: none; transition: none; }
}
/* Фокус движущейся кнопки не должен прокручивать внешнюю рамку плеера. */
.ios-player-modal { overflow: clip; }
.ios-player-modal.queue-mode .ios-player-bottom-dock { grid-template-columns: repeat(4, 1fr); }
.ios-player-modal.queue-mode #playerShareBtn { display: flex; order: 4; }
.ios-player-modal.queue-mode #queueToggleBtn { background: transparent; color: #fff; }
.ios-player-modal.queue-mode :is(#lyricsToggleBtn.active,#queueToggleBtn.active,#openEqBtn.view-active) {
  width: 44px;
  height: 44px;
  justify-self: center;
  border-radius: 50%;
  background: rgba(255,255,255,.88);
  color: rgb(var(--tint));
}

/* Управление имеет одну геометрию во всех режимах плеера. */
.ios-player-modal::after,
.ios-player-modal:not(.queue-mode)::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(55,44,44,.18), rgba(20,20,24,.62));
  pointer-events: none;
}
/* Зона шапки Telegram (статус-бар, «Назад», «⌄ ⋯») сверху: --tg-header-clearance.
   В ней не лежит ничего — ни обложка, ни ручка, ни кнопки плеера; тело начинается
   ниже ручки. Раньше здесь были жёсткие 46 px, и обложка уходила под кнопки Telegram. */
.ios-player-modal:is(.queue-mode,:not(.queue-mode)) {
  --player-top: calc(var(--tg-header-clearance) + 16px);
  /* Нижний блок: таймлайн 38 + кнопки 110 + громкость 26 + нижний ряд 48 + три зазора по 16. */
  --player-controls-h: 270px;
}
.ios-player-modal:is(.queue-mode,:not(.queue-mode)) .player-modal-nav {
  flex: 0 0 16px;
  min-height: 0;
  height: 16px;
  margin-top: var(--tg-header-clearance);
  padding: 0;
}
.ios-player-modal .player-modal-grabber { top: 0; width: 64px; height: 16px; }
/* Тело между ручкой и нижним блоком управления; высоту даёт top + bottom,
   поэтому обложка (height: 100% стадии) сама ужимается, когда зона Telegram больше.
   align-self: stretch обязателен: у queue-mode стоит center, и с height: auto тело
   становится высотой по содержимому — длинный текст песни раздувал его на тысячи px
   и уезжал под нижний блок. */
.ios-player-modal:is(.queue-mode,:not(.queue-mode)) .player-modal-scroll-body {
  position: absolute;
  top: var(--player-top);
  bottom: calc(var(--player-controls-h) + 32px + var(--sab));
  height: auto;
  align-self: stretch;
  left: 50%;
  translate: -50% 0;
  padding: 4px 28px 0;
  margin: 0;
  overflow: hidden;
}
.ios-player-modal.queue-mode .player-modal-scroll-body {
  grid-template-rows: 76px minmax(0,1fr);
  row-gap: 24px;
}
.ios-player-modal.queue-mode .player-queue-modes { display: none; }
.ios-player-modal.queue-mode :is(.player-queue-container,.player-inline-panel) { grid-area: 2 / 1 / 3 / -1; }
.ios-player-modal .player-fixed-controls {
  position: absolute;
  z-index: 2;
  left: 50%;
  translate: -50% 0;
  bottom: calc(20px + var(--sab));
  width: calc(100% - 56px);
  max-width: 544px;
  height: var(--player-controls-h);
  display: grid;
  grid-template-rows: 38px 110px 26px 48px;
  gap: 16px;
  color: #fff;
}
.ios-player-modal:is(.queue-mode,:not(.queue-mode)) .player-fixed-controls > * { grid-area: auto; margin: 0; padding: 0; }
.ios-player-modal:is(.queue-mode,:not(.queue-mode)) .player-fixed-controls .ios-controls-cluster {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 0;
  flex: none;
}
.ios-player-modal:is(.queue-mode,:not(.queue-mode)) .player-fixed-controls .ctrl-prev svg,
.ios-player-modal:is(.queue-mode,:not(.queue-mode)) .player-fixed-controls .ctrl-next svg { width: 42px; height: 42px; }
.ios-player-modal:is(.queue-mode,:not(.queue-mode)) .player-fixed-controls #playBtn svg { width: 54px; height: 54px; }
.ios-player-modal:is(.queue-mode,:not(.queue-mode)) .player-fixed-controls .ios-time-row { margin-top: 11px; font-size: 13px; font-weight: 400; }
.ios-player-modal:is(.queue-mode,:not(.queue-mode)) .player-fixed-controls .ios-slider-track { height: 7px; border-radius: 8px; }
.ios-player-modal:is(.queue-mode,:not(.queue-mode)) .player-fixed-controls .ios-slider-fill { background: rgba(255,255,255,.77); }
.ios-player-modal:is(.queue-mode,:not(.queue-mode)) .player-fixed-controls .ios-player-bottom-dock { grid-template-columns: repeat(4,1fr); }
.ios-player-modal:is(.queue-mode,:not(.queue-mode)) .player-fixed-controls .player-dock-cell {
  width: 100%;
  height: 48px;
  min-height: 48px;
  color: rgba(255,255,255,.65);
  background: transparent;
  border-radius: 0;
  transition: none;
}
.ios-player-modal:is(.queue-mode,:not(.queue-mode)) .player-fixed-controls .player-dock-cell svg { width: 27px; height: 27px; }
.ios-player-modal .player-fixed-controls :is(#lyricsToggleBtn.active,#queueToggleBtn.active,#openEqBtn.view-active)::before {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  bottom: 0;
  border-radius: 50%;
  background: currentColor;
}
.ios-player-modal .player-fixed-controls #playerShareBtn { display: flex; order: 4; }
.ios-player-modal .player-fixed-controls #lyricsToggleBtn { order: 1; }
.ios-player-modal .player-fixed-controls #openEqBtn { order: 2; }
.ios-player-modal .player-fixed-controls #queueToggleBtn { order: 3; }
.ios-player-modal .player-fixed-controls .player-dock-cell { position: relative; }
@media (max-height: 740px) {
  .ios-player-modal:is(.queue-mode,:not(.queue-mode)) .player-modal-scroll-body { bottom: calc(292px + var(--sab)); padding-top: 4px; gap: 16px; }
  .ios-player-modal:not(.queue-mode) .ios-art-card { width: min(100%,calc(100dvh - 460px)); }
  .ios-player-modal .player-fixed-controls { height: 260px; grid-template-rows: 38px 100px 24px 44px; gap: 18px; }
}
.ios-player-modal:is(.queue-mode,:not(.queue-mode)) .player-fixed-controls :is(#lyricsToggleBtn,#queueToggleBtn,#openEqBtn,#playerShareBtn) {
  width: 100%;
  height: 48px;
  min-height: 48px;
  color: rgba(255,255,255,.65);
  background: transparent;
  border-radius: 0;
}
.ios-player-modal .player-modal-grabber::before { background: rgba(255,255,255,.55); }

/* Тонирование относится только к фону, никогда к содержимому режимов. */
.ios-player-modal .player-album-backdrop { z-index: 0; }
.ios-player-modal::after { z-index: 0; }
.ios-player-modal:is(.queue-mode,:not(.queue-mode)) .player-modal-scroll-body { z-index: 1; }
/* Режим обложки: квадрат обложки подстраивается под свободную высоту тела.
   Раньше размер задавался шириной окна, и на широком окне название и кнопки
   «избранное / ещё» уезжали под нижний край. Теперь обложка берёт остаток высоты,
   текстовый блок всегда на месте; прокрутка — только на совсем низком экране. */
.ios-player-modal:not(.queue-mode) .player-modal-scroll-body {
  overflow-y: auto;
  scrollbar-width: none;
}
.ios-player-modal:not(.queue-mode) .ios-art-stage {
  flex: 1 1 0;
  min-height: 84px;
  padding: 0 0 4px;
}
.ios-player-modal:not(.queue-mode) .ios-art-card {
  width: auto;
  height: 100%;
  max-width: 100%;
  min-width: 0;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}

/* Общая мягкая граница прокрутки: верх и низ симметричны во всех режимах. */
.ios-player-modal :is(.player-inline-panel .sheet-lyrics-body,.player-inline-panel .studio-sheet-body,.player-queue-list) {
  --player-edge-fade: min(64px, 18%);
  -webkit-mask-image: linear-gradient(180deg,
    transparent 0,
    rgba(0,0,0,.15) calc(var(--player-edge-fade) * .25),
    rgba(0,0,0,.5) calc(var(--player-edge-fade) * .5),
    rgba(0,0,0,.85) calc(var(--player-edge-fade) * .75),
    #000 var(--player-edge-fade),
    #000 calc(100% - var(--player-edge-fade)),
    rgba(0,0,0,.85) calc(100% - var(--player-edge-fade) * .75),
    rgba(0,0,0,.5) calc(100% - var(--player-edge-fade) * .5),
    rgba(0,0,0,.15) calc(100% - var(--player-edge-fade) * .25),
    transparent 100%);
  mask-image: linear-gradient(180deg,
    transparent 0,
    rgba(0,0,0,.15) calc(var(--player-edge-fade) * .25),
    rgba(0,0,0,.5) calc(var(--player-edge-fade) * .5),
    rgba(0,0,0,.85) calc(var(--player-edge-fade) * .75),
    #000 var(--player-edge-fade),
    #000 calc(100% - var(--player-edge-fade)),
    rgba(0,0,0,.85) calc(100% - var(--player-edge-fade) * .75),
    rgba(0,0,0,.5) calc(100% - var(--player-edge-fade) * .5),
    rgba(0,0,0,.15) calc(100% - var(--player-edge-fade) * .25),
    transparent 100%);
}

/* Затухание очереди живёт под заголовком, а не поверх первого трека. */
.ios-player-modal.queue-mode .player-queue-header {
  position: relative;
  z-index: 1;
  pointer-events: none;
}
.ios-player-modal.queue-mode .player-queue-list {
  margin-top: -64px;
  padding-top: 64px;
  --player-edge-fade: 64px;
}

/* Караоке: одна кнопка запуска и раскрываемый над ней регулятор. */
.ios-player-modal .player-inline-panel .lyrics-sing-action {
  left: auto;
  right: 4px;
  bottom: 8px;
  width: 40px;
  height: 40px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
}
.lyrics-sing-action :is(.karaoke-mic-icon,.karaoke-ready-icon) { width: 23px; height: 23px; }
.lyrics-sing-action .karaoke-ready-icon { display: none; }
.lyrics-sing-action.just-ready .karaoke-ready-icon { display: block; }
.lyrics-sing-action.just-ready .karaoke-mic-icon { display: none; }
.lyrics-sing-action .karaoke-progress-ring { display: none; position: absolute; inset: -2px; width: 44px; height: 44px; transform: rotate(-90deg); fill: none; stroke: currentColor; stroke-width: 2; }
.lyrics-sing-action.preparing .karaoke-progress-ring { display: block; }
.karaoke-progress-ring circle { stroke-dasharray: 125.664; stroke-dashoffset: calc(125.664 * (1 - var(--karaoke-progress, 0))); transition: stroke-dashoffset var(--dur-release) var(--ease); }
.ios-player-modal .player-inline-panel .lyrics-vocal-control {
  width: 40px;
  height: 132px;
  right: 4px;
  bottom: 58px;
  border-radius: 20px;
}
.ios-player-modal .player-inline-panel .lyrics-vocal-control svg { width: 22px; height: 22px; left: 9px; bottom: 12px; }
@media (prefers-reduced-motion: reduce) { .karaoke-progress-ring circle { transition: none; } }
.lyrics-sing-action.preparing.indeterminate .karaoke-progress-ring { animation: karaoke-ring-turn var(--dur-pulse) var(--ease-linear) infinite; }
.lyrics-sing-action.preparing.indeterminate .karaoke-progress-ring circle { stroke-dashoffset: 94.248; }
@keyframes karaoke-ring-turn { from { transform: rotate(-90deg); } to { transform: rotate(270deg); } }
@media (prefers-reduced-motion: reduce) { .lyrics-sing-action.preparing.indeterminate .karaoke-progress-ring { animation: none; } }

/* Profile connection follows the app's existing dark palette. */

/* Доступность: единый видимый фокус и достаточная активная область. */
:where(button, input, select, summary, a, [role="button"]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
:is(.mini-ctrl-btn, .ios-circle-avatar, .tempo-pill) { min-width: 44px; min-height: 44px; }
.ios-floating-island-dock.dock-compact .island-circle-nav-btn,
.ios-floating-island-dock.dock-compact :is(#miniPrevBtn, #miniNextBtn) { visibility: hidden; }
.ios-floating-island-dock.dock-compact :is(#miniPrevBtn, #miniNextBtn) { min-width: 0; }
.ios-floating-island-dock.dock-compact .island-circle-nav-btn:is(.active, [data-tab="searchTab"]),
.ios-floating-island-dock.dock-compact:has(.island-circle-nav-btn.active[data-tab="searchTab"]) .island-circle-nav-btn[data-tab="homeTab"] { visibility: visible; }
:is(.select-bar-danger, .sync-progress.is-error .sync-progress-label, .sync-btn-danger, .sync-note-error .sync-ico) { color: #ff766b; }
:root[data-scheme="light"] :is(.select-bar-danger, .sync-progress.is-error .sync-progress-label, .sync-btn-danger, .sync-note-error .sync-ico) { color: #bd2d25; }
.dialog-btn-danger { background: #bd2d25; }
@media (prefers-reduced-motion: reduce) {
  .ios-floating-island-dock, .ios-floating-island-dock * { transition: none; }
  .sync-progress-track > span { animation: none !important; transition: none; }
}

/* Controls own their touch gesture; scrolling resumes outside the card. */
.simple-band-card, .fader-track { touch-action: none; }
.ios-artist-page::before, .ios-artist-page.is-scrolled::before { display: none; }
.ios-artist-page .artist-header-img { will-change: transform, filter; }
.tempo-pill.active { color: #fff; background: var(--accent, #367bf5); }
#playerArtist button { background: none; border: 0; color: inherit; font: inherit; padding: 0; }
#playerArtist { display: block; width: 100%; }
.artist-marquee { display: inline-flex; width: max-content; max-width: none; white-space: nowrap; }
.artist-marquee-label { flex: 0 0 auto; }
.artist-marquee.is-scrolling { gap: 40px; animation: artist-marquee-scroll var(--artist-scroll-duration) linear infinite; }
@keyframes artist-marquee-scroll { to { transform: translateX(calc(-1 * var(--artist-scroll-distance))); } }
@media (prefers-reduced-motion: reduce) { .artist-marquee.is-scrolling { animation: none; } }

/* The timeline remains touchable without a visible handle. */
.ios-player-modal .slider-thumb-track { display: none; }

body:has(#nowPlayingModal:not(.hidden)) .search-bottom-dock { display: none; }
body #menuSheetCard { background: var(--glass-dock); border: 1px solid var(--glass-border); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); }
.ios-studio-sheet .eq-range-slider::-webkit-slider-thumb { background: #fff; box-shadow: 0 2px 10px #0004; }

/* Оформление в профиле — сгруппированный список с отметкой, как в настройках iOS. */
.lyrics-aa { font-size: 22px; font-weight: 600; line-height: 24px; }

.ios-player-modal { z-index: 2000; }
.ios-floating-island-dock { z-index: 1500; }
.charts-featured-rank { display: none; }

.ios-art-stage { overflow: visible; position: relative; }
.art-swipe-neighbor { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; pointer-events: none; will-change: transform; }

#studioEqSheet:has(#viewModeSimple.active) :is(.eq-card-cluster, .eq-spatial-card) { display: none; }


/* Full video presentation: fixed controls, no artwork-sized empty spacer. */
.ios-player-modal.clip-mode .clip-media-host { min-height: 200px; }
.ios-player-modal.clip-mode .player-fixed-controls .ios-controls-cluster { justify-content: center; }
.ios-player-modal.clip-mode .ios-track-meta { align-items: center; }

/* Keep genres attached to the home title instead of stacking shelf spacing. */
#homeTab .ios-page-title-row { padding-bottom: 8px; }
#homeTab #homeGenresSection { margin-top: 0; }
#homeTab #homeGenresSection + .ios-shelf-section { margin-top: 18px; }

/* Complete track pages and contained press feedback, without adjacent ranks. */
.home-quick-tracks-card {
  margin-inline: 0;
  padding-inline: 0;
  scroll-padding-inline: 0;
}
.home-quick-col { flex-basis: 100%; scroll-snap-stop: always; }
.home-quick-track-row {
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: var(--r-detail);
}
/* На главной обложки «Ваших лайков» начинаются на одной линии с заголовком полки. */
#homeQuickTracksContainer .home-quick-track-row {
  gap: var(--s2);
  padding-inline: 0;
}
#homeQuickTracksContainer .home-quick-track-meta { flex: 1 1 auto; }
/* The content press extends beyond the row by 6px. Keep that halo inside the
   horizontal scroller's paint area instead of letting its left edge clip. */
#homeQuickTracksContainer {
  box-sizing: content-box;
  margin-inline: -6px !important;
  padding-inline: 6px !important;
  scroll-padding-inline: 6px !important;
}

/* All horizontal content rails use the same safe stopping geometry. Without
   mandatory snap a fast swipe can leave the first card parked halfway under
   the scrollport's clipping edge. Keep the page gutter unchanged; snap handles
   the final position and the small scroll padding protects rounded artwork. */
:is(
  .ios-card-carousel,
  .home-quick-tracks-card,
  .ios-artists-carousel,
  .home-artists-carousel,
  .ios-mixes-grid,
  .ios-mood-scroll,
  .ios-chips-scroll,
  #homeGenresGrid,
  #searchArtistsList,
  #libraryRecentList,
  .ios-recent-tracks-grid,
  .artist-albums-carousel,
  .artist-clips-carousel,
  .playlist-chips-scroll,
  .chart-chip-row,
  .home-recent-carousel,
  .home-feature-carousel,
  .album-related-list
) {
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  margin-inline: calc(var(--page-gutter, 24px) * -1) !important;
  padding-inline: var(--page-gutter, 24px) !important;
  scroll-padding-inline: var(--page-gutter, 24px) !important;
  overscroll-behavior-x: contain;
}
:is(
  .ios-card-carousel,
  .home-quick-tracks-card,
  .ios-artists-carousel,
  .home-artists-carousel,
  .ios-mixes-grid,
  .ios-mood-scroll,
  .ios-chips-scroll,
  #homeGenresGrid,
  #searchArtistsList,
  #libraryRecentList,
  .ios-recent-tracks-grid,
  .artist-albums-carousel,
  .artist-clips-carousel,
  .playlist-chips-scroll,
  .chart-chip-row,
  .home-recent-carousel,
  .home-feature-carousel,
  .album-related-list
) > * {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* Top chart track: complete media above readable metadata at every width. */
.charts-featured { display: flex; flex-direction: column; aspect-ratio: auto; min-height: 0; width: 100%; min-width: 0; }
.charts-featured::before { display: none; }
.charts-featured-media { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #101114; }
/* Квадратная обложка стоит по центру 16:9, а по бокам — её же размытая копия (не плоские полосы). Размытие неподвижное. */
.charts-featured-media::before { content: ""; position: absolute; inset: -14%; background: var(--featured-fill, none) center / cover no-repeat; filter: blur(22px) saturate(1.15); opacity: .9; }
.charts-featured .charts-featured-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; object-fit: contain; object-position: center; }
.charts-featured-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
.charts-featured .charts-featured-content { width: 100%; height: auto; min-height: 0; box-sizing: border-box; padding: 16px; }
.charts-featured .charts-featured-title { white-space: normal; overflow-wrap: anywhere; line-height: 1.12; }
.charts-featured .charts-featured-artist { white-space: normal; overflow-wrap: anywhere; }

/* Queue content starts immediately; the removed heading reserves no space. */
.ios-player-modal.queue-mode .player-queue-list { margin-top: 0; padding-top: 8px; --player-edge-fade: 16px; }
#playerQueueList .ios-track-item { touch-action: pan-y; }
#playerQueueList .queue-swiping { position: relative; transition: none; background: var(--glass-dock); }
#playerQueueList .queue-swiping::after { content: attr(data-swipe-action); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--bg-surface); border-radius: inherit; pointer-events: none; }

/* Volume lives in equalizer; all player views reclaim its former row. */
.ios-player-modal:is(.queue-mode,:not(.queue-mode)) { --player-controls-h: 228px; }
.ios-player-modal .player-fixed-controls { height: var(--player-controls-h); grid-template-rows: 38px 110px 48px; }
#studioEqSheet .eq-volume-label { display: block; color: var(--text); font-size: 14px; font-weight: 600; margin-bottom: 8px; }
#studioEqSheet .ios-modal-volume-row { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; }
#studioEqSheet .eq-knob-card:has(#eqVolumeSlider) { display: none; }
@media (max-height: 740px) {
  .ios-player-modal:is(.queue-mode,:not(.queue-mode)) { --player-controls-h: 218px; }
  .ios-player-modal .player-fixed-controls { grid-template-rows: 38px 100px 44px; }
  .ios-player-modal:is(.queue-mode,:not(.queue-mode)) .player-modal-scroll-body { bottom: calc(var(--player-controls-h) + 32px + var(--sab)); }
}

/* ==========================================================================
   Этап 1 плана нативности: «мгновенный» режим и отклик на касание
   ========================================================================== */

/* Режим ставит core/motion.js: системное «Уменьшить движение», позже — режим
   «Энергосбережение». */
html[data-motion="instant"] {
  --dur-press: var(--dur-instant); --dur-fast: var(--dur-instant); --dur-micro: var(--dur-instant);
  --dur-release: var(--dur-instant); --dur-short: var(--dur-instant); --dur-page: var(--dur-instant);
  --dur-sheet: var(--dur-instant); --dur-player: var(--dur-instant);
  --dur-move: var(--dur-instant); --dur-pop: var(--dur-instant);
}
/* Переходов нет вовсе: 0 с, а не 1 мс — иначе у всех элементов (по умолчанию
   transition-property: all) любая смена стиля порождала бы объект перехода. */
html[data-motion="instant"] *,
html[data-motion="instant"] *::before,
html[data-motion="instant"] *::after {
  transition-duration: var(--dur-none) !important;
  transition-delay: var(--dur-none) !important;
  scroll-behavior: auto !important;
}
/* Разовые анимации сразу в конечном кадре, украшения в цикле стоят. Индикаторы
   процесса крутятся дальше, как в iOS при «Уменьшить движение»: замерший
   спиннер выглядит как зависание. */
html[data-motion="instant"] :not(.btn-spinner, .search-spinner, .karaoke-progress-ring, .sync-progress-track > span, .ai-sync-pulse, .ai-bars i),
html[data-motion="instant"] *::before,
html[data-motion="instant"] :not(.recognize-btn.is-listening)::after {
  animation-duration: var(--dur-instant) !important;
  animation-iteration-count: 1 !important;
  animation-delay: var(--dur-none) !important;
}

/* Отклик по умолчанию: класс .is-pressed ставит core/press.js в кадре касания.
   :where() — нулевая специфичность, поэтому собственные правила элементов
   (бывшие :active) перекрывают умолчание, а не складываются с ним. */
:where(.is-pressed) { scale: var(--press-scale); }
/* Стекло под пальцем набухает и пружинит (core/jelly.js) — сжатие нажатия ему не нужно.
   !important: иначе анимация нажатия из core/press.js (WAAPI) перебила бы правило. */
.jelly-live { scale: none !important; }
:where(.is-pressed[data-press="highlight"]) { scale: none; }
:where(.is-pressed[data-press="dim"]) { scale: none; opacity: 0.55; }
:where(.is-pressed[data-press="none"]) { scale: none; }
html[data-motion="instant"] :where(.is-pressed:not([data-press="highlight"])) { scale: none; opacity: 0.6; }

/* Content surfaces get a soft selection wash, not a bounce. The pseudo-element
   keeps the effect inside the surface shape and leaves the content untouched. */
:where(.is-pressed[data-press="highlight"]) {
  scale: none !important;
  transform: none !important;
}

/* Some card primitives still inherit `transition: all`; limit content press to
   the overlay opacity so unrelated properties cannot flash. */
:where([data-press="highlight"]) {
  position: relative;
  transition: none !important;
}
:where([data-press="highlight"])::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 14px;
  background: color-mix(in srgb, var(--text, #fff) 10%, transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-press) var(--ease-out);
}
:where(.is-pressed[data-press="highlight"])::after {
  opacity: 1;
}
:where(.artist-avatar-card, .home-artist-card, .fav-artist-card, .search-artist-card)[data-press="highlight"]::after {
  inset: -5px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--text, #fff) 12%, transparent);
}
:where(.artist-avatar-card, .home-artist-card, .fav-artist-card, .search-artist-card)[data-press="highlight"] > :first-child {
  position: relative;
  z-index: 1;
}
:where(.artist-avatar-card, .home-artist-card, .fav-artist-card, .search-artist-card)[data-press="highlight"]::after {
  clip-path: circle(50% at 50% 50%);
}
:where([data-press="highlight"]) > * {
  position: relative;
  z-index: 1;
}

/* Content press focus: only the pressed artist/album/track becomes muted.
   The surrounding screen stays untouched; there is no card overlay or scrim. */
.ios-main-content .nm-press-focus {
  position: relative;
  z-index: 1;
  scale: none !important;
  transform: none !important;
  filter: blur(2.5px) !important;
  opacity: 0.68;
  transition: filter var(--dur-press) var(--ease-out), opacity var(--dur-press) var(--ease-out) !important;
}
.ios-main-content .nm-press-focus::after {
  display: none;
}

/* ==========================================================================
   Навигация (core/nav.js): страница въезжает справа, нижний экран темнеет.
   ========================================================================== */
.nav-scrim {
  position: absolute;
  inset: 0;
  display: none;
  background: rgba(0, 0, 0, 0.24);
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}
:root[data-scheme="light"] .nav-scrim { background: rgba(0, 0, 0, 0.14); }
.nav-scrim.is-on { display: block; }
/* Страница в движении: тень слева, как у UINavigationController. */
.nav-moving {
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.22);
  will-change: transform;
}
/* Глубже нижнего экрана: не рисуется, но размер и прокрутка сохраняются. */
.nav-buried { visibility: hidden; }
.nav-covered { visibility: hidden; }

/* ==========================================================================
   Этап 3: скелетоны списков. Появляются, только если ответ задержался дольше
   150 мс (NMList.pending), и повторяют геометрию строк: при ответе ничего не
   прыгает. Пульсация — прозрачностью, на композиторе; в мгновенном режиме
   стоит на месте.
   ========================================================================== */
.nm-skel { display: flex; flex-direction: column; padding: 2px 0; }
.nm-skel-row { display: flex; align-items: center; gap: 14px; min-height: 74px; padding: 10px 0; }
.nm-skel-art { flex: none; width: 42px; height: 42px; border-radius: 8px; background: rgba(255, 255, 255, 0.07); }
.nm-skel.is-round .nm-skel-art { width: 48px; height: 48px; border-radius: 50%; }
.nm-skel-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.nm-skel-lines i { display: block; height: 11px; width: 62%; border-radius: 6px; background: rgba(255, 255, 255, 0.07); }
.nm-skel-lines i + i { width: 38%; height: 9px; opacity: 0.7; }
:root[data-scheme="light"] :is(.nm-skel-art, .nm-skel-lines i) { background: rgba(0, 0, 0, 0.07); }
.nm-skel-row { animation: nmSkelPulse var(--dur-pulse) var(--ease-breathe) infinite alternate; }
.nm-skel-row:nth-child(2n) { animation-delay: calc(var(--dur-pulse) / -3); }
@keyframes nmSkelPulse { from { opacity: 1; } to { opacity: 0.45; } }

/* Длинные списки (плейлист до 200 строк на страницу, чарт на 100): строки вне
   экрана не рисуются и не раскладываются, пока к ним не прокрутили. Высота
   до первой отрисовки — как у настоящей строки, затем запоминается (auto). */
#trackList > .ios-track-item { content-visibility: auto; contain-intrinsic-size: auto 74px; }
#chartsPageList > .chart-page-row { content-visibility: auto; contain-intrinsic-size: auto 75px; }

/* ==========================================================================
   Профиль — отдельная страница (colab.js), как «Настройки» iOS: бренд, крупный
   заголовок, карточка профиля и отдельные карточки пунктов. Сами настройки
   открываются общей шторкой меню (openMenuSheet).
   ========================================================================== */
.ios-profile-page {
  --page-gutter: clamp(16px, 4.2vw, 36px);
  position: absolute;
  inset: 0;
  z-index: 1200;
  background: transparent;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 var(--page-gutter) calc(var(--tabbar-h) + var(--mini-h) + var(--sab) + var(--s6));
}
.profile-top-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: calc(var(--tg-header-clearance) + 6px);
  background: transparent;
}
.profile-top-nav.is-scrolled { background: var(--scroll-header-fade); }
.profile-top-nav .subview-nav-title {
  font-size: var(--title-size-hero);
  font-weight: 700;
  letter-spacing: var(--title-track-hero);
  line-height: var(--title-line-hero);
  text-align: left;
}
.profile-top-nav .subview-nav-circle-btn {
  width: 40px;
  height: 40px;
  background: var(--bg-surface-raised);
  border: 0;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin: 4px 0 16px;
  padding: 16px;
  border: 0;
  border-radius: 24px;
  background: var(--bg-surface-raised);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: default;
  transition: background var(--d-fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.profile-card.is-pressed { background: var(--bg-card-hover); }
.profile-card-avatar {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  flex: 0 0 auto;
  border-radius: 50%;
  overflow: hidden;
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(140deg, var(--accent), #5e5ce6);
}
.profile-card-avatar img,
.ios-circle-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.profile-card-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.profile-card-name {
  align-self: flex-start;
  max-width: 100%;
  padding: 0 0 3px;
  border: 0;
  background: radial-gradient(circle, currentColor 1px, transparent 1.1px) left bottom / 6px 2px repeat-x;
  font-family: inherit;
  cursor: pointer;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-inline-name { position: relative; align-self: flex-start; max-width: 100%; min-width: 1ch; }
.profile-inline-name.hidden { display: none; }
.profile-name-measure, .profile-inline-name input { min-width: 0; padding: 3px 0; font: inherit; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.profile-name-measure { display: block; visibility: hidden; white-space: pre; overflow: hidden; }
.profile-inline-name input { position: absolute; inset: 0; width: 100%; border: 0; outline: 0; background: radial-gradient(circle, currentColor 1px, transparent 1.1px) left bottom / 6px 2px repeat-x; color: var(--text); }
.profile-inline-error { font-size: 13px; color: var(--text-secondary); }
.profile-card-sub {
  font-size: 15px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-card .profile-chevron { width: 9px; height: 15px; flex: 0 0 auto; color: var(--text-secondary); }

.profile-rows { display: flex; flex-direction: column; gap: 12px; }
.profile-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 60px;
  padding: 14px 18px;
  border: 0;
  border-radius: 18px;
  background: var(--bg-surface-raised);
  color: var(--text);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-align: left;
  cursor: pointer;
  transition: background var(--d-fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}
.profile-row.is-pressed { scale: 0.985; }
.profile-row > svg:first-child { width: 22px; height: 22px; flex: 0 0 auto; }
.profile-row > span { flex: 1 1 auto; min-width: 0; }
.profile-row > .ios-switch-sm { flex: 0 0 auto; margin-left: auto; }
.profile-row .profile-chevron { width: 9px; height: 15px; flex: 0 0 auto; color: var(--text-secondary); }

/* Настройки в общей шторке: форма имени, выбор оформления, переключатель. */
.profile-section-note { margin: 10px 6px 0; font-size: 13px; line-height: 1.4; color: var(--text-secondary); }
.profile-section-note:empty { display: none; }
.profile-group { position: relative; overflow: hidden; border-radius: 16px; background: var(--bg-surface); border: 1px solid var(--border-subtle); }
.profile-name-row { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 8px 0 16px; }
.profile-name-row input { flex: 1; min-width: 0; padding: 15px 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 17px; }
.profile-name-save {
  flex: none;
  height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 19px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  opacity: 0;
  scale: 0.9;
  pointer-events: none;
  transition: opacity var(--dur-micro) var(--ease), scale var(--dur-micro) var(--ease-micro);
}
.profile-name-row.is-dirty .profile-name-save { opacity: 1; scale: 1; pointer-events: auto; }
.profile-option-title { font-size: 17px; font-weight: 600; color: var(--text); }
.profile-option-note { margin-top: 3px; font-size: 13px; line-height: 1.35; color: var(--text-secondary); }
.profile-option-check { width: 22px; height: 22px; color: var(--accent); opacity: 0; transition: opacity var(--dur-fast) var(--ease); }
.profile-sheet-options { display: flex; flex-direction: column; gap: 8px; }
.profile-quality-copy { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.profile-quality-copy span { flex: none; }
.profile-quality-option .profile-option-check { margin-left: auto; }
.profile-quality-option.is-checked .profile-option-check { opacity: 1; }
.sheet-action-row .ios-switch-sm { flex: 0 0 auto; margin-left: auto; }


/* Основные экраны: скруглённые элементы, цвета по-прежнему берутся из темы Telegram. */
#libraryRecentList.ios-card-carousel { display: flex; flex-direction: column; gap: 0; overflow: visible; padding: 0; }
#libraryRecentList .recent-track-card {
  width: 100%; max-width: none; min-height: 76px; flex: none;
  display: grid; grid-template-columns: 58px minmax(0, 1fr); grid-template-rows: 1fr 1fr;
  column-gap: 14px; row-gap: 3px; padding: 8px 0; border-bottom: 1px solid var(--line-soft);
}
#libraryRecentList .recent-track-art { width: 58px; height: 58px; grid-row: 1 / 3; border-radius: 12px; }
#libraryRecentList .recent-track-title { align-self: end; font-size: 15px; }
#libraryRecentList .recent-track-artist { align-self: start; font-size: 13px; }
#searchTab .search-browse-grid { gap: 12px; }
#searchTab .search-browse-card { border-radius: 16px; }
#searchTab .search-browse-card span { font-size: clamp(16px, 4vw, 21px); }
#searchHistorySection:not(.hidden) { margin-bottom: 24px; }
#mixesTab .ios-wave-hero-card {
  min-height: 208px; padding: 20px; display: grid;
  grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 1fr auto;
  gap: 12px; align-items: end; border-radius: 24px;
  background: var(--bg-surface);
  isolation: isolate;
}
#mixesTab .ios-wave-hero-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, var(--bg-surface) 4%, transparent 88%), url('/search-night.jpg') center / cover;
}
#mixesTab .wave-compact-left { grid-column: 1 / -1; align-self: start; }
#mixesTab .wave-hero-art-thumb { background: transparent; box-shadow: none; color: var(--accent); width: 38px; height: 38px; }
#mixesTab .wave-hero-art-thumb svg { width: 36px; height: 36px; }
#mixesTab .wave-compact-meta .wave-title { font-size: 26px; }
#mixesTab .wave-compact-meta .wave-desc { font-size: 14px; line-height: 1.35; margin-top: 4px; }
#mixesTab .wave-hero-play-btn { width: 48px; height: 48px; padding: 0; justify-content: center; border-radius: 50%; }
#mixesTab .wave-hero-play-btn svg { width: 20px; height: 20px; }
#mixesTab .wave-hero-play-btn span { display: none; }
#mixesTab #mixesGridContainer .mix-card.mix-portrait { flex-basis: calc((100% - 12px) / 2); width: calc((100% - 12px) / 2); height: auto; aspect-ratio: 168 / 236; }
#mixesTab .mood-grid { display: flex; flex-wrap: wrap; gap: 8px; }
#mixesTab .mood-card { width: auto; min-height: 40px; padding: 9px 15px; border-radius: 999px; align-items: center; justify-content: center; }
#mixesTab .mood-card-title { font-size: 14px; font-weight: 500; }
#mixesTab .mood-card-emoji, #mixesTab .mood-card-desc { display: none; }
#chartsPageControls { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 4px; }
.charts-country-control, .charts-play-all { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.charts-country-control { background: var(--bg-surface); color: var(--text); border: 1px solid var(--line); line-height: 1; }
.charts-country-globe { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.charts-country-chevron { width: 14px; height: 14px; flex: 0 0 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.charts-play-all { background: var(--accent); color: var(--accent-on); border: 0; }
.charts-play-all svg { width: 17px; height: 17px; fill: currentColor; }
.charts-play-all:disabled { opacity: .5; }
#chartsPage .chart-page-list { gap: 0; }
#chartsPage .chart-page-row, #chartsPage .chart-page-row.is-current { min-height: 67px; padding: 6px 0; background: transparent; border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0; }
#chartsPage .chart-page-thumb { width: 52px; height: 52px; flex-basis: 52px; border-radius: 10px; }
#chartsPage .chart-page-row-main { gap: 12px; }
#chartsPage .chart-page-title-text { font-size: 15px; }
#chartsPage .chart-page-artist-text { font-size: 13px; }
#chartsPage .chart-page-options { width: 40px; height: 44px; }
#chartsPage .chart-page-options svg { transform: rotate(90deg); }
@media (min-width: 768px) {
  #chartsPage { --page-gutter: max(36px, calc((100vw - 720px) / 2)); }
}

/* ==========================================================================
   НОВЫЙ ГЛАВНЫЙ ЭКРАН (Что послушаем?, Моя волна, Недавно слушали, Для вас)
   ========================================================================== */

/* ─── Шапка главной: бренд + крупный заголовок + аватар ─── */
#homeTab .ios-top-bar {
  display: none !important;
}
#homeTab .home-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: calc(var(--sat, 0px) + 6px);
  margin-bottom: 16px;
}
#homeTab .home-title-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#homeTab .home-brand-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
#homeTab .ios-large-title {
  font-size: var(--title-size-hero);
  font-weight: 700;
  color: var(--text);
  letter-spacing: var(--title-track-hero);
  line-height: var(--title-line-hero);
  margin: 0;
}
#homeTab .ios-circle-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--text) 10%, transparent);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  margin-top: 2px;
  flex-shrink: 0;
}

/* ─── Hero: Моя волна ─── */
.home-wave-card {
  --wave-front-duration: 7.2s;
  --wave-back-duration: 10.5s;
  --wave-thread-duration: 8.8s;
  --wave-far-duration: 17s;
  --wave-upper-duration: 21s;
  --wave-contrast-duration: 6.8s;
  --wave-particle-duration: 9.5s;
  --wave-glow-duration: 6.4s;
  --wave-shimmer-duration: 3.2s;
  --wave-loop-ease: cubic-bezier(0.37, 0, 0.63, 1);
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 180px;
  max-height: 346px;
  aspect-ratio: 790 / 346;
  border-radius: clamp(20px, 3.5vw, 28px);
  background-color: #211817;
  background-image:
    radial-gradient(ellipse at 77% 54%, rgba(207, 124, 90, 0.24), transparent 43%),
    radial-gradient(ellipse at 24% -12%, rgba(139, 72, 65, 0.22), transparent 55%),
    linear-gradient(115deg, #241a19 0%, #2b1e1c 47%, #1c1515 100%);
  padding: clamp(22px, 6vw, 48px) clamp(20px, 5.4vw, 44px);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  box-sizing: border-box;
  cursor: pointer;
  margin-top: 6px;
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: transform var(--dur-press) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.home-wave-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -38%;
  right: 2%;
  width: 62%;
  height: 150%;
  pointer-events: none;
  background: radial-gradient(ellipse, rgba(255, 174, 132, 0.15), transparent 66%);
  opacity: 0.72;
  transform: translate3d(0, 2%, 0) scale(0.96);
}
.home-wave-scene {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.home-wave-flow {
  transform-box: fill-box;
  transform-origin: center;
}
.home-wave-card::before {
  animation: home-wave-glow var(--wave-glow-duration) var(--wave-loop-ease) infinite alternate paused;
}
.home-wave-card .home-wave-flow-front {
  animation: home-wave-front var(--wave-front-duration) var(--wave-loop-ease) infinite alternate paused;
}
.home-wave-card .home-wave-flow-deep {
  animation: home-wave-deep var(--wave-back-duration) var(--wave-loop-ease) infinite alternate paused;
}
.home-wave-card .home-wave-flow-far {
  animation: home-wave-far var(--wave-far-duration) var(--wave-loop-ease) infinite alternate paused;
}
.home-wave-card .home-wave-flow-upper {
  animation: home-wave-upper var(--wave-upper-duration) var(--wave-loop-ease) infinite alternate paused;
}
.home-wave-card .home-wave-thread {
  animation: home-wave-thread var(--wave-thread-duration) var(--wave-loop-ease) infinite alternate paused;
}
.home-wave-card .home-wave-contrast {
  transform-box: fill-box;
  transform-origin: center;
  animation: home-wave-contrast var(--wave-contrast-duration) var(--wave-loop-ease) infinite alternate paused;
}
.home-wave-card .home-wave-particles {
  animation: home-wave-particles var(--wave-particle-duration) var(--ease-in-out, ease-in-out) infinite alternate paused;
}
.home-wave-card.is-wave-visible::before,
.home-wave-card.is-wave-visible .home-wave-flow,
.home-wave-card.is-wave-visible .home-wave-thread,
.home-wave-card.is-wave-visible .home-wave-contrast,
.home-wave-card.is-wave-visible .home-wave-particles,
.home-wave-card.is-wave-visible .home-wave-shimmer {
  animation-play-state: running;
}
.home-wave-shimmer {
  opacity: 0.9;
  animation: home-wave-shimmer var(--wave-shimmer-duration) var(--ease-linear) infinite paused;
}
@keyframes home-wave-front {
  from { transform: translate3d(-28px, -17px, 0) scaleY(0.86) skewX(-1deg); }
  50% { transform: translate3d(8px, -46px, 0) scaleY(1.14) skewX(1deg); }
  to { transform: translate3d(30px, -42px, 0) scaleY(1.12) skewX(-1deg); }
}
@keyframes home-wave-back {
  from { transform: translate3d(16px, -8px, 0) scaleY(1.08); }
  to { transform: translate3d(-16px, 10px, 0) scaleY(0.92); }
}
@keyframes home-wave-deep {
  from { transform: translate3d(28px, -18px, 0) scaleY(0.82); opacity: .56; }
  50% { transform: translate3d(-4px, -45px, 0) scaleY(1.14); opacity: .94; }
  to { transform: translate3d(-30px, -47px, 0) scaleY(1.12); opacity: 1; }
}
@keyframes home-wave-far {
  from { transform: translate3d(26px, 9px, 0) scaleY(.9); opacity: .48; }
  50% { transform: translate3d(-6px, -7px, 0) scaleY(1.04); opacity: .72; }
  to { transform: translate3d(-28px, -10px, 0) scaleY(1.08); opacity: .58; }
}
@keyframes home-wave-upper {
  from { transform: translate3d(22px, 8px, 0) scaleY(.92); opacity: .48; }
  50% { transform: translate3d(-8px, -8px, 0) scaleY(1.06); opacity: .76; }
  to { transform: translate3d(-24px, -4px, 0) scaleY(1.02); opacity: .56; }
}
@keyframes home-wave-thread {
  from { transform: translate3d(-24px, -19px, 0) scaleY(.9); opacity: .34; }
  50% { transform: translate3d(4px, -41px, 0) scaleY(1.16); opacity: .82; }
  to { transform: translate3d(26px, -45px, 0) scaleY(1.12); opacity: 1; }
}
@keyframes home-wave-contrast {
  from { transform: translate3d(-22px, -8px, 0) scaleY(.9); opacity: .46; }
  50% { transform: translate3d(7px, -26px, 0) scaleY(1.1); opacity: .86; }
  to { transform: translate3d(28px, -18px, 0) scaleY(1.06); opacity: .62; }
}
@keyframes home-wave-particles {
  from { transform: translate3d(-11px, 8px, 0) scale(.88); opacity: .34; }
  45% { transform: translate3d(-1px, -5px, 0) scale(1.06); opacity: .78; }
  to { transform: translate3d(13px, -10px, 0) scale(.94); opacity: .46; }
}
@keyframes home-wave-glow {
  from { opacity: 0.36; transform: translate3d(-10%, 8%, 0) scale(0.8); }
  50% { opacity: 1; transform: translate3d(3%, -4%, 0) scale(1.12); }
  to { opacity: 0.58; transform: translate3d(10%, -8%, 0) scale(1.2); }
}
@keyframes home-wave-shimmer {
  from { stroke-dashoffset: 0; opacity: 0.12; }
  38% { opacity: 1; }
  62% { opacity: .72; }
  to { stroke-dashoffset: -1876; opacity: 0.12; }
}
#homeChartsSection {
  display: none !important;
}
.home-wave-meta {
  flex: 1;
  min-width: 0;
  z-index: 2;
}
.home-wave-title {
  font-size: clamp(26px, 6.6vw, 52px);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}
.home-wave-sub {
  font-size: clamp(14px, 3.3vw, 26px);
  font-weight: 400;
  color: rgba(255, 244, 238, 0.72);
  margin: clamp(8px, 2.6vw, 20px) 0 0;
  line-height: 1.25;
}
.home-wave-play-btn {
  --glass-blur: var(--piece-refract, var(--piece-filter));
  flex-shrink: 0;
  width: clamp(52px, 13.2vw, 104px);
  height: clamp(52px, 13.2vw, 104px);
  border-radius: 50%;
  background: var(--piece-tint);
  color: #fff;
  border: 1px solid transparent;
  outline: none;
  cursor: pointer;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--piece-shadow);
  transition: scale var(--dur-press) var(--ease-out), background-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
  z-index: 2;
  margin-top: 2px;
}
.home-wave-play-btn svg {
  width: clamp(22px, 4vw, 32px);
  height: clamp(22px, 4vw, 32px);
  margin-left: 2px;
}
.home-wave-play-btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
@media (hover: hover) and (pointer: fine) {
  .home-wave-play-btn:hover {
    scale: 1.055;
  }
}
.home-wave-play-btn:active {
  scale: 0.9;
}
@media (prefers-reduced-motion: reduce) {
  .home-wave-card::before,
  .home-wave-card .home-wave-flow,
  .home-wave-card .home-wave-thread,
  .home-wave-card .home-wave-contrast,
  .home-wave-card .home-wave-particles,
  .home-wave-card .home-wave-shimmer {
    animation: none !important;
    transform: none;
  }
}
html[data-motion="instant"] .home-wave-card::before,
html[data-motion="instant"] .home-wave-card .home-wave-flow,
html[data-motion="instant"] .home-wave-card .home-wave-thread,
html[data-motion="instant"] .home-wave-card .home-wave-contrast,
html[data-motion="instant"] .home-wave-card .home-wave-particles,
html[data-motion="instant"] .home-wave-card .home-wave-shimmer {
  animation: none !important;
  transform: none;
}

/* ─── Shelf Header & Recent Carousel ─── */
#homeTab .shelf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
#homeTab .shelf-title {
  font-size: var(--title-size-section);
  font-weight: 700;
  color: var(--text);
  letter-spacing: var(--title-track-section);
  line-height: var(--title-line-section);
  margin: 0;
}
#homeTab .shelf-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  padding: 4px 0;
  cursor: pointer;
  transition: color 0.15s;
}
#homeTab .shelf-action-btn:active {
  color: var(--text);
}

.home-recent-carousel {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--page-gutter, 16px);
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
  margin: 0 calc(var(--page-gutter, 16px) * -1);
  padding-left: var(--page-gutter, 16px);
  padding-right: var(--page-gutter, 16px);
}
.home-recent-carousel::-webkit-scrollbar {
  display: none;
}

.home-recent-card {
  flex: 0 0 120px;
  width: 120px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* This rail is nested in a padded page and is also matched by the generic
   rail-alignment reset above. Restore its real viewport inset explicitly so
   snap never leaves a card clipped against the scrollport edge. */
.ios-page-container #homeRecentlyPlayedContainer.home-recent-carousel {
  margin-inline: calc(var(--page-gutter, 16px) * -1) !important;
  padding-inline: var(--page-gutter, 16px) !important;
  scroll-padding-inline: var(--page-gutter, 16px) !important;
}
.home-recent-card:active .home-recent-art-wrap {
  transform: scale(0.96);
}
.home-recent-art-wrap {
  width: 120px;
  height: 120px;
  border-radius: 14px;
  overflow: hidden;
  background: color-mix(in srgb, var(--text) 6%, transparent);
  position: relative;
  transition: transform 0.15s cubic-bezier(0.2, 0.9, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
.home-recent-art-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.home-recent-info-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
  margin-top: 8px;
}
.home-recent-meta {
  flex: 1;
  min-width: 0;
}
.home-recent-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.home-recent-artist {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-recent-kebab-btn {
  flex: 0 0 20px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  transition: color 0.15s, transform 0.15s;
}
.home-recent-kebab-btn:active {
  transform: scale(0.85);
  color: var(--text);
}

/* ─── Для вас (2-column cards) ─── */
#homeForYouSection {
  margin-top: 26px;
  margin-bottom: 30px;
}
.home-for-you-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.for-you-card {
  position: relative;
  aspect-ratio: 1.42 / 1;
  min-height: 110px;
  border-radius: 18px;
  overflow: hidden;
  padding: 12px 12px 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-sizing: border-box;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none;
}
.for-you-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1);
  z-index: 1;
}
.for-you-card:active .for-you-card-bg {
  transform: scale(1.04);
}
.for-you-card-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}
.for-you-card-text {
  flex: 1;
  min-width: 0;
}
.for-you-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.01em;
}
.for-you-card-sub {
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.72);
  margin: 3px 0 0 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.for-you-card-play-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  color: #121212;
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  transition: transform 0.15s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.for-you-card-play-btn svg {
  margin-left: 2px;
}
.for-you-card-play-btn:active {
  transform: scale(0.88);
}

/* Заголовок страницы начинается сразу с её названия. */
.ios-top-bar:has(.ios-brand-wordmark),
#homeTab .home-brand-label {
  display: none;
}

#homeTab .home-title-row {
  align-items: center;
}

/* Главная: крупные подборки в горизонтальной ленте. */
#homeTab #homeForYouSection { margin: 18px 0 26px; }
#homeTab #homeForYouSection .shelf-header { margin-bottom: 12px; }
#homeTab .home-for-you-grid {
  display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-snap-stop: always;
  scroll-behavior: smooth;
  scroll-padding-inline: var(--page-gutter);
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  margin-inline: calc(var(--page-gutter) * -1);
  padding: 0 var(--page-gutter) 8px;
}
#homeTab .home-for-you-grid::-webkit-scrollbar { display: none; }
#homeTab .home-feature-slide {
  flex: 0 0 clamp(210px, 70vw, 300px);
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
/* Подписи над карточками («Ваша станция», «Для вас») убраны — название внутри самой карточки. */
#homeTab .home-feature-label { display: none; visibility: hidden; }
#homeTab :is(.for-you-card, .home-wave-card) {
  width: 100%; min-height: 0; max-height: none; aspect-ratio: 3 / 4;
  margin: 0; padding: 0; border-radius: 14px; box-shadow: none;
}
.for-you-card { isolation: isolate; }
.for-you-card:has(.for-you-mix-visual) {
  background:
    radial-gradient(ellipse at 22% 28%, rgba(214, 93, 72, .32), transparent 42%),
    radial-gradient(ellipse at 82% 62%, rgba(255, 171, 92, .22), transparent 48%),
    linear-gradient(135deg, #281b2b 0%, #40202b 46%, #17131f 100%);
}
.for-you-card:has(.for-you-mix-visual) .for-you-card-bg {
  display: none;
}
.for-you-visual {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
}
.for-you-card-content { z-index: 3; }
.for-you-mix-visual { animation: for-you-mix-scene 16s cubic-bezier(.37,0,.63,1) infinite alternate; }
.mix-day-back-flow { transform-box: fill-box; transform-origin: center; animation: for-you-mix-back 18s ease-in-out infinite alternate; }
.mix-day-main-flow { transform-box: fill-box; transform-origin: center; animation: for-you-mix-main 9s cubic-bezier(.37,0,.63,1) infinite alternate; }
.mix-day-pulses { animation: for-you-mix-pulses 5s ease-in-out infinite alternate; }
.mix-orb { transform-box: fill-box; transform-origin: center; }
.mix-orb-one { animation: for-you-mix-orb-one 8s ease-in-out infinite alternate; }
.mix-orb-two { animation: for-you-mix-orb-two 10s ease-in-out infinite alternate-reverse; }
.mix-shards { animation: for-you-mix-shards 6s ease-in-out infinite alternate; }
@keyframes for-you-mix-scene { from { transform: translate3d(-5px, 8px, 0) scale(.98); opacity: .55; } to { transform: translate3d(6px, -12px, 0) scale(1.06); opacity: .9; } }
@keyframes for-you-mix-back { from { transform: translate3d(14px, 12px, 0) scale(.9); opacity: .35; } to { transform: translate3d(-12px, -16px, 0) scale(1.08); opacity: .82; } }
@keyframes for-you-mix-main { from { transform: translate3d(-14px, 12px, 0) scaleY(.88) rotate(-2deg); opacity: .48; } 50% { transform: translate3d(4px, -14px, 0) scaleY(1.1) rotate(2deg); opacity: .92; } to { transform: translate3d(16px, -10px, 0) scaleY(1.04) rotate(-1deg); opacity: .7; } }
@keyframes for-you-mix-pulses { from { transform: translate3d(-8px, 8px, 0) scale(.75); opacity: .25; } to { transform: translate3d(10px, -10px, 0) scale(1.2); opacity: 1; } }
@keyframes for-you-mix-orb-one { from { transform: translate(-18px, 20px) scale(.72); opacity: .28; } to { transform: translate(18px, -14px) scale(1.14); opacity: .72; } }
@keyframes for-you-mix-orb-two { from { transform: translate(16px, -12px) scale(.78); opacity: .24; } to { transform: translate(-14px, 18px) scale(1.12); opacity: .68; } }
@keyframes for-you-mix-shards { from { transform: translate(-8px, 8px); opacity: .25; } to { transform: translate(10px, -12px); opacity: .9; } }
@media (prefers-reduced-motion: reduce) {
  .for-you-visual, .for-you-visual * { animation: none !important; }
}
html[data-motion="instant"] .for-you-visual,
html[data-motion="instant"] .for-you-visual * { animation: none !important; }
#homeTab .for-you-card-bg { background-position: center; }
#homeTab .for-you-card-content {
  position: absolute; bottom: 0; left: 0; right: 0; box-sizing: border-box;
  padding: 24px 14px 16px; background: linear-gradient(to bottom, transparent, rgba(12, 12, 16, .88) 55%);
}
#homeTab .for-you-card-title { font-size: 19px; }
#homeTab .for-you-card-sub { font-size: 13px; white-space: normal; }
#homeTab .home-wave-card { display: block; }
#homeTab .home-wave-scene { width: 100%; height: 100%; }
#homeTab .home-wave-meta { position: absolute; left: 16px; right: 56px; bottom: 19px; }
#homeTab .home-wave-title { font-size: 21px; }
#homeTab .home-wave-sub { margin-top: 4px; font-size: 13px; line-height: 1.25; }
#homeTab .home-wave-play-btn { position: absolute; right: 14px; bottom: 16px; width: 36px; height: 36px; }
#homeTab .home-wave-play-btn svg { width: 17px; height: 17px; }
#homeTab #homeRecentlyPlayedSection { margin-top: 0; }
#homeTab .home-recent-card { flex-basis: clamp(132px, 38vw, 176px); width: clamp(132px, 38vw, 176px); }
#homeTab .home-recent-art-wrap { width: 100%; height: auto; aspect-ratio: 1; border-radius: 10px; box-shadow: none; }

/* Заголовки секций (артист, итоги): та же роль, что shelf-title на главной. */
.artist-section-header .section-title,
.ios-artist-page .artist-section-header .section-title,
.replay-section-title {
  font-size: var(--title-size-section);
  font-weight: 700;
  letter-spacing: var(--title-track-section);
  line-height: var(--title-line-section);
  color: var(--text);
}

/* Заголовки подэкранов — все через одну шкалу (роль hero). */
#artistsDirectoryView .ios-subview-nav .subview-nav-title,
.sync-top-nav .subview-nav-title,
.replay-top-nav .subview-nav-title,
.wrapped-top-nav .subview-nav-title,
#playlistsOverviewView .pl-ov-title {
  font-size: var(--title-size-hero);
  font-weight: 700;
  letter-spacing: var(--title-track-hero);
  line-height: var(--title-line-hero);
}

/* Страница подборки: отдельное действие запуска и состояние очереди. */
.home-mix-detail { position: fixed; inset: 0; z-index: 1200; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; background: var(--bg); color: var(--text); }
.home-mix-detail-inner { max-width: 520px; margin: 0 auto; padding: calc(var(--tg-header-clearance) + 8px) var(--page-gutter) calc(var(--tabbar-h) + var(--mini-h) + var(--sab) + 30px); }
.home-mix-nav { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; min-height: 44px; margin-bottom: 22px; }
.home-mix-nav > span { text-align: center; font-size: 15px; font-weight: 600; color: var(--text-secondary); }
.home-mix-cover { width: min(100%, 340px); aspect-ratio: 1; margin: 0 auto 24px; border-radius: 14px; overflow: hidden; }
.home-mix-heading h2 { font-size: 28px; line-height: 1.1; letter-spacing: -.025em; }
.home-mix-heading p { margin-top: 6px; color: var(--text-secondary); font-size: 15px; }
.home-mix-play { display: flex; justify-content: center; align-items: center; gap: 9px; width: 100%; min-height: 50px; margin-top: 22px; border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-on); font: inherit; font-weight: 700; cursor: pointer; }
.home-mix-play svg { width: 18px; height: 18px; }
.home-mix-play:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.home-mix-note { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.home-mix-note h3 { font-size: 16px; }
.home-mix-note p { margin-top: 6px; color: var(--text-secondary); font-size: 14px; line-height: 1.4; }

/* Портретные сцены на карточках, отдельные кадры тех же SVG на экранах. */
.home-mix-art-library { position: absolute; pointer-events: none; }
.home-mix-art { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.home-mix-art-detail { display: none; width: 100%; height: 100%; }
.is-daily-mix .daily-art-detail, .is-discover-mix .discover-art-detail { display: block; }

/* Ambient motion only on the decorative layers of the foreground scene. */
.home-mix-art, .home-mix-art-detail {
  --dur-mix-route: calc(var(--dur-ambient) * 2);
  --dur-mix-drift: calc(var(--dur-ambient-slow) * 2);
  --dur-mix-gold: calc(var(--dur-ambient) * 1.5);
}
.mix-discover-wave {
  transform-box: fill-box;
  transform-origin: center;
  animation: mix-wave-drift calc(var(--dur-mix-drift) * var(--wave-tempo)) var(--ease-breathe) infinite;
  animation-delay: calc(var(--dur-mix-drift) * var(--wave-phase));
}
.mix-discover-wave.is-far { --wave-tempo: 1.28; --wave-phase: -.54; --wave-rise: 5px; --wave-drift: 3px; }
.mix-discover-wave.is-mid { --wave-tempo: .91; --wave-phase: -.16; --wave-rise: 9px; --wave-drift: 4px; }
.mix-discover-wave.is-echo { --wave-tempo: 1.06; --wave-phase: -.37; --wave-rise: 8px; --wave-drift: -4px; }
.mix-discover-wave.is-crest { --wave-tempo: .83; --wave-phase: -.29; --wave-rise: 9px; --wave-drift: -3px; }
.mix-discover-wave.is-front { --wave-tempo: .98; --wave-phase: 0; --wave-rise: 13px; --wave-drift: 5px; }
.mix-discover-pulse { animation: mix-route-pulse var(--dur-mix-route) var(--ease-linear) infinite; }
.mix-discover-cover {
  --cover-lift: 10px;
  --cover-phase: 0;
  animation: mix-cover-lift var(--dur-mix-route) var(--ease-breathe) infinite;
  animation-delay: calc(var(--dur-mix-route) * var(--cover-phase));
}
.mix-discover-cover.is-second { --cover-lift: 8px; --cover-phase: .045; }
.mix-discover-cover.is-third { --cover-lift: 6px; --cover-phase: .085; }
.mix-discover-cover.is-fourth { --cover-lift: 4px; --cover-phase: .12; }
.mix-discover-cover.is-fifth { --cover-lift: 3px; --cover-phase: .15; }
.mix-discover-signal {
  fill: none;
  stroke: currentColor;
  stroke-width: .54;
  stroke-linecap: round;
  transform-box: fill-box;
  transform-origin: center;
}
.mix-discover-stroke {
  --dur-discover-stroke: calc(var(--dur-ambient-fast) * var(--signal-tempo, 1) * .29);
  transform-box: fill-box;
  transform-origin: center;
  animation-duration: var(--dur-discover-stroke);
  animation-timing-function: var(--ease-breathe);
  animation-iteration-count: infinite;
  animation-delay: calc(-1 * var(--dur-discover-stroke) * var(--stroke-phase));
}
:where(body.is-playing) .mix-discover-stroke { animation-name: mix-discover-stroke-height; }
:where(body:not(.is-playing)) .mix-discover-signal { scale: none !important; }
.is-second .mix-discover-signal { --signal-tempo: .84; }
.is-third .mix-discover-signal { --signal-tempo: 1.16; }
.is-fourth .mix-discover-signal { --signal-tempo: .93; }
.is-fifth .mix-discover-signal { --signal-tempo: 1.28; }
.mix-discover-aura { animation: mix-discover-aura-breathe var(--dur-mix-route) var(--ease-breathe) infinite; }
.mix-daily-ribbon { animation: mix-ribbon-drift var(--dur-mix-drift) var(--ease-breathe) infinite; }
.mix-daily-ribbon.is-echo { animation-delay: calc(var(--dur-mix-drift) * -.45); }
.mix-daily-stream { animation: mix-ribbon-stream var(--dur-mix-gold) var(--ease-linear) infinite; }
.mix-daily-glint { animation: mix-podium-glint var(--dur-mix-gold) var(--ease-linear) infinite; }
.mix-daily-crown { animation: mix-crown-glow var(--dur-mix-gold) var(--ease-breathe) infinite; }
.mix-daily-halo { animation: mix-halo-breathe var(--dur-mix-drift) var(--ease-breathe) infinite; }
/* Rise matches (scale − 1) × column height, so numbers and top highlights follow the edge. */
.mix-daily-first { --column-rise: 17px; --column-peak: 1.0854; --column-phase: 0; }
.mix-daily-second { --column-rise: 12px; --column-peak: 1.0774; --column-phase: -.14; }
.mix-daily-third { --column-rise: 11px; --column-peak: 1.0827; --column-phase: -.73; }
.mix-daily-column, :where(.mix-daily-backing) .mix-motion-part {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: mix-column-rise var(--dur-mix-gold) var(--ease-breathe) infinite;
  animation-delay: calc(var(--dur-mix-gold) * var(--column-phase, 0));
}
.mix-daily-backing { --column-peak: 1.16; }
.mix-daily-backing rect:nth-child(2n) { --column-phase: -.2; }
.mix-daily-backing rect:nth-child(3n) { --column-phase: -.43; }
.mix-daily-podium-top, .mix-daily-number {
  animation-duration: var(--dur-mix-gold);
  animation-timing-function: var(--ease-breathe);
  animation-delay: calc(var(--dur-mix-gold) * var(--column-phase));
  animation-iteration-count: infinite;
}
.mix-daily-podium-top { animation-name: mix-podium-top-rise; }
.mix-daily-number, .mix-daily-crown-rock { transform-box: fill-box; transform-origin: center; }
.mix-daily-number { animation-name: mix-number-pulse; }
.mix-daily-crown-rock { animation: mix-crown-rock var(--dur-mix-gold) var(--ease-breathe) infinite; }
.mix-motion-part { animation-play-state: paused; }
.is-mix-art-running .mix-motion-part { animation-play-state: running; }
:root[data-motion="instant"] .mix-motion-part { animation: none; }
@media (prefers-reduced-motion: reduce) { .mix-motion-part { animation: none; } }

@keyframes mix-wave-drift {
  0%, 100% { transform: translate(0, 0) scaleY(1); }
  33% { transform: translate(var(--wave-drift), calc(-1 * var(--wave-rise))) scaleY(1.05); }
  71% { transform: translate(calc(-.7 * var(--wave-drift)), calc(.55 * var(--wave-rise))) scaleY(.96); }
}
@keyframes mix-route-pulse {
  0%, 12% { stroke-dashoffset: -100; opacity: 0; }
  20% { opacity: .8; }
  51% { opacity: 1; }
  60%, 100% { stroke-dashoffset: 13; opacity: 0; }
}
@keyframes mix-discover-stroke-height {
  0%, 100% { transform: scaleY(1); }
  26% { transform: scaleY(.42); }
  45% { transform: scaleY(1.37); }
  74% { transform: scaleY(.65); }
}
@keyframes mix-cover-lift {
  0%, 48%, 82%, 100% { transform: translateY(0); }
  60% { transform: translateY(calc(-1 * var(--cover-lift))); }
}
@keyframes mix-discover-aura-breathe {
  0%, 27%, 94%, 100% { opacity: .53; }
  60% { opacity: 1; }
}
@keyframes mix-ribbon-drift {
  0%, 100% { transform: translate(0, 0); }
  30% { transform: translate(3px, -5px); }
  73% { transform: translate(-3px, 4px); }
}
@keyframes mix-ribbon-stream {
  0% { stroke-dashoffset: 17; opacity: 0; }
  12%, 64% { opacity: .85; }
  77%, 100% { stroke-dashoffset: -100; opacity: 0; }
}
@keyframes mix-podium-glint {
  0%, 39% { stroke-dashoffset: 24; opacity: 0; }
  48%, 57% { opacity: .92; }
  66%, 100% { stroke-dashoffset: -100; opacity: 0; }
}
@keyframes mix-crown-glow {
  0%, 50%, 80%, 100% { opacity: 0; }
  62% { opacity: .62; }
}
@keyframes mix-halo-breathe {
  0%, 100% { opacity: 1; }
  32% { opacity: .56; }
  68% { opacity: 1; }
}
@keyframes mix-column-rise {
  0%, 46%, 100% { transform: scaleY(1); }
  24% { transform: scaleY(var(--column-peak)); }
}
@keyframes mix-podium-top-rise {
  0%, 46%, 100% { transform: translateY(0); }
  24% { transform: translateY(calc(-1 * var(--column-rise))); }
}
@keyframes mix-number-pulse {
  0%, 46%, 100% { transform: scale(1); }
  24% { transform: scale(1.12); }
}
@keyframes mix-crown-rock {
  0%, 100% { transform: translateY(0) rotate(0); }
  26% { transform: translateY(-5px) rotate(-6deg); }
  64% { transform: translateY(-2px) rotate(5deg); }
}

#homeTab #forYouMixDiscoverCard { background: #08131e; }
#homeTab #forYouMixDiscoverCard .for-you-card-content { padding: 38px 16px 18px; background: linear-gradient(transparent, #08131e 75%); }
#homeTab #forYouMixDiscoverCard .for-you-card-title { font-size: 23px; letter-spacing: -.035em; }
#homeTab #forYouMixDiscoverCard .for-you-card-sub { color: #b7c8d7; }
.is-discover-mix .home-mix-cover {
  mask-image: linear-gradient(#000 55%, transparent 100%);
}

/* Единая геометрия шапок основных экранов. */
#homeTab .home-title-row { margin-top: 0; }
:is(#homeTab, #mixesTab, #libraryTab, #searchTab) .ios-page-title-row { align-items: center; padding-top: 8px; }
:is(#homeTab, #mixesTab, #libraryTab, #searchTab) .ios-large-title,
.charts-page-title { font-size: var(--title-size-hero); line-height: var(--title-line-hero); letter-spacing: var(--title-track-hero); margin: 0; }
#homeTab #homeUserAvatar { width: 40px; height: 40px; margin-top: 0; }
.ios-charts-page { --page-gutter: clamp(24px, 3.2vw, 36px); }
body.in-telegram.tg-mobile .charts-page-top { padding-top: calc(var(--tg-header-clearance) + 12px); }

/* Заголовки основных вкладок прокручиваются вместе с содержимым. */
:is(#homeTab, #mixesTab, #libraryTab, #searchTab) .ios-page-title-row {
  margin-inline: calc(var(--page-gutter) * -1);
  padding-inline: var(--page-gutter);
}
.ios-nav-header,
.ios-subview-nav,
#playlistsOverviewView .ios-subview-nav,
#artistsDirectoryView .ios-subview-nav,
#playlistsDetailView .ios-subview-nav,
.wrapped-top-nav,
.replay-top-nav,
.profile-top-nav,
:is(#playlistsOverviewView, #artistsDirectoryView, #playlistsDetailView) .ios-subview-nav.is-scrolled,
:is(.wrapped-top-nav, .replay-top-nav, .profile-top-nav).is-scrolled {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.charts-page-top { position: relative; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
body.in-telegram.tg-mobile .ios-charts-page::before {
  content: "";
  position: sticky;
  top: 0;
  z-index: 21;
  display: block;
  height: calc(var(--tg-header-clearance) + 16px);
  margin: 0 calc(var(--page-gutter) * -1) calc(0px - var(--tg-header-clearance) - 16px);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 70%, transparent 100%);
  pointer-events: none;
}
.ios-artist-page::before {
  background: rgba(var(--artist-tint), 0.72);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

/* Стеклянное контекстное меню трека. */
#trackActionSheet .ios-action-sheet-card {
  background: color-mix(in srgb, var(--glass-dock) 86%, transparent);
  /* Через токен, а не литералом: так его находит core/refract.js и ставит кромку-линзу. */
  --glass-blur: blur(24px) saturate(145%);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
}
#trackActionSheet .action-sheet-actions { gap: 0; }
#trackActionSheet .sheet-action-row,
#trackActionSheet.is-popover .sheet-action-row {
  flex-direction: row;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 0;
  background: transparent;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 500;
}
#trackActionSheet .sheet-action-row + .sheet-action-row { border-top: 1px solid var(--line-soft); }
#trackActionSheet .sheet-action-row.is-pressed,
#trackActionSheet .sheet-action-row:hover { background: var(--bg-card-hover); }
#trackActionSheet .sheet-action-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
#trackActionSheet .sheet-action-row svg.sheet-row-chevron { display: none; }

/* Круглое свечение следует за касанием по поверхности всей карточки. */
#trackActionSheet .sheet-action-row + .sheet-action-row { border-top: 0; }
#trackActionSheet .sheet-action-row,
#trackActionSheet .sheet-action-row:hover,
#trackActionSheet .sheet-action-row.is-pressed { background: transparent; }
#trackActionSheet:not(.is-popover) > .ios-action-sheet-card { position: relative; }
#trackActionSheet .ios-action-sheet-card { isolation: isolate; }
#trackActionSheet .ios-action-sheet-card > * { position: relative; z-index: 1; }
#trackActionSheet .ios-action-sheet-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle 84px at var(--action-glow-x, 50%) calc(var(--action-glow-y, 50%) + 12px), transparent 62%, color-mix(in srgb, var(--text) 16%, transparent) 76%, transparent 80%),
    radial-gradient(circle 84px at var(--action-glow-x, 50%) var(--action-glow-y, 50%), rgba(0, 0, 0, 0.16) 0%, rgba(0, 0, 0, 0.08) 55%, transparent 100%);
  -webkit-backdrop-filter: blur(1.5px) brightness(1.06);
  backdrop-filter: blur(1.5px) brightness(1.06);
  -webkit-mask-image: radial-gradient(circle 84px at var(--action-glow-x, 50%) var(--action-glow-y, 50%), #000 55%, transparent 100%);
  mask-image: radial-gradient(circle 84px at var(--action-glow-x, 50%) var(--action-glow-y, 50%), #000 55%, transparent 100%);
  opacity: 0;
  transition: opacity 140ms ease-out;
}
#trackActionSheet .ios-action-sheet-card.has-action-glow::before { opacity: 1; transition-duration: 0ms; }
@media (prefers-reduced-motion: reduce) {
  #trackActionSheet .ios-action-sheet-card::before { transition: none; }
}

/* Упругая деформация действует только во время жеста по пункту меню. */
#trackActionSheet .ios-action-sheet-card {
  translate: var(--liquid-x, 0px) var(--liquid-y, 0px);
  scale: var(--liquid-scale-x, 1) var(--liquid-scale-y, 1);
  transition: translate var(--dur-move) var(--ease-settle), scale var(--dur-move) var(--ease-settle), border-radius var(--dur-move) var(--ease-settle);
}
#trackActionSheet .ios-action-sheet-card.liquid-pressing { transition: translate var(--dur-press) var(--ease), scale var(--dur-press) var(--ease), border-radius var(--dur-press) var(--ease); }
#trackActionSheet .sheet-action-row { touch-action: none; }
#trackActionSheet .liquid-scrollable .sheet-action-row { touch-action: pan-y; }
@media (prefers-reduced-motion: reduce) {
  #trackActionSheet .ios-action-sheet-card { transition: translate 250ms ease-out, scale 250ms ease-out, border-radius 250ms ease-out; }
}
html[data-motion="instant"] #trackActionSheet .ios-action-sheet-card { transition-duration: 250ms !important; }
html[data-motion="instant"] #trackActionSheet .ios-action-sheet-card.liquid-pressing { transition-duration: 120ms !important; }

/* Выбор страны у кнопки — стеклянные кусочки (ниже, «Стеклянные кусочки»):
   поиск, «Определять по IP» и список. Окно — колонка: на низком экране
   ужимается список, а не всё окно уходит в прокрутку. */
#menuSheet.is-popover:has(.charts-country-search) > #menuSheetCard { display: flex; flex-direction: column; }
#menuSheet.is-popover:has(.charts-country-search) .menu-sheet-body {
  flex: 0 1 auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
}
/* В окне-стекле поиск стоит над листающимся списком сам по себе: подложка
   «шапки при прокрутке» от прежней шторки тут давала серую полосу. */
#menuSheet.is-popover .glass-group.charts-country-search { flex: 0 0 auto; flex-direction: row; position: static; background: none; }
#menuSheet.is-popover .glass-group.charts-country-pinned { flex: 0 0 auto; border: 0; }
#menuSheet.is-popover .glass-group.charts-country-list {
  flex: 0 1 auto;
  min-height: 0;
  max-height: 322px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
#menuSheet.is-popover .glass-group.charts-country-list::-webkit-scrollbar { display: none; }
/* Список листается пальцем; ничего не нашлось — кусочек списка прячем. */
#menuSheet.is-popover .glass-group.charts-country-list > .chart-country-row { touch-action: pan-y; }
#menuSheet.is-popover .glass-group.charts-country-list:not(:has(> .chart-country-row:not([hidden]))) { display: none; }
#menuSheet.is-popover .glass-group.charts-country-empty { padding: 16px; }
#menuSheet.is-popover:has(.charts-country-search) .chart-country-row > span:not(.chart-country-flag) {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.chart-country-flag.is-fallback { display: grid; place-items: center; background: transparent; border: 0; box-shadow: none; }
.chart-country-flag.is-fallback::after { display: none; }
.chart-country-flag.is-fallback svg { width: 19px; height: 19px; color: var(--text-secondary); }

/* Строки меню у кнопки — на стекле кусочка, без своих плашек (подсветка
   касания — у кусочка, «Стеклянные кусочки»). */
#menuSheet.is-popover .sheet-action-row,
#menuSheet.is-popover .sheet-action-row:hover,
#menuSheet.is-popover .sheet-action-row.is-pressed { background: transparent; border: 0; }
#menuSheet.is-popover .sheet-action-row svg.sheet-row-chevron { display: none; }

/* ==========================================================================
   Стеклянные кусочки — меню трека у кнопки, как в Apple Music iOS 26/27.
   Всё меню — один кусочек стекла (общий контейнер групп, .action-sheet-actions),
   группы пунктов делят его тонкими полосками, сама карточка — невидимая
   рамка. Стекло рисует кусочек: размытие и приглушение фона под ним, тонкая
   подкраска, блики по краю (многослойная внутренняя тень) и мягкая тень снаружи.
   На Android (Chromium) к размытию добавляется преломление по краям —
   --piece-refract ставит core/refract.js.
   Фон и прозрачность у самой карточки здесь нельзя: предок с opacity < 1,
   фильтром или своим backdrop-filter отрезает вложенным кусочкам фон страницы
   (поэтому и анимация открытия гасит кусочки, а не окно — NMMotion.grow, parts).
   ========================================================================== */
:root {
  /* Прозрачность стекла — две ручки (будущий ползунок в настройках меняет их):
     --glass-frost — размытие фона под стеклом, поверх изгиба края (0 — фон резкий);
     --glass-tint — сколько цвета фона приложения подмешано в стекло.
     Размытие с преломлением берёт отсюда и core/refract.js (NMRefract.setFrost). */
  --glass-frost: 6px;
  --glass-tint: 46%;
  /* --piece-tone — цвет стекла без размытия: с преломлением размывает сам
     SVG-фильтр (середину сильнее, край слегка), и core/refract.js ставит
     --piece-refract: url(#…) var(--piece-tone) вместо --piece-filter. */
  --piece-tone: saturate(185%) brightness(0.82);
  --piece-filter: blur(var(--glass-frost)) var(--piece-tone);
  --piece-tint: color-mix(in srgb, var(--bg-surface) var(--glass-tint), transparent);
  --piece-light: 0.32;   /* сила белых бликов на крае */
  --piece-dark: 2;       /* сила тёмной кромки и тени */
}
:root[data-scheme="light"] {
  --glass-tint: 52%;
  --piece-tone: saturate(185%) brightness(1.04);
  --piece-filter: blur(var(--glass-frost)) var(--piece-tone);
  --piece-tint: color-mix(in srgb, var(--bg-surface) var(--glass-tint), transparent);
  --piece-light: 1;
  --piece-dark: 1;
}
/* Блики по краю и тень стекла — у кусочков меню и мини-плеера.
   --piece-light и --piece-dark подставляются на :root, уже под текущую схему. */
:root {
  --piece-shadow:
    inset 0 0 0 1px color-mix(in srgb, #fff calc(var(--piece-light) * 10%), transparent),
    inset 1.8px 3px 0 -2px color-mix(in srgb, #fff calc(var(--piece-light) * 90%), transparent),
    inset -2px -2px 0 -2px color-mix(in srgb, #fff calc(var(--piece-light) * 80%), transparent),
    inset -3px -8px 1px -6px color-mix(in srgb, #fff calc(var(--piece-light) * 60%), transparent),
    inset -0.3px -1px 4px 0 color-mix(in srgb, #000 calc(var(--piece-dark) * 12%), transparent),
    inset -1.5px 2.5px 0 -2px color-mix(in srgb, #000 calc(var(--piece-dark) * 20%), transparent),
    inset 0 3px 4px -2px color-mix(in srgb, #000 calc(var(--piece-dark) * 20%), transparent),
    inset 2px -6.5px 1px -4px color-mix(in srgb, #000 calc(var(--piece-dark) * 10%), transparent),
    0 1px 5px 0 color-mix(in srgb, #000 calc(var(--piece-dark) * 10%), transparent),
    0 6px 16px 0 color-mix(in srgb, #000 calc(var(--piece-dark) * 8%), transparent);
  /* Край дока — как у Apple Music. Владелец 15.11: «обводку отключи только у дока»;
     16.11 по скрину Apple Music: «есть какая-то обводка белая и нежная… тень белая
     от этой обводки во внутрь». Поэтому у дока вместо старой обводки (блики и
     тёмные кольца) — волосяная светлая линия по краю и мягкий белый ореол от неё
     внутрь; снаружи та же тень. У остального стекла обводка как была.
     Линия — цвет РАМКИ (border-color), а не тень inset: тень inset рисуется
     внутри рамки 1px, и сквозь прозрачную рамку снаружи от линии светилось
     стекло — «светлая обводка поверх тёмно-серой» (владелец 16.11). */
  --dock-rim: color-mix(in srgb, #fff 17%, transparent);
  --dock-glow: color-mix(in srgb, #fff 7%, transparent);
  --piece-shadow-dock:
    inset 0 0 10px 0 var(--dock-glow),
    0 1px 5px 0 color-mix(in srgb, #000 calc(var(--piece-dark) * 10%), transparent),
    0 6px 16px 0 color-mix(in srgb, #000 calc(var(--piece-dark) * 8%), transparent);
}
/* В светлой у Apple Music линия по краю тонкая серая (тёмная, но очень слабая),
   а внутрь от неё — белый ореол (владелец 16.11 по скрину: «как будто темно
   темно серая обводка есть»). Было: белая линия 80 % — на светлом её не видно. */
:root[data-scheme="light"] {
  --dock-rim: color-mix(in srgb, #000 14%, transparent);
  --dock-glow: color-mix(in srgb, #fff 60%, transparent);
}

/* Док — мини-плеер, капсула таб-бара и кружок поиска в сжатом виде — такие же
   кусочки стекла, как меню. Размытие идёт через их прежний токен --glass-blur
   («Мини-плеер», «Таб-бар»), только значение теперь кусочковое: с преломлением
   края, где оно есть (core/refract.js, NMRefract.watch), иначе матовое стекло
   уровня качества.
   Через id дока: liquid.css грузится позже и общим правилом
   (.island-main-row, .island-mini-player) вернул бы старый фон и тень.
   Так же — панель выбора треков: кружок со счётчиком и капсула действий.
   У liquid.css для них правило #selectBar .select-bar-count, поэтому здесь
   на ступень сильнее: body #selectBar. */
#floatingIslandDock :is(.island-mini-player, .island-main-row),
#floatingIslandDock.dock-compact .island-circle-nav-btn[data-tab="searchTab"],
body #selectBar :is(.select-bar-count, .select-bar-actions) {
  --glass-blur: var(--piece-refract, var(--piece-filter));
  background: var(--piece-tint);
  border-color: transparent;
  box-shadow: var(--piece-shadow);
}
/* Край дока как у Apple Music (см. --piece-shadow-dock), 15–16.11. */
#floatingIslandDock :is(.island-mini-player, .island-main-row),
#floatingIslandDock.dock-compact .island-circle-nav-btn[data-tab="searchTab"] {
  border-color: var(--dock-rim);
  box-shadow: var(--piece-shadow-dock);
}
/* Преломление края на iPhone (core/backlens.js, проба владельца 16.11): внутри
   капсулы копия страницы, изогнутая filter: url() — видна только полоса кромки.
   Середина — обычное размытие уровня (--piece-filter, без url()), а оттенок
   стекла ложится поверх копии, чтобы кромка и середина были одного цвета. */
#floatingIslandDock .island-main-row.has-backlens {
  --glass-blur: var(--piece-filter);
  background: transparent;
}
.nm-backlens {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
  filter: var(--piece-tone);   /* та же насыщенность/яркость, что у стекла */
}
.nm-backlens-view {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  /* Страховка: если Safari всё же снимет filter: url(), плоская копия не
     зальёт всю капсулу (iPhone 16.11) — видно только кольцо у края шириной
     с резкую полосу карты (RIM_SHARP · BEZEL ≈ 12 px), середина — стекло. */
  box-sizing: border-box;
  padding: 14px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
/* Копия не живёт: ни стекла (у Safari это лишняя работа), ни анимаций. */
.nm-backlens-view * {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  animation: none !important;
  transition: none !important;
  will-change: auto !important;
}
.nm-backlens-tint {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--piece-tint);
}
/* Пока док перетекает, стекло рисует общая фигура (.island-liquid) — копии нет. */
#floatingIslandDock:is(.dock-splitting, .dock-morphing) .nm-backlens,
:root:not([data-glass="full"]) .nm-backlens { visibility: hidden; }

/* Линза над обложкой плеера (core/coverlens.js, проба 16.11, по флагу ?coverlens=1).
   Стекло нарисовано из копий обложки обычным filter — backdrop-filter тут нет. */
.ios-player-modal .cover-lens {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: flex;
  padding: 2px;
  border-radius: 22px;
}
.cover-lens-glass,
.cover-lens-frost,
.cover-lens-rim,
.cover-lens-tint {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}
.cover-lens-frost img,
.cover-lens-rim img {
  position: absolute;
  max-width: none;
  object-fit: cover;
}
.cover-lens-frost { filter: var(--piece-filter); }
/* Над картинкой стекло «прозрачное», как кнопки Apple поверх обложек: подкраска вдвое слабее. */
.cover-lens-tint { background: color-mix(in srgb, var(--piece-tint) 50%, transparent); }
/* Кромка, блики и тень — поверх стекла, под значками (inset-тень иначе легла бы под слои). */
.ios-player-modal .cover-lens::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: var(--piece-shadow);
  pointer-events: none;
}
.ios-player-modal .cover-lens .cover-lens-btn {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: none;
}
.ios-player-modal .cover-lens .cover-lens-btn svg { width: 24px; height: 24px; }
/* WebGL-линза (core/glasslens.js): рисует всё стекло сама, тон — тем же фильтром,
   что у матового слоя. Только на полном стекле; иначе — слои из копий. */
.cover-lens-gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  filter: var(--piece-tone, none);
}
:root[data-glass="full"] .cover-lens.has-gl .cover-lens-gl { display: block; }
:root[data-glass="full"] .cover-lens.has-gl :is(.cover-lens-frost, .cover-lens-rim) { display: none; }
.ios-player-modal.has-coverlens:not(.queue-mode) .ios-track-actions { visibility: hidden; }
.ios-player-modal:is(.queue-mode, .clip-mode, .player-morphing) .cover-lens,
:root:not([data-glass="full"]) .cover-lens-rim { display: none; }
/* Сжатие «каплей» (island.js liquidCollapse): капля мини-плеера рвёт таб-бар
   надвое, правая половинка — это стекло. Оно видно только во время сжатия и
   в конце встаёт ровно на место кружка поиска; до этого у кружка своего
   стекла нет, иначе вышло бы два стекла друг на друге. */
#floatingIslandDock .island-split-half {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--mini-h);
  height: var(--mini-h);
  border: 1px solid var(--dock-rim);
  border-radius: calc(var(--mini-h) / 2);
  --glass-blur: var(--piece-refract, var(--piece-filter));
  background: var(--piece-tint);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--piece-shadow-dock);   /* край как у Apple Music, 16.11 */
  pointer-events: none;
  visibility: hidden;
  transform: translateZ(0);
}
/* Сжатие «каплей»: стекло рисует одна общая фигура (.island-liquid, clip-path
   из island.js), а сами куски дока прозрачны и только везут иконки. */
#floatingIslandDock.dock-splitting :is(.island-main-row, .island-mini-player, .island-split-half, .island-circle-nav-btn[data-tab="searchTab"]),
/* После разрыва (dock-handoff) общей фигуры уже нет, стекло у самих кусков;
   справа его везёт половинка, у кружка поиска своё появится в самом конце. */
#floatingIslandDock.dock-handoff .island-circle-nav-btn[data-tab="searchTab"] {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
#floatingIslandDock .island-liquid,
#floatingIslandDock .island-liquid-rim {
  position: absolute;
  pointer-events: none;
  visibility: hidden;
}
#floatingIslandDock .island-liquid {
  background: var(--piece-tint);
  /* Линза — та же, что у кусков дока: карту по капсулам фигуры ставит
     island.js через NMRefract.shape (владелец 16.11). Без неё — размытие. */
  backdrop-filter: var(--piece-refract, var(--piece-filter));
  -webkit-backdrop-filter: var(--piece-refract, var(--piece-filter));
}
#floatingIslandDock .island-liquid-rim { overflow: visible; }
.island-liquid-rim .lq-shadow { fill: color-mix(in srgb, #000 calc(var(--piece-dark) * 16%), transparent); }
.island-liquid-rim .lq-rim { fill: none; stroke-width: 2; stroke: color-mix(in srgb, #fff calc(var(--piece-light) * 14%), transparent); }
.island-liquid-rim .lq-glint-top { fill: color-mix(in srgb, #fff calc(var(--piece-light) * 90%), transparent); }
.island-liquid-rim .lq-glint-bottom { fill: color-mix(in srgb, #fff calc(var(--piece-light) * 50%), transparent); }
/* Док без обводки (проба 15.11): у сжатия и раскрытия дока тоже ни кольца, ни
   бликов — только тень. Меню-капля (.pop-liquid-rim) берёт .lq-* отдельно. */
/* У капли дока бликов нет, а контур — та же волосяная линия, что у дока
   (обводка 2px по контуру, наружная половина срезана формой → 1px). */
#floatingIslandDock .island-liquid-rim :is(.lq-glint-top, .lq-glint-bottom) { display: none; }
#floatingIslandDock .island-liquid-rim .lq-rim { stroke: var(--dock-rim); }
/* Меню «капелькой» (core/liquidpop.js): пока капля в пути, стекло рисует эта
   фигура; оттенок и размытие ей ставит скрипт — как у стекла самого меню. */
.pop-liquid,
.pop-liquid-rim {
  position: fixed;
  pointer-events: none;
  visibility: hidden;
}
.pop-liquid {
  background: var(--piece-tint);
  backdrop-filter: var(--piece-filter);
  -webkit-backdrop-filter: var(--piece-filter);
}
.pop-liquid-rim { overflow: visible; }
/* Долгое нажатие (core/popover.js, lift): копия зажатого элемента — первым
   разделом стекла меню; фон за меню размыт и притушен, как в iOS. */
:is(#trackActionSheet, #menuSheet).is-popover .glass-group.pop-preview {
  display: flex !important;
  flex: 0 0 auto;
  flex-direction: row !important;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  pointer-events: none;
  border-bottom: 1px solid var(--line-soft);
}
/* Шапка: обложка 48px по краю значков пунктов, справа название и исполнитель. */
.pop-head-art {
  position: relative;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
}
.pop-head-art > * { position: absolute !important; left: 0 !important; top: 0 !important; transform-origin: 0 0; }
.pop-head-text { min-width: 0; flex: 1 1 auto; transform-origin: 0 0; }
.pop-head-title, .pop-head-sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pop-head-title { font-size: 16px; font-weight: 600; line-height: 1.25; color: var(--text, #fff); }
.pop-head-sub { font-size: 13px; line-height: 1.3; margin-top: 2px; color: var(--text-secondary, rgba(235,235,245,.6)); }
.pop-head-sub:empty { display: none; }
.ios-sheet-backdrop.is-popover > .pop-dim {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  background: color-mix(in srgb, var(--bg, #000) 30%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
}
@supports not (backdrop-filter: blur(1px)) {
  #floatingIslandDock :is(.island-mini-player, .island-main-row),
  #floatingIslandDock.dock-compact .island-circle-nav-btn[data-tab="searchTab"],
  body #selectBar :is(.select-bar-count, .select-bar-actions) { background: var(--bg-surface); }
}
:root[data-glass="lite"] {
  --piece-filter: blur(12px) saturate(90%);
  --piece-tint: color-mix(in srgb, var(--bg-surface) 86%, transparent);
}
:root[data-glass="solid"] {
  --piece-filter: none;
  --piece-tint: var(--bg-surface-raised);
}

/* Шторкой снизу группы не видны: строки идут одной колонкой, как раньше. */
#trackActionSheet .glass-group { display: flex; flex-direction: column; }
#trackActionSheet .glass-group:not(:has(> .sheet-action-row:not(.hidden))) { display: none; }

/* Соседнее стекло со списком плейлистов для выбранного трека. */
#trackActionSheet .playlist-side-glass {
  position: fixed;
  z-index: 2;
  box-sizing: border-box;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border-radius: 24px;
  padding: 8px;
  background: var(--piece-tint);
  -webkit-backdrop-filter: var(--piece-refract, var(--piece-filter));
  backdrop-filter: var(--piece-refract, var(--piece-filter));
  box-shadow: var(--piece-shadow);
}
#trackActionSheet .playlist-liquid-body {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  background: var(--piece-tint);
  -webkit-backdrop-filter: var(--piece-filter);
  backdrop-filter: var(--piece-filter);
  box-shadow: var(--piece-shadow);
}
#trackActionSheet.playlist-liquid-active .action-sheet-actions,
#trackActionSheet.playlist-liquid-active .playlist-side-glass {
  background: transparent !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
#trackActionSheet.playlist-liquid-active .playlist-side-glass > * {
  opacity: var(--playlist-liquid-content, 0);
}
.playlist-side-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 7px 8px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.playlist-side-row.is-pressed { background: var(--inset); }
.playlist-side-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.playlist-side-art { width: 38px; height: 38px; flex: 0 0 38px; }
.playlist-side-art .pl-cover { width: 100%; height: 100%; border-radius: 9px; }
.playlist-side-name { min-width: 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 600; line-height: 1.25; }
@media (max-width: 600px) {
  #trackActionSheet.playlist-side-open .sheet-action-row { gap: 8px; padding-left: 10px; padding-right: 10px; font-size: 14px; }
  #trackActionSheet.playlist-side-open .sheet-action-row svg:not(.sheet-row-chevron) { flex-basis: 18px; width: 18px; height: 18px; }
}
/* В общем меню (openMenuSheet) шторкой снизу каждая строка — своя плашка. */
#menuSheet .glass-group { display: contents; }
#menuSheet.is-popover .glass-group { display: flex; flex-direction: column; }

/* Окно — только рамка с местом под тени кусочков. */
#trackActionSheet.is-popover > .ios-action-sheet-card,
#menuSheet.is-popover:has(.glass-group) > #menuSheetCard {
  width: min(280px, calc(100vw - 12px));
  padding: 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  isolation: auto;
  translate: none;
  scale: none;
}
#trackActionSheet.is-popover > .ios-action-sheet-card::before,
#menuSheet.is-popover:has(.glass-group) > #menuSheetCard::before { display: none; }
/* Одно стекло на всё меню, как у системного меню iOS 26: группы пунктов —
   разделы внутри него, а между разделами тонкая полоска. */
:is(#trackActionSheet, #menuSheet).is-popover .action-sheet-actions:has(> .glass-group) { gap: 0; }
:is(#trackActionSheet, #menuSheet).is-popover .glass-group + .glass-group:not(:empty)::before {
  content: "";
  flex: 0 0 auto;
  height: 1px;
  margin: 4px 18px;
  background: color-mix(in srgb, var(--text) 14%, transparent);
  pointer-events: none;
}

/* Строки общего меню — как в меню трека. */
#menuSheet.is-popover .glass-group > .sheet-action-row {
  flex-direction: row;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 0;
  font-size: 15px;
  line-height: 1.3;
  touch-action: none;
}
#menuSheet.is-popover .liquid-scrollable .glass-group > .sheet-action-row { touch-action: pan-y; }
#menuSheet.is-popover .glass-group > .sheet-action-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
/* «Оформление» в профиле: варианты — строки одного кусочка, без зазоров. */
#menuSheet.is-popover .glass-group.profile-sheet-options { gap: 0; }
#menuSheet.is-popover .glass-group > .profile-quality-option { gap: 12px; }
#menuSheet.is-popover .profile-quality-option .profile-option-title { font-size: 15px; font-weight: 600; }
/* «Размытие стекла»: ползунок и живой пример — маленькое стекло над пёстрой
   картинкой. Стекло примера берёт тот же фильтр, что меню и док
   (--piece-refract от NMRefract.apply, иначе --piece-filter). */
#menuSheet .profile-blur-group { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; }
.profile-blur-head { display: flex; align-items: baseline; justify-content: space-between; }
#menuSheet.is-popover .profile-blur-head .profile-option-title { font-size: 15px; }
.profile-blur-value { font-size: 15px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.profile-blur-preview {
  position: relative;
  height: 72px;
  border-radius: 16px;
  overflow: hidden;
  isolation: isolate;
}
.profile-blur-scene {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 1px 2px rgb(0 0 0 / .35);
  background:
    repeating-linear-gradient(115deg, rgb(255 255 255 / .55) 0 3px, transparent 3px 14px),
    linear-gradient(110deg, #ff5f6d 0%, #ffc371 30%, #3ad29f 55%, #4facfe 78%, #a259ff 100%);
}
.profile-blur-glass {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 30%;
  right: 30%;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  background: var(--piece-tint);
  box-shadow: var(--piece-shadow);
  -webkit-backdrop-filter: var(--piece-refract, var(--piece-filter));
  backdrop-filter: var(--piece-refract, var(--piece-filter));
}
.profile-blur-range { width: 100%; margin: 2px 0; accent-color: var(--accent); touch-action: pan-x; }
.profile-blur-note { margin-top: 0; }

:is(#trackActionSheet, #menuSheet).is-popover .action-sheet-actions:has(> .glass-group) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 24px;
  background: var(--piece-tint);
  /* С преломлением (core/refract.js) фильтр целиком из --piece-refract: в нём
     и размытие, и изгиб края. Без него — обычное матовое стекло. Токен
     собираем здесь, а не в :root: --piece-refract стоит у самого кусочка. */
  --glass-blur-piece: var(--piece-refract, var(--piece-filter));
  -webkit-backdrop-filter: var(--glass-blur-piece);
  backdrop-filter: var(--glass-blur-piece);
  box-shadow: var(--piece-shadow);
  /* Упругость под пальцем — у того кусочка, которого коснулись (app.js). */
  translate: var(--liquid-x, 0px) var(--liquid-y, 0px);
  scale: var(--liquid-scale-x, 1) var(--liquid-scale-y, 1);
  /* Отпустили — стекло мягко оседает на место пружиной settle (motion.js). Радиус возвращается той же кривой, что и растяжение, —
     угол на экране не меняется. */
  transition: translate var(--dur-move) var(--ease-settle), scale var(--dur-move) var(--ease-settle), border-radius var(--dur-move) var(--ease-settle);
}
:is(#trackActionSheet, #menuSheet).is-popover .action-sheet-actions:has(> .glass-group).liquid-pressing { transition: translate var(--dur-press) var(--ease), scale var(--dur-press) var(--ease), border-radius var(--dur-press) var(--ease); }

/* Касание, как у Liquid Glass в iOS 26: под строкой — плашка, которая
   перетекает между строками вслед за пальцем (::after, --hl-y и --hl-h ставит
   app.js), а из точки касания по стеклу расходится мягкий свет (::before). */
:is(#trackActionSheet, #menuSheet).is-popover .glass-group > .sheet-action-row { position: relative; z-index: 1; }
:is(#trackActionSheet, #menuSheet).is-popover .action-sheet-actions:has(> .glass-group)::before,
:is(#trackActionSheet, #menuSheet).is-popover .action-sheet-actions:has(> .glass-group)::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
}
/* Свет от пальца — только пока кусочек нажат (.liquid-pressing), не при
   наведении курсора: при наведении хватает плашки. Свет живёт в стекле, а не
   лежит белым пятном поверх: ярче всего ловит его кромка рядом с пальцем
   (кольцо в 1,5px по краю кусочка), а толща стекла светлеет едва заметно.
   Маска: кольцо = весь слой минус внутренность, плюс заливка на 22 %. */
:is(#trackActionSheet, #menuSheet).is-popover .action-sheet-actions:has(> .glass-group)::before {
  /* --glow-top: прокрутка кусочка со своим списком (app.js), иначе 0. */
  inset: var(--glow-top, 0px) 0 auto;
  height: 100%;
  box-sizing: border-box;
  padding: 1.5px;
  border-radius: inherit;
  background: radial-gradient(circle 110px at var(--action-glow-x, 50%) var(--action-glow-y, 50%),
    color-mix(in srgb, #fff 55%, transparent) 0%,
    color-mix(in srgb, #fff 18%, transparent) 45%,
    transparent 100%);
  -webkit-mask:
    linear-gradient(rgb(0 0 0 / 0.22) 0 0) border-box,
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0) border-box;
  mask:
    linear-gradient(rgb(0 0 0 / 0.22) 0 0) border-box,
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0) border-box;
  -webkit-mask-composite: source-over, xor;
  mask-composite: add, exclude;
  mix-blend-mode: plus-lighter;
  transition: opacity var(--dur-short) var(--ease);
}
/* Плашка отстоит от краёв кусочка одинаково со всех сторон (--hl-inset), а её
   скругление — радиус кусочка минус отступ: углы плашки идут параллельно углам
   стекла. */
:is(#trackActionSheet, #menuSheet).is-popover .action-sheet-actions:has(> .glass-group)::after {
  --hl-inset: 5px;
  top: 0;
  left: var(--hl-left, var(--hl-inset));
  right: auto;
  width: var(--hl-w, calc(100% - 10px));
  height: min(52px, calc(var(--hl-h, 48px) - 4px));
  translate: var(--hl-x, 0px) calc(var(--hl-y, 0px) + (var(--hl-h, 48px) - min(52px, var(--hl-h, 48px) - 4px)) / 2);
  border-radius: calc(24px - var(--hl-inset));
  /* Форма капли-плашки: набухание и вытяжка в пути (app.js, plateTo). */
  scale: var(--hl-sx, 1) var(--hl-sy, 1);
  background: color-mix(in srgb, var(--text) 11%, transparent);
  box-shadow: none;
  transition: opacity var(--dur-fast) var(--ease);
}
:is(#trackActionSheet, #menuSheet).is-popover .action-sheet-actions:has(> .glass-group).has-action-glow.liquid-pressing::before { opacity: 1; transition: opacity var(--dur-fast) var(--ease); }
:is(#trackActionSheet, #menuSheet).is-popover .action-sheet-actions:has(> .glass-group).has-action-glow::after {
  opacity: 1;
  transition: opacity var(--dur-fast) var(--ease), translate var(--dur-short) var(--ease-out);
}
/* Плашку ведут пружины (app.js) — свой переход сдвига у неё выключаем. */
:is(#trackActionSheet, #menuSheet).is-popover .action-sheet-actions:has(> .glass-group).has-action-glow.hl-live::after {
  transition: opacity var(--dur-fast) var(--ease);
}

/* Растянутый пальцем кусочек выходит за окно — без прокрутки окно его не режет. */
#trackActionSheet.is-popover > .ios-action-sheet-card:not(.liquid-scrollable),
#menuSheet.is-popover:has(.glass-group) > #menuSheetCard:not(.liquid-scrollable) { overflow: visible; }

/* ==========================================================================
   Плейлисты — экран по референсу Apple Music: стеклянные кнопки сверху,
   крупный заголовок, плоский список с шевронами или сетка обложек.
   ========================================================================== */
#playlistsOverviewView .pl-ov-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 52px;
  margin-bottom: 0;
  padding: calc(var(--tg-header-clearance) + 6px) var(--page-gutter) 8px;
}
#playlistsOverviewView .pl-ov-nav .playlist-back-btn,
#playlistsOverviewView .pl-ov-nav .pl-ov-more {
  width: 44px;
  height: 44px;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  color: var(--text);
}
#playlistsOverviewView .pl-ov-nav .playlist-back-btn svg { width: 22px; height: 22px; fill: currentColor; }
#playlistsOverviewView .pl-ov-nav .pl-ov-more svg { width: 22px; height: 22px; }
#playlistsOverviewView .pl-ov-actions { gap: 8px; margin-left: auto; padding: 0; background: transparent; }
#playlistsOverviewView .pl-ov-pill {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
}
#playlistsOverviewView .pl-ov-pill-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
#playlistsOverviewView .pl-ov-pill-btn svg { width: 22px; height: 22px; }
#playlistsOverviewView .pl-ov-pill-btn.is-pressed { background: var(--inset); }
#playlistsOverviewView .pl-ov-title {
  margin: 6px 0 14px;
  font-size: var(--title-size-hero);
  font-weight: 700;
  letter-spacing: var(--title-track-hero);
  line-height: var(--title-line-hero);
  color: var(--text);
}

/* Список: плоские строки, разделитель начинается от текста, справа шеврон. */
#playlistsOverviewView .ios-playlists-catalog-list { gap: 0; }
#playlistsOverviewView .playlist-catalog-item {
  position: relative;
  min-height: 0;
  padding: 7px 0 7px 0;
  gap: 14px;
  background: transparent;
  border: 0;
  border-radius: 0;
}
#playlistsOverviewView .playlist-catalog-item::after {
  content: "";
  position: absolute;
  left: 94px;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--line-soft);
}
#playlistsOverviewView .playlist-catalog-item:last-child::after { content: none; }
#playlistsOverviewView .playlist-catalog-art {
  width: 80px;
  height: 80px;
  flex: 0 0 80px;
  border-radius: 9px;
  box-shadow: none;
  background: var(--bg-surface-raised);
}
#playlistsOverviewView .playlist-catalog-info { justify-content: center; gap: 3px; padding-right: 4px; }
#playlistsOverviewView .playlist-catalog-title { font-size: 19px; font-weight: 500; letter-spacing: -0.015em; }
#playlistsOverviewView .playlist-catalog-sub { display: none; }
#playlistsOverviewView .playlist-catalog-chev {
  flex: 0 0 auto;
  width: 9px;
  height: 15px;
  margin: 0 6px 0 4px;
  color: var(--text-muted);
}

/* Сетка: две колонки, под обложкой название и число треков. */
#playlistsOverviewView .ios-playlists-catalog-list.is-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 14px;
}
#playlistsOverviewView .is-grid .playlist-catalog-item {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 0;
}
#playlistsOverviewView .is-grid .playlist-catalog-item::after,
#playlistsOverviewView .is-grid .playlist-catalog-chev { display: none; }
#playlistsOverviewView .is-grid .playlist-catalog-art {
  width: 100%;
  height: auto;
  flex: 0 0 auto;
  aspect-ratio: 1;
  border-radius: 12px;
}
#playlistsOverviewView .is-grid .playlist-catalog-info { padding: 0 2px; gap: 2px; }
#playlistsOverviewView .is-grid .playlist-catalog-title { font-size: 16px; font-weight: 600; }
#playlistsOverviewView .is-grid .playlist-catalog-sub { display: block; font-size: 14px; }

/* Режим выбора: отметка раскрывается слева, шеврон уходит. */
#playlistsOverviewView .is-selecting .playlist-catalog-chev { display: none; }
#playlistsOverviewView .is-selecting .playlist-catalog-item.is-selected { background: transparent; }

/* Пустой плейлист — обложка с анимацией (внутри SVG свой reduced-motion). */
.pl-cover.pl-empty {
  background: var(--bg-surface-raised);
}
.pl-cover.pl-empty img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Меню «Вид и сортировка»: отметка слева, затем значок и название. */
#menuSheet .sheet-action-row.pl-sort-row {
  flex-direction: row;
  gap: 12px;
  justify-content: flex-start;
  padding-left: 16px;
}
#menuSheet .pl-sort-row .pl-check,
#menuSheet .pl-sort-row .pl-check-gap {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
}
#menuSheet .pl-sort-row .pl-check {
  fill: none;
  stroke: var(--text);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#menuSheet .pl-sort-row svg:not(.pl-check) { width: 22px; height: 22px; }

/* Меню у кнопки, которому не хватило высоты: строки плотнее, а срез — с затуханием
   у тех краёв, за которые ещё можно прокрутить (core/popover.js). */
#trackActionSheet.is-popover .is-tight .sheet-action-row,
#trackActionSheet.is-popover.is-tight .sheet-action-row,
#menuSheet.is-popover .is-tight .glass-group > .sheet-action-row,
#menuSheet.is-popover.is-tight .glass-group > .sheet-action-row,
.ios-sheet-backdrop.is-popover > .ios-action-sheet-card.is-tight .sheet-action-row {
  min-height: 40px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.ios-sheet-backdrop.is-popover > .ios-action-sheet-card.is-clipped {
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 var(--pop-fade-t, 0px), #000 calc(100% - var(--pop-fade-b, 0px)), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 var(--pop-fade-t, 0px), #000 calc(100% - var(--pop-fade-b, 0px)), transparent 100%);
  scrollbar-width: none;
}
.ios-sheet-backdrop.is-popover > .ios-action-sheet-card.is-clipped::-webkit-scrollbar { display: none; }

/* Страница плейлиста: большая обложка без тени, как в референсе Apple Music.
   Ширина — две трети экрана; селектор с запасом по весу, чтобы liquid.css не перебил. */
#playlistsDetailView .playlist-stage-header .playlist-art-stage {
  width: min(66vw, 300px);
  height: min(66vw, 300px);
  margin: 6px auto 26px;
}
#playlistsDetailView .playlist-stage-header .playlist-art-wrap {
  border-radius: 12px;
  box-shadow: none;
}
#playlistsDetailView .playlist-stage-header .playlist-hero-title { font-size: 26px; font-weight: 800; }
#playlistsDetailView .playlist-stage-header .playlist-hero-sub { font-size: 14px; font-weight: 600; }

/* ==========================================================================
   Списки в Медиатеке — Синхронизация, Статистика: тот же плоский
   вид, что у строк плейлистов. Без карточек и рамок: крупная плитка слева,
   название 19px, тонкая линия-разделитель от текста, справа приглушённый шеврон.
   ========================================================================== */


/* Синхронизация: список сервисов */
#syncView .nm-provider-list { gap: 0; }
#syncView .nm-provider {
  position: relative;
  gap: 14px;
  padding: 7px 0;
  border-radius: 0;
  background: transparent;
}
#syncView .nm-provider::after {
  content: "";
  position: absolute;
  left: 70px;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--line-soft);
}
#syncView .nm-provider:last-child::after { content: none; }
#syncView .nm-provider.is-pressed { scale: 1; background: var(--inset); }
#syncView .nm-provider-mark { width: 56px; height: 56px; --mark-radius: 12px; }
#syncView .nm-provider-name { font-size: 19px; font-weight: 500; letter-spacing: -0.015em; }
#syncView .nm-provider-sub { margin-top: 2px; font-size: 14px; }

/* Статистика: «Итоги года» и топ артистов */
#replayView .replay-wrapped-link {
  position: relative;
  margin: 0 0 8px;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
}
#replayView .replay-wrapped-copy strong { font-size: 19px; font-weight: 500; letter-spacing: -0.015em; }
#replayView .replay-wrapped-copy span { font-size: 14px; }
#replayView .replay-wrapped-link svg { width: 18px; height: 18px; margin-right: 2px; color: var(--text-muted); }
#replayView .replay-artists,
#replayView .replay-all-list { gap: 0; }
#replayView .replay-artist-card {
  position: relative;
  gap: 14px;
  padding: 7px 0;
  border-radius: 0;
  background: transparent;
}
#replayView .replay-artist-card::after {
  content: "";
  position: absolute;
  left: 78px;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--line-soft);
}
#replayView .replay-artist-card:last-child::after { content: none; }
#replayView .replay-artist-card:has(.replay-artist-rank)::after { left: 116px; }
#replayView .replay-artist-card.is-pressed { background: var(--inset); }
#replayView .replay-artist-avatar { width: 64px; height: 64px; border-radius: 10px; }
#replayView .replay-artist-name { font-size: 19px; font-weight: 500; letter-spacing: -0.015em; }
#replayView .replay-artist-card .profile-chevron { color: var(--text-muted); margin: 0 6px 0 4px; }

/* ==========================================================================
   Шапка Telegram — часть интерфейса, а не помеха.
   1) «Назад» в Telegram своя (body.tg-native-back, app.js): наши шевроны
      в шапках экранов её только дублировали — внутри Telegram их нет.
      В обычном браузере они остаются: там «Назад» больше взять неоткуда.
   2) Полоса кнопок Telegram (body.tg-top-band, app.js: телефон и полный
      экран). Кнопки действий экрана — всё, что помечено .tg-band, — встают
      в эту полосу вплотную слева от «⌄ ⋯» и выглядят как кнопки Telegram:
      капсула той же высоты и такое же стекло.
      Капсула Telegram (сверено со снимком iPhone шириной 393pt, 1179 px
      при 3×): высота 30, ширина 72, правый край в 16 от края экрана; по
      высоте — посередине полосы его кнопок (под строкой состояния --sat,
      высота полосы --tg-content-safe-top). Высоту полосы и строки состояния
      сообщает сам Telegram; размер капсулы Telegram не сообщает, но в iOS
      он задан в точках (pt) и от ширины экрана не зависит, а отсчёт идёт
      от правого края — поэтому формула держится на любом iPhone.
      core/tgband.js после переходов меряет, где кнопка встала на деле,
      и досдвигает её (--tgb-dx / --tgb-dy), если её увёл предок
      с трансформацией.
      Стекло капсулы Telegram не белит фон, а размывает и насыщает его:
      над жёлтым фоном 122,96,44 капсула 134,100,30, над синим 35,49,76 —
      49,68,105. Поэтому у нас то же: размытие с насыщенностью 1,5 и 6 %
      белого (--glass-blur-band; в режимах «lite» / «solid» стекла нет).
      Где что стоит: аватар профиля на вкладках; «+ / вид / ещё» у плейлистов;
      действия плейлиста; год в «Статистике»; поиск в «Чартах»; «Поделиться»
      у артиста и в плеере.
   ========================================================================== */
body.tg-native-back [data-nm-back] { display: none; }
body.tg-native-back .nm-screen .nm-head-slot { display: none; }

body.tg-top-band {
  --tg-pill-h: 30px;
  --tg-pill-top: calc(var(--sat) + max(4px, (var(--tg-content-safe-top, 0px) - var(--tg-pill-h)) / 2));
  --tg-menu-pill-w: 72px;   /* «⌄ ⋯» справа */
  --tg-band-right: calc(var(--tg-device-safe-right, 0px) + 16px + var(--tg-menu-pill-w) + 8px);
  --glass-blur-band: blur(20px) saturate(0.9);   /* глушит, а не разжигает цвет под кнопкой */
  --tg-pill-bg: color-mix(in srgb, #fff 6%, transparent);
  --tg-pill-ink: #fff;
  --tg-pill-edge: none;     /* у капсул Telegram обводки не видно */
}
:root[data-scheme="light"] body.tg-top-band {
  /* Как капсула Telegram в светлой теме: полупрозрачное стекло, а не
     плотная белая плашка — фон под ним просвечивает. */
  --tg-pill-bg: rgba(255, 255, 255, 0.42);
  --tg-pill-ink: #000;
  --tg-pill-edge: 0 0 0 0.5px rgba(0, 0, 0, 0.06);
}
/* Без живого стекла капсула — плотная плашка, чтобы значок читался на любом фоне. */
:root:is([data-glass="lite"], [data-glass="solid"]) body.tg-top-band {
  --glass-blur-band: none;
  --tg-pill-bg: color-mix(in srgb, var(--bg-surface-raised, #26272c) 92%, transparent);
}

/* Место в полосе. Экран под открытой страницей неактивен (inert, core/nav.js) —
   его кнопки уходят из полосы, чтобы не встать поверх кнопок верхней страницы. */
body.tg-top-band .tg-band {
  position: fixed;
  top: calc(var(--tg-pill-top) + var(--tgb-dy, 0px));
  right: calc(var(--tg-band-right) - var(--tgb-dx, 0px));
  left: auto;
  bottom: auto;
  z-index: 30;
  margin: 0;
  padding: 0;
}
body.tg-top-band [inert] .tg-band { visibility: hidden; }

/* Капсула: одиночная кнопка-значок или группа кнопок в одной капсуле. */
body.tg-top-band :is(#artistShareBtn, #playerShareBtn, #replayYearBtn),
body.tg-top-band :is(.pl-ov-actions, #playlistViewNav .subview-nav-right-slot),
body.tg-top-band .ios-circle-avatar.tg-band {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: auto;
  min-width: 44px;
  height: var(--tg-pill-h);
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: calc(var(--tg-pill-h) / 2);
  background: var(--tg-pill-bg);
  color: var(--tg-pill-ink);
  box-shadow: var(--tg-pill-edge);
  -webkit-backdrop-filter: var(--glass-blur-band);
  backdrop-filter: var(--glass-blur-band);
}
body.tg-top-band :is(#artistShareBtn, #playerShareBtn) svg { width: 18px; height: 18px; stroke-width: 2.2; }
body.tg-top-band :is(.charts-page-top, .charts-page-heading) { z-index: auto; }
body.tg-top-band #playerShareBtn .dock-label { display: none; }
/* Плеер: панель управления центрируется сдвигом (translate), а любой сдвиг
   у предка привязывает position: fixed к нему, а не к экрану. Центрируем
   через поля — «Поделиться» уходит в полосу, а в доке остаются три кнопки. */
@media (orientation: portrait), (min-height: 541px) {
  body.tg-top-band .ios-player-modal:not(.x) .player-fixed-controls { left: 0; right: 0; margin-inline: auto; translate: none; }
}
body.tg-top-band .ios-player-modal:is(.queue-mode,:not(.queue-mode)) .player-fixed-controls .ios-player-bottom-dock { grid-template-columns: repeat(3,1fr); }
body.tg-top-band .ios-player-modal:is(.queue-mode,:not(.queue-mode)) .player-fixed-controls #playerShareBtn { position: fixed; width: auto; min-width: 44px; height: var(--tg-pill-h); min-height: 0; color: var(--tg-pill-ink); background: var(--tg-pill-bg); border-radius: calc(var(--tg-pill-h) / 2); }

/* Группы: кнопки внутри капсулы прозрачные, по 36px. */
body.tg-top-band :is(.pl-ov-actions, #playlistViewNav .subview-nav-right-slot) { padding: 0 4px; }
body.tg-top-band #playlistsOverviewView .pl-ov-actions .pl-ov-pill {
  display: contents;
}
body.tg-top-band :is(.pl-ov-actions, #playlistViewNav .subview-nav-right-slot) button {
  width: 36px;
  height: var(--tg-pill-h);
  min-height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: calc(var(--tg-pill-h) / 2);
  background: transparent;
  box-shadow: none;
  color: inherit;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
body.tg-top-band :is(.pl-ov-actions, #playlistViewNav .subview-nav-right-slot) button.hidden { display: none; }
body.tg-top-band :is(.pl-ov-actions, #playlistViewNav .subview-nav-right-slot) button svg { width: 18px; height: 18px; }
body.tg-top-band #playlistViewNav #detailSelectBtn { width: auto; padding: 0 10px; font-size: 15px; font-weight: 600; }
/* Шапка «Плейлистов» опустела (кнопки в полосе) — заголовок поднимается к ней. */
body.tg-top-band #playlistsOverviewView .pl-ov-nav { min-height: 0; padding-bottom: 0; }
/* «Ещё» плейлистов — многоточие в круге: рядом с «⋯» Telegram его не спутать. */
body.tg-top-band .pl-ov-actions #playlistsMoreBtn svg {
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  padding: 3px;
  border: 1.6px solid currentColor;
  border-radius: 50%;
}

/* Плейлист: liquid.css красит его кнопки через два id — перебиваем тем же весом. */
body.tg-top-band #playlistsDetailView #playlistViewNav .subview-nav-right-slot {
  padding: 0 4px;
  border: 0;
  background: var(--tg-pill-bg);
  box-shadow: var(--tg-pill-edge);
}
body.tg-top-band #playlistsDetailView #playlistViewNav :is(#playlistMoreBtn, #saveOrderBtn, #detailSelectBtn) {
  width: 36px;
  height: var(--tg-pill-h);
  min-height: 0;
  border-radius: calc(var(--tg-pill-h) / 2);
  background: transparent;
  color: var(--tg-pill-ink);
}
body.tg-top-band #playlistsDetailView #playlistViewNav #detailSelectBtn { width: auto; padding: 0 10px; }

/* Год в «Статистике»: капсула с текстом. */
body.tg-top-band #replayYearBtn { gap: 4px; padding: 0 12px; font-size: 15px; font-weight: 600; }
body.tg-top-band #replayYearBtn svg { width: 12px; height: 12px; }

/* Аватар профиля на вкладках — кружок высотой с кнопки Telegram. */
body.tg-top-band :is(#homeTab, #mixesTab, #libraryTab, #searchTab) .ios-circle-avatar.tg-band,
body.tg-top-band #homeTab #homeUserAvatar {
  width: var(--tg-pill-h);
  height: var(--tg-pill-h);
  min-width: 0;
  min-height: 0;
  font-size: 12px;
  border: 0;
  background: var(--tg-pill-bg);
  color: var(--tg-pill-ink);
  box-shadow: var(--tg-pill-edge);
}
/* Кнопки полосы стоят на месте, пока экраны под ними едут (core/tgband.js).
   Уходящая вкладка свои прячет сразу — иначе два аватара на миг лежат друг
   на друге. Экран, с которого уезжает страница («Назад»), показывает свои
   кнопки, когда она уехала, — плавно, как кнопки панели в iOS; до того их
   накрывала затемняющая подложка страницы. */
body.tg-top-band .nav-tab-leaving .tg-band { visibility: hidden; }
body.tg-top-band .tg-band { transition: opacity var(--d-fast) var(--ease), scale var(--d-fast) var(--ease); }
body.tg-top-band .nav-uncovering .tg-band { opacity: 0; transition: none; }

/* Нажатие — как у кнопок Telegram: лёгкое сжатие. */
body.tg-top-band .tg-band.is-pressed,
body.tg-top-band .tg-band .is-pressed { scale: 0.92; }

/* ==========================================================================
   Профиль: те же плоские строки, что в Медиатеке и у плейлистов.
   Значок — в плитке 56px (как «Сервисы»), название 19px, линия от текста.
   ========================================================================== */
#profilePage .profile-rows { gap: 0; }
#profilePage .profile-row {
  position: relative;
  min-height: 0;
  padding: 7px 0;
  gap: 14px;
  border-radius: 0;
  background: transparent;
  font-size: 19px;
  font-weight: 500;
}
#profilePage .profile-row::after {
  content: "";
  position: absolute;
  left: 70px;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--line-soft);
}
/* Линии нет у последней видимой строки (за ней могут стоять скрытые). */
#profilePage .profile-row:not(:has(~ .profile-row:not(.hidden)))::after { content: none; }
#profilePage .profile-row.is-pressed { scale: 1; background: var(--inset); }
#profilePage .profile-row > svg:first-child {
  box-sizing: border-box;
  width: 56px;
  height: 56px;
  padding: 14px;
  border-radius: 12px;
  background: var(--bg-surface-raised);
  stroke-width: 1.7;
}
#profilePage .profile-row .profile-chevron { color: var(--text-muted); margin: 0 6px 0 4px; }

/* ==========================================================================
   Меню у кнопки — размеры родного меню iOS 26. Сверено со скриншотом меню
   «⋯» Telegram на iPhone шириной 393pt (снимок 1179 px, 3×; в 923-px копии
   2,35 px на pt): ширина 250, скругление 30, строки 42 при шрифте 17
   обычной толщины, значок (≈17pt) в 27 от левого края, текст в 60,
   по 9 сверху и снизу. Правый край меню — по правому краю кнопки, сверху —
   10 под ней (core/popover.js учитывает поля рамки, в которых лежат тени).
   ========================================================================== */
:root {
  --menu-w: 250px;
  --menu-r: 30px;
  --menu-pad-y: 9px;
}
.ios-sheet-backdrop.is-popover > .ios-action-sheet-card {
  width: min(var(--menu-w), calc(100vw - 24px));
  border-radius: var(--menu-r);
  padding: var(--menu-pad-y) 0;
}
#trackActionSheet.is-popover > .ios-action-sheet-card,
#menuSheet.is-popover:has(.glass-group) > #menuSheetCard {
  width: min(calc(var(--menu-w) + 20px), calc(100vw - 12px));
}
:is(#trackActionSheet, #menuSheet).is-popover .action-sheet-actions:has(> .glass-group) {
  --menu-r: 24px;
  /* Вместе с 2px вокруг плашки даёт те же 5px, что и по бокам. */
  padding-block: 3px;
  border-radius: var(--menu-r);
}
:is(#trackActionSheet, #menuSheet).is-popover .action-sheet-actions:has(> .glass-group)::after { border-radius: calc(var(--menu-r) - var(--hl-inset)); }
.ios-sheet-backdrop.is-popover .sheet-action-row,
#trackActionSheet.is-popover .sheet-action-row,
#menuSheet.is-popover .glass-group > .sheet-action-row {
  gap: 14px;
  min-height: 42px;
  padding: 10px 18px 10px 26px;
  font-size: 17px;
  font-weight: 400;
  line-height: 22px;
  letter-spacing: -0.02em;
}
.ios-sheet-backdrop.is-popover .sheet-action-row svg:not(.sheet-row-chevron) { flex: 0 0 20px; width: 20px; height: 20px; }

/* Стекло светлое, как у Telegram и iOS: в тёмной теме стекло — светлая дымка
   над размытым фоном, а не затемнение. Было: кусочки — 46 % цвета фона
   приложения и яркость 0,82, общее размытие — яркость 0,65 (liquid.css),
   и меню выходило почти чёрным (34,33,36) против (72–86) у меню Telegram.
   Светлая тема и уровни «lite» / «solid» перебивают это своими правилами
   (у них селектор весомее) и остаются как были. Ползунок
   «Размытие стекла» (--glass-frost) не трогаем. */
html:root {
  --glass-blur: blur(28px) saturate(0.85);
  --glass-blur-control: blur(22px) saturate(0.9);
  /* Фон под стеклом тускнеет, как у Apple (владелец 16.11: «текст подсвечивается
     под плашкой… Apple прямо наоборот яркость понижает»). contrast сжимает
     яркости к середине, brightness опускает: белый текст под стеклом 1 → ~0,53,
     тёмный фон ~0,12 → ~0,14 — дымка та же, светлое больше не горит.
     Было: saturate(0.85) brightness(0.9) — белый оставался 0,9. */
  --piece-tone: contrast(0.72) brightness(0.62) saturate(0.85);
  --piece-tint: color-mix(in srgb, #fff 12%, transparent);
}
/* Стекло глушит цвет, а не разжигает его — как системное стекло Apple: жёлтое
   под меню остаётся жёлтым, только чуть тише, а не становится кислотным.
   Раньше тон был saturate(180–185 %), и всё под стеклом выходило ярче, чем на
   самом деле. Без преломления (iPhone, Safari) размытие было всего 3px —
   почти прозрачное стекло, сквозь которое кислотный цвет и бил в глаза.
   Цвет теперь глушит тон, а размытие целиком в руках ползунка «Размытие
   стекла» (--glass-frost): 0 — фон под стеклом чёткий, обычно 6 → 9px
   (было 3 → 4,5px — владелец 13.11: «стекло прозрачное насквозь»).
   (Была основа 10px — даже на нуле стекло выходило матовым, «гауссовым».)
   Селектор весомее, чем у :root[data-scheme="light"], поэтому для светлой
   темы — своё правило ниже. Уровни «lite» / «solid» — свои, как были. */
html:root:not([data-glass="lite"], [data-glass="solid"]) {
  --piece-filter: blur(calc(var(--glass-frost) * 1.5)) var(--piece-tone);
}
html:root[data-scheme="light"]:not([data-glass="lite"], [data-glass="solid"]) {
  --glass-blur: blur(28px) saturate(0.9);
  /* В светлой — наоборот: тёмное под стеклом светлеет, белое остаётся белым
     (чёрный текст 0 → ~0,16). Было: saturate(0.85) brightness(1.02). */
  --piece-tone: contrast(0.72) brightness(1.14) saturate(0.85);
}
html:root:not([data-scheme="light"], [data-glass="lite"], [data-glass="solid"]) :is(#trackActionSheet, #menuSheet).is-popover .action-sheet-actions:has(> .glass-group) {
  --piece-tint: color-mix(in srgb, #fff 18%, transparent);
}

/* «Оттенок стекла» (Профиль → Оформление, colab.js): подкраска стекла меню,
   дока и мини-плеера — тёмная, светлая или цветом акцента. Без выбора
   (атрибута нет) стекло как было. Подкраску у самого окна меню ставит
   правило выше, поэтому перебиваем и его, тем же адресом. */
html:root[data-glass-tint]:not([data-glass="solid"]),
html:root[data-glass-tint]:not([data-glass="solid"]) :is(#trackActionSheet, #menuSheet) .action-sheet-actions:has(> .glass-group) {
  --piece-tint: var(--glass-tint-pick) !important;
}
html:root[data-glass-tint="dark"] { --glass-tint-pick: color-mix(in srgb, #000 34%, transparent); }

/* Компактные быстрые действия в меню трека. */
#trackActionSheet .sheet-quick-actions {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  padding: 5px 6px 8px;
}
#trackActionSheet .sheet-quick-actions > .sheet-quick-action {
  flex: 1 1 0;
  min-width: 0;
  min-height: 64px;
  padding: 8px 2px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.15;
  text-align: center;
  letter-spacing: 0;
}
#trackActionSheet .sheet-quick-actions > .sheet-quick-action.hidden { display: none; }
#trackActionSheet .sheet-quick-action > svg:not(.sheet-row-chevron) { flex: 0 0 21px; width: 21px; height: 21px; }
#trackActionSheet:not(.is-popover) .sheet-quick-action.is-pressed { background: var(--inset); }
#trackActionSheet.playlist-side-open .sheet-quick-action { font-size: 9px; letter-spacing: -0.02em; }
#trackActionSheet.is-popover .glass-group:not(.sheet-quick-actions) > .sheet-action-row {
  min-height: 40px;
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 15px;
  line-height: 20px;
}
html:root[data-glass-tint="light"] { --glass-tint-pick: color-mix(in srgb, #fff 30%, transparent); }
html:root[data-glass-tint="accent"] { --glass-tint-pick: color-mix(in srgb, var(--accent) 26%, transparent); }
html:root[data-glass-tint="clear"] { --glass-tint-pick: transparent; }


/* ==========================================================================
   Профиль: «Энергосбережение» показывает выбранный режим справа, как
   значение в «Настройках» iOS. «Оформление»: тема строками, акцент кружками,
   оттенок стекла капсулами. Кружки и капсулы — не .sheet-action-row: меню
   не тянется за пальцем, когда выбираешь цвет.
   ========================================================================== */
.profile-row > .profile-row-value {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 17px;
  font-weight: 400;
  color: var(--text-secondary);
}
#menuSheet .profile-pick-group { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; }
#menuSheet.is-popover .profile-pick-group .profile-option-title { font-size: 15px; }
#menuSheet .profile-pick-group .profile-option-note { margin-top: 0; }
.profile-swatches { display: grid; grid-template-columns: repeat(4, 28px); justify-content: space-between; row-gap: 12px; padding: 2px 4px; }
.profile-swatch {
  position: relative;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--swatch, var(--accent));
  color: #fff;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: scale var(--dur-press) var(--ease);
}
.profile-swatch:active { scale: 0.9; }
.profile-swatch-tg { background: linear-gradient(135deg, #2aabee, #229ed9); }
.profile-swatch.is-checked { outline: 2px solid var(--swatch, var(--text)); outline-offset: 2px; }
.profile-swatch-tg.is-checked { outline-color: #2aabee; }
.profile-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-chip {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 10%, transparent);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), scale var(--dur-press) var(--ease);
}
.profile-chip:active { scale: 0.95; }
.profile-chip.is-checked { background: var(--accent); color: var(--accent-on, #fff); }

/* Плеер, текст песни и эквалайзер всегда на тёмном фоне из цвета обложки —
   в светлой теме внутри них остаются светлые буквы (иначе тёмный текст
   темы сливался с фоном плеера). */
:root[data-scheme="light"] .ios-player-modal,
:root[data-scheme="light"] .ios-lyrics-sheet,
:root[data-scheme="light"] .ios-studio-sheet {
  --text: #f5f4f0;
  --text-secondary: #bab8b2;
  --text-muted: #b0aea8;
  --dock-icon: #ffffff;
  --line: rgba(255, 255, 255, 0.08);
  --line-soft: rgba(255, 255, 255, 0.04);
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --bg-card-active: rgba(255, 255, 255, 0.1);
  /* Капсула «Поделиться» над тёмным плеером — тёмное стекло, как «⌄ ⋯» Telegram рядом. */
  --tg-pill-bg: color-mix(in srgb, #fff 6%, transparent);
  --tg-pill-ink: #fff;
  --tg-pill-edge: none;
  color-scheme: dark;
}

/* Док: нажатая неактивная вкладка — лёгкая подложка сразу (в обеих темах),
   а не через 480 мс перетекания активного пузыря. */
.ios-floating-island-dock .island-circle-nav-btn.is-pressed:not(.active) {
  background: color-mix(in srgb, var(--text) 8%, transparent);
  transition: background-color var(--d-fast) var(--ease), color var(--d-fast) var(--ease);
}

/* Линза дока (app.js dockLens), как в Apple Music на iOS 26: пока палец на
   таб-баре, плашка выбранной вкладки — прозрачная линза крупнее капсулы, с ярким
   краем и без матового фона; вкладка под ней — акцентом и крупнее («лупа»),
   остальные — обычным цветом. Размытия под линзой нет: у Apple она тоже чистая,
   и бюджет стекла (guards) не растёт. */
#floatingIslandDock .dock-lens {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  transform-origin: 50% 50%;
  /* Обрезка формой капли — ПОСЛЕ фильтра изгиба (он во вложенном .dock-lens-view):
     иначе сдвинутые куски вкладок видны в углах за скруглением. */
  overflow: hidden;
  background: color-mix(in srgb, #fff 7%, transparent);
  /* Контур — тот же, что у капсулы дока и мини-плеера (--piece-shadow): белое кольцо
     выбивалось (владелец 14.11). Тема подставляется сама через --piece-light/-dark. */
  box-shadow: var(--piece-shadow);
  /* transform ведёт пружина капли в app.js (инерция, вытяжка, колыхание) — тут только появление */
  transition: opacity var(--dur-fast) var(--ease);
}
/* Светлая тема: контур тот же --piece-shadow (сам светлый), фон чуть плотнее. */
:root[data-scheme="light"] #floatingIslandDock .dock-lens {
  background: color-mix(in srgb, #fff 12%, transparent);
}
#floatingIslandDock.lens-live .dock-lens { opacity: 1; }
/* Отпустил: капля прилипает и опадает в плашку, потом гаснет — колыхание успевает быть видно. */
#floatingIslandDock.lens-settling .dock-lens {
  opacity: 0;
  transition: opacity var(--dur-release) var(--ease) var(--dur-fast);
}
/* Блик капли — как солнце справа: белые дуги по кромке, в покое еле видны, на ходу
   разгораются (--shine 0…1 и --tilt из app.js). Радуги здесь нет: её даёт само
   содержимое у кромки, расслоённое на цвета фильтром #nmLensBend.
   Кромка — чёткое кольцо 2px (::before), за ним .dock-lens-glow — то же кольцо
   толщиной 14px, размытое: к центру линзы блик расплывается и тает. Размытие на
   обёртке, маска на её ::before — маска применяется после filter и иначе снова
   обрезала бы его в полоску. Наружу свечение не вылезает: .dock-lens режет по форме. */
#floatingIslandDock .dock-lens-rim {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  --spectrum: conic-gradient(from calc(var(--tilt, 0deg) + 25deg),
    transparent 0 3%, rgba(255, 255, 255, 0.95) 14%, transparent 30% 50%,
    rgba(255, 255, 255, 0.6) 64%, transparent 80%);
  /* В покое бликов нет — контур как у дока; на ходу капля «ловит солнце». */
  opacity: calc(0.7 * var(--shine, 0));
}
#floatingIslandDock .dock-lens-rim::before,
#floatingIslandDock .dock-lens-glow::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: var(--spectrum);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
#floatingIslandDock .dock-lens-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  filter: blur(8px);
  opacity: calc(0.55 * var(--shine, 0));
}
#floatingIslandDock .dock-lens-glow::before { padding: 14px; }
:root[data-scheme="light"] #floatingIslandDock .dock-lens-rim { mix-blend-mode: normal; opacity: calc(0.5 * var(--shine, 0)); }
/* Капсула при касании набухает и колышется на пружинах линзы (app.js, dockLens) —
   инлайновыми scale/translate каждый кадр, без CSS-перехода. */
#floatingIslandDock.dock-lensing .island-circle-nav-btn.dock-tab {
  transition: scale var(--dur-release) var(--ease-micro), translate var(--dur-release) var(--ease-micro),
    color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
#floatingIslandDock.lens-dragging .island-circle-nav-btn.dock-tab {
  transition: color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
#floatingIslandDock.lens-live .island-circle-nav-btn.dock-tab { background: transparent; }
#floatingIslandDock.lens-live .island-circle-nav-btn.dock-tab,
#floatingIslandDock.lens-live .island-circle-nav-btn.dock-tab svg { color: var(--dock-icon); }
/* Под линзой всё в цвете акцента — и только под ней: копия красится целиком, настоящие
   вкладки снаружи свои (у Apple домик наполовину чёрный, наполовину красный). */
#floatingIslandDock .dock-lens .lens-copy .island-circle-nav-btn.dock-tab,
#floatingIslandDock .dock-lens .lens-copy .island-circle-nav-btn.dock-tab svg { color: var(--accent); background: transparent; }
#floatingIslandDock.dock-lensing .island-main-row { transform-origin: 50% 50%; }

/* Что видно сквозь линзу: копия вкладок, крупнее и изогнутая к кромке
   SVG-фильтром #nmLensBend (app.js). Настоящие вкладки под линзой спрятаны маской
   (--lens-a … --lens-b из app.js), иначе у кромки были бы две картинки. */
#floatingIslandDock .dock-lens-view {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  filter: url(#nmLensBend);
  transition: opacity var(--dur-fast) var(--ease);
}
#floatingIslandDock .dock-lens .lens-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
}
#floatingIslandDock .dock-lens .lens-copy {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  transform-origin: 0 0;
  pointer-events: none;
}
#floatingIslandDock.lens-settling .dock-lens-view { opacity: 0; }
#floatingIslandDock.lens-live > .island-circle-nav-btn.dock-tab {
  --lens-mask: linear-gradient(to right, #000 calc(var(--lens-a, -99px) - 6px), transparent var(--lens-a, -99px),
    transparent var(--lens-b, -99px), #000 calc(var(--lens-b, -99px) + 6px));
  -webkit-mask-image: var(--lens-mask);
  mask-image: var(--lens-mask);
}

/* Экран «Оформление» (colab.js lookPage): каждая настройка — своя карточка,
   как разделы «Настроек» iOS. Те же группы, что были в меню, но просторнее. */
#lookPage .look-page-body { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
#lookPage .glass-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 22px;
  background: var(--bg-surface-raised);
}
/* Светлая тема: белые карточки на сером фоне, как в Настройках iOS */
:root[data-scheme="light"] #lookPage .glass-group { background: var(--bg-surface); }
#lookPage .profile-option-title { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
#lookPage .profile-option-note { margin-top: 0; font-size: 14px; }
#lookPage .profile-blur-head .profile-blur-value { font-size: 19px; }
#lookPage .profile-blur-preview { height: 112px; border-radius: 18px; }
#lookPage .profile-blur-glass { top: 24px; bottom: 24px; left: 26%; right: 26%; font-size: 17px; }
#lookPage .profile-blur-scene { font-size: 28px; }
#lookPage .profile-chips { gap: 8px; }
#lookPage .profile-chip { min-height: 40px; padding: 0 16px; font-size: 16px; }
#lookPage .profile-swatches { grid-template-columns: repeat(8, 32px); padding: 4px 2px; }
#lookPage .profile-swatch { width: 32px; height: 32px; font-size: 11px; }

/* «Оформление» 14.11: плитки с миниатюрами вместо голых кнопок, заголовок как у «Плейлистов». */
#lookPage .subview-nav-title { font-size: var(--title-size-hero); font-weight: 700; letter-spacing: var(--title-track-hero); line-height: var(--title-line-hero); }
#lookPage .look-group { gap: 14px; }
#lookPage .look-tiles { display: grid; gap: 10px; }
#lookPage .look-tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#lookPage .look-tiles-scroll {
  grid-auto-flow: column;
  grid-auto-columns: 96px;
  margin-inline: -18px;
  padding: 2px 18px 4px;
  overflow-x: auto;
  scrollbar-width: none;
  touch-action: pan-x;
}
#lookPage .look-tiles-scroll::-webkit-scrollbar { display: none; }
#lookPage .look-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: scale var(--dur-press) var(--ease);
}
#lookPage .look-tile:active { scale: 0.96; }
#lookPage .look-tile-art {
  position: relative;
  display: block;
  height: 72px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 14%, transparent);
  transition: box-shadow var(--dur-fast) var(--ease);
}
#lookPage .look-tile.is-checked .look-tile-art { box-shadow: 0 0 0 2.5px var(--accent); }
#lookPage .look-tile-name { font-size: 15px; font-weight: 500; text-align: center; }
#lookPage .look-tile.is-checked .look-tile-name { color: var(--accent); font-weight: 600; }
#lookPage .look-tile .profile-option-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  padding: 3px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-on, #fff);
  opacity: 0;
  scale: 0.6;
  transition: opacity var(--dur-fast) var(--ease), scale var(--dur-fast) var(--ease);
}
#lookPage .look-tile.is-checked .profile-option-check { opacity: 1; scale: 1; }
/* Миниатюра темы: фон, «карточка» и точка-акцент. */
#lookPage .look-tile-bar { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 18px; border-radius: 9px; }
#lookPage .look-tile-dot { position: absolute; left: 10px; top: 10px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); }
#lookPage [data-art="dark"] { background: #1c1c1e; }
#lookPage [data-art="dark"] .look-tile-bar { background: #3a3a3c; }
#lookPage [data-art="light"] { background: #f2f2f7; }
#lookPage [data-art="light"] .look-tile-bar { background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
#lookPage [data-art="auto"] { background: linear-gradient(115deg, #f2f2f7 0 50%, #1c1c1e 50% 100%); }
#lookPage [data-art="auto"] .look-tile-bar { background: linear-gradient(115deg, #fff 0 50%, #3a3a3c 50% 100%); }
/* Миниатюра оттенка: пёстрый фон и стеклянная пилюля нужного оттенка. */
#lookPage [data-tint-art] {
  background:
    radial-gradient(circle at 20% 25%, #ff9f0a 0 22%, transparent 23%),
    radial-gradient(circle at 78% 70%, #0a84ff 0 26%, transparent 27%),
    linear-gradient(135deg, #bf5af2, #ff375f);
}
#lookPage [data-tint-art] .look-tile-dot { display: none; }
#lookPage [data-tint-art] .look-tile-bar {
  left: 12px; right: 12px; top: 50%; bottom: auto; height: 30px; margin-top: -15px; border-radius: 15px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45);
}
#lookPage [data-tint-art="normal"] .look-tile-bar { background: rgba(255, 255, 255, .22); }
#lookPage [data-tint-art="clear"] .look-tile-bar { background: rgba(255, 255, 255, .06); }
#lookPage [data-tint-art="dark"] .look-tile-bar { background: rgba(0, 0, 0, .5); }
#lookPage [data-tint-art="light"] .look-tile-bar { background: rgba(255, 255, 255, .7); }
#lookPage [data-tint-art="accent"] .look-tile-bar { background: color-mix(in srgb, var(--accent) 70%, transparent); }
#lookPage .profile-swatches { grid-template-columns: repeat(8, 1fr); justify-items: center; padding: 4px 0; }
#lookPage .profile-swatch { width: 34px; height: 34px; }

/* Смена темы 14.11: круг нового оформления раскрывается из плитки (app.js, morphTheme). */
::view-transition-group(root) { animation: none; }
::view-transition-image-pair(root) { isolation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }
/* Запасной вариант без View Transitions: цвета перетекают, а не щёлкают. */
:root.theme-morph, :root.theme-morph *, :root.theme-morph *::before, :root.theme-morph *::after {
  transition: background-color .5s ease, color .5s ease, border-color .5s ease, fill .5s ease, stroke .5s ease, box-shadow .5s ease !important;
}

/* «Оформление»: колесо цвета, дорожки яркости и размытия (14.11). */
#lookPage .look-group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#lookPage .look-reset {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 12px 0 9px; border: 0; border-radius: 16px;
  background: color-mix(in srgb, var(--text) 8%, transparent);
  color: var(--text-secondary, var(--text)); font: inherit; font-size: 14px; font-weight: 500;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), scale var(--dur-press) var(--ease);
}
#lookPage .look-reset i { width: 14px; height: 14px; border-radius: 50%; background: linear-gradient(135deg, #2aabee, #229ed9); }
#lookPage .look-reset:active { scale: 0.96; }
#lookPage .look-reset.is-checked { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
#lookPage .look-accent-group, #lookPage .look-blur-group { gap: 16px; }
#lookPage .look-wheel {
  position: relative;
  width: min(100%, 236px); aspect-ratio: 1; margin: 2px auto 0; border-radius: 50%;
  background:
    radial-gradient(circle closest-side, #fff 0%, rgb(255 255 255 / 0) 100%),
    conic-gradient(#f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .08);
  touch-action: none; cursor: crosshair; outline: none; -webkit-tap-highlight-color: transparent;
}
#lookPage .look-wheel-thumb {
  position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%;
  background: var(--pick, var(--accent)); border: 3px solid #fff;
  box-shadow: 0 2px 8px rgb(0 0 0 / .35), 0 0 0 1px rgb(0 0 0 / .08);
  pointer-events: none;
}
#lookPage .look-wheel:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
/* Дорожка: высокая «пилюля»; белая ручка выезжает за края на половину ширины. */
#lookPage .look-track {
  position: relative; height: 38px; margin: 0 17px; border-radius: 19px;
  touch-action: none; outline: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
#lookPage .look-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
#lookPage .look-track-knob {
  position: absolute; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 8px rgb(0 0 0 / .3), 0 0 0 1px rgb(0 0 0 / .06);
  pointer-events: none;
}
#lookPage .look-bright { background: linear-gradient(90deg, #000, var(--pick-full, var(--accent))); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .12); }
#lookPage .look-bright .look-track-knob { background: var(--pick, #fff); border: 3px solid #fff; }
#lookPage .look-blur { background: color-mix(in srgb, var(--text) 10%, transparent); overflow: visible; }
#lookPage .look-blur::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: var(--accent); clip-path: inset(0 calc(100% - var(--fill, 30%)) 0 0 round 19px);
}
#lookPage .look-blur .look-track-knob { left: var(--fill, 30%); }
#lookPage .look-blur-lo, #lookPage .look-blur-hi {
  position: absolute; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; z-index: 1;
}
#lookPage .look-blur-lo { left: 12px; border: 2px solid var(--text); opacity: .5; }
#lookPage .look-blur-hi { right: 12px; background: var(--text); opacity: .45; filter: blur(2.5px); }
#lookPage .look-blur-group .profile-blur-preview { height: 120px; }

/* «Профиль»: заголовок такой же крупный, как у «Плейлистов» и «Оформления». */
#profilePage .subview-nav-title { font-size: var(--title-size-hero); font-weight: 700; letter-spacing: var(--title-track-hero); line-height: var(--title-line-hero); }

/* Синхронизация и её второй уровень: шапка как у «Плейлистов» и «Артистов» —
   стеклянная кнопка назад, крупный заголовок слева. Тело экрана остаётся
   на .nm-screen (строки сервисов, поля, кнопки). */
.sync-top-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: calc(var(--tg-header-clearance) + 6px);
  background: transparent;
}
.sync-top-nav.is-scrolled { background: var(--scroll-header-fade); }
.sync-top-nav .subview-nav-title {
  font-size: var(--title-size-hero);
  font-weight: 700;
  letter-spacing: var(--title-track-hero);
  line-height: var(--title-line-hero);
  text-align: left;
}
.sync-detail .sync-top-nav,
#syncView .sync-top-nav,
#recognizedView .sync-top-nav,
#matchView .sync-top-nav { margin-bottom: var(--s3); }
.sync-top-nav .playlist-back-btn {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  color: var(--text);
}
.sync-top-nav .playlist-back-btn svg { width: 22px; height: 22px; fill: currentColor; }

/* Статистика и «Итоги года»: общая шкала заголовков. */
.replay-top-nav .subview-nav-title,
.wrapped-top-nav .subview-nav-title {
  font-size: var(--title-size-hero);
  font-weight: 700;
  letter-spacing: var(--title-track-hero);
  line-height: var(--title-line-hero);
}

/* Safari menu: owner requested less frost and a clearer material (16.11).
   Keep the selected hue; halve its opacity only on the menu's real surface. */
@supports (-webkit-backdrop-filter: blur(1px)) {
  html:root[data-glass="full"] :is(#trackActionSheet, #menuSheet).is-popover .action-sheet-actions:has(> .glass-group) {
    --glass-blur-piece: blur(calc(var(--glass-frost) * 0.75)) var(--piece-tone);
    --menu-tint: color-mix(in srgb, var(--piece-tint) 50%, transparent);
    background: var(--menu-tint);
  }
  html:root[data-glass="lite"] :is(#trackActionSheet, #menuSheet).is-popover .action-sheet-actions:has(> .glass-group) {
    --glass-blur-piece: blur(6px) saturate(0.9);
    --menu-tint: color-mix(in srgb, var(--piece-tint) 50%, transparent);
    background: var(--menu-tint);
  }
}

/* --------------------------------------------------------------------------
   Альбомы в поиске и экран альбома (16.11.2026)
   -------------------------------------------------------------------------- */

/* Блок «Альбомы» между исполнителями и треками. */
.search-albums-block { display: flex; flex-direction: column; }

/* Крупная карточка найденного альбома: обложка слева, подписи справа. */
.search-albums-feature { display: block; }
.search-albums-feature-card {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3);
  border-radius: var(--r-card);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: transform var(--d-fast) var(--ease), background var(--d-fast) var(--ease);
}
.search-albums-feature-card.is-pressed { scale: 0.985; }
.search-albums-feature-art {
  width: 88px;
  height: 88px;
  border-radius: 16px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--inset);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line-soft);
}
.search-albums-feature-meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.search-albums-feature-kind {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.search-albums-feature-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.search-albums-feature-sub {
  font-size: 13px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Остальные альбомы — горизонтальный ряд, как у исполнителя. */
.search-albums-row {
  display: flex;
  gap: var(--s3);
  overflow-x: auto;
  margin-top: var(--s3);
  padding-bottom: var(--s2);
  scrollbar-width: none;
}
.search-albums-row::-webkit-scrollbar { display: none; }
.search-albums-card.is-pressed { scale: var(--press-content-scale); }

/* Экран альбома: каркас страницы плейлиста (обложка, две кнопки, список). */
.ios-album-page {
  position: absolute;
  inset: 0;
  z-index: 1200;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ios-album-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: calc(var(--tg-header-clearance) + var(--s5)) var(--page-gutter)
    calc(var(--tabbar-h) + var(--mini-h) + var(--sab) + var(--s6));
}
.ios-album-scroll .playlist-stage-header { padding: 0 0 var(--s4); }
.ios-album-scroll .playlist-art-stage {
  width: min(52vw, 220px);
  height: min(52vw, 220px);
  margin: 0 auto 18px;
}
.ios-album-scroll .playlist-art-wrap {
  width: 100%;
  height: 100%;
  border-radius: 22px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}
.ios-album-scroll .playlist-hero-title {
  font-size: var(--title-size-hero);
  font-weight: 800;
  letter-spacing: -0.025em;
}
.ios-album-scroll .playlist-hero-sub {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 18px;
}
.ios-album-scroll .playlist-action-dual-buttons { max-width: none; gap: 12px; }
.ios-album-scroll .playlist-btn-primary {
  background: var(--accent-fill);
  color: var(--accent-on);
  border: 0;
  border-radius: 999px;
  padding: 13px 16px;
  font-size: 16px;
  font-weight: 600;
}
.ios-album-scroll .playlist-btn-secondary {
  background: var(--bg-surface-raised);
  color: var(--text);
  border: 0;
  border-radius: 999px;
  padding: 13px 16px;
  font-size: 16px;
  font-weight: 600;
}
.album-add-btn { flex: 0 0 auto; }
.album-add-btn.added { color: var(--accent); }

/* Имя исполнителя в шапке альбома — ссылка на его страницу. */
.album-hero-artist {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
}
.album-hero-artist.is-pressed { opacity: 0.7; }

/* Номер трека в альбоме — слева от обложки. */
.album-track-no {
  position: relative;
  flex: 0 0 auto;
  width: 18px;
  text-align: center;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}
.ios-track-item.active-track .album-track-no { color: var(--accent); }
.album-track-number {
  display: block;
  clip-path: inset(0 0 0 0);
  transform: scaleX(1);
  transition: clip-path var(--dur-move) var(--ease-move), transform var(--dur-move) var(--ease-move), opacity var(--dur-fast) var(--ease);
}
.album-track-wave {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  opacity: 0;
  transform: scaleX(0);
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-move) var(--ease-move);
  pointer-events: none;
}
.album-track-wave i {
  width: 2.5px;
  height: 12px;
  border-radius: var(--r-hair);
  background: currentColor;
  transform: scaleY(.35);
}
body.is-playing .ios-album-page:not(.is-show) .active-track .album-track-number {
  opacity: 0;
  clip-path: inset(0 45% 0 45%);
  transform: scaleX(.35);
}
body.is-playing .ios-album-page:not(.is-show) .active-track .album-track-wave {
  opacity: 1;
  transform: scaleX(1);
}
@media (prefers-reduced-motion: reduce) {
  .album-track-number, .album-track-wave { transition: none; }
  body.is-playing .ios-album-page .album-track-wave i { animation: none; transform: scaleY(.65); }
}
html[data-motion="instant"] .album-track-number, html[data-motion="instant"] .album-track-wave { transition: none; }
html[data-motion="instant"] body.is-playing .ios-album-page .album-track-wave i { animation: none; transform: scaleY(.65); }

/* Верхняя панель экрана альбома: прозрачна сверху, заливка появляется при прокрутке. */
.album-top-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin: 0;
  padding: calc(var(--tg-header-clearance) + 6px) var(--page-gutter) 8px;
  background: transparent;
  transition: background var(--d-fast) var(--ease);
  pointer-events: none;
}
.album-top-nav > * { pointer-events: auto; }
.album-top-nav.is-scrolled { background: var(--scroll-header-fade); }
.album-top-nav .subview-nav-title {
  font-size: var(--title-size-nav);
  font-weight: 700;
  letter-spacing: var(--title-track-nav);
  line-height: var(--title-line-nav);
}

/* Музыкальный релиз: компоновка независима от плейлиста и варианта is-show. */
.album-nav-actions { display: none; }
.ios-album-page:not(.is-show) {
  --album-control: 48px;
  --album-content: 520px;
}
.ios-album-page:not(.is-show) .ios-album-scroll {
  padding-top: calc(var(--tg-header-clearance) + var(--album-control) + var(--s6));
}
.ios-album-page:not(.is-show) .ios-album-scroll > * {
  max-width: var(--album-content);
  margin-inline: auto;
}
.ios-album-page:not(.is-show) .playlist-stage-header { padding-bottom: var(--s5); }
.ios-album-page:not(.is-show) .playlist-art-stage {
  width: min(66vw, 100%, 320px);
  height: auto;
  aspect-ratio: 1;
  margin-bottom: var(--s5);
}
.ios-album-page:not(.is-show) .playlist-art-glow {
  display: block;
  opacity: .22;
  filter: blur(30px);
}
.ios-album-page:not(.is-show) .playlist-art-wrap {
  border-radius: var(--r-card);
  border: 1px solid var(--line);
  box-shadow: none;
}
.ios-album-page:not(.is-show) .playlist-hero-title {
  font-size: var(--title-size-section);
  font-weight: 700;
  overflow-wrap: anywhere;
}
.ios-album-page:not(.is-show) .playlist-hero-sub { margin: 0; }
.ios-album-page:not(.is-show) .album-hero-artist {
  color: var(--text);
  font-size: var(--title-size-nav);
  max-width: 100%;
  overflow-wrap: anywhere;
}
.album-hero-meta { margin: var(--s1) 0 0; color: var(--text-secondary); font-size: var(--subtitle-size); }
.ios-album-page:not(.is-show) .playlist-action-dual-buttons {
  display: grid;
  grid-template-columns: var(--album-control) minmax(0, auto) var(--album-control);
  align-items: center;
  gap: clamp(var(--s2), 3vw, var(--s4));
  margin-top: var(--s4);
}
.ios-album-page:not(.is-show) #albumPlayBtn {
  grid-column: 2;
  grid-row: 1;
  min-height: var(--album-control);
  background: var(--text);
  color: var(--bg);
  padding: var(--s2) clamp(var(--s2), 3vw, var(--s4));
  box-shadow: none;
  font-size: 16px;
}
.ios-album-page:not(.is-show) #albumShuffleBtn { grid-column: 1; grid-row: 1; }
.ios-album-page:not(.is-show) #albumShuffleBtn span { display: none; }
.ios-album-page:not(.is-show) :is(#albumShuffleBtn, #albumAddBtn, #albumBackBtn) {
  width: var(--album-control);
  height: var(--album-control);
  padding: 0;
  border-radius: 50%;
  background: var(--bg-surface-raised);
  color: var(--text);
}
.ios-album-page:not(.is-show) #albumAddBtn.added { color: var(--accent); }
.ios-album-page:not(.is-show) :is(#albumShuffleBtn, #albumAddBtn) svg { width: 23px; height: 23px; }

.ios-album-page:not(.is-show) .album-top-nav {
  width: 100%;
  max-width: calc(var(--album-content) + 2 * var(--page-gutter));
  margin-inline: auto;
}
.ios-album-page:not(.is-show) .album-top-nav:not(.is-scrolled) .album-top-title { visibility: hidden; }
.ios-album-page:not(.is-show) .album-nav-actions {
  display: flex;
  flex: none;
  margin-inline-start: auto;
  background: var(--bg-surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}
.album-nav-actions button:not([hidden]) {
  display: grid;
  place-items: center;
  width: var(--album-control);
  min-height: calc(var(--album-control) - 2px);
  border-radius: var(--r-pill);
  color: var(--text);
}
.album-nav-actions button.is-pressed { background: var(--line-soft); }

.ios-album-page:not(.is-show) #albumTrackList:has([data-album-idx]) { border-top: 1px solid var(--line); }
.ios-album-page:not(.is-show) [data-album-idx] {
  gap: var(--s2);
  min-height: 50px;
  margin: 0;
  padding: var(--s2) 0;
  border: 0;
  border-radius: 0;
  background: none;
}
.ios-album-page:not(.is-show) [data-album-idx]::after {
  content: "";
  position: absolute;
  inset: auto 0 0 calc(var(--s5) + var(--s2));
  height: 1px;
  background: var(--line-soft);
  pointer-events: none;
}
.ios-album-page:not(.is-show) #albumTrackList > [data-album-idx]:last-child::after { inset-inline-start: 0; }
.ios-album-page:not(.is-show) .album-track-no { width: var(--s5); }
.ios-album-page:not(.is-show) #albumTrackList .track-name-main { font-size: var(--title-size-nav); font-weight: 400; }
.ios-album-page:not(.is-show) #albumTrackList .track-artist-sub { font-size: var(--subtitle-size); }
.ios-album-page:not(.is-show) #albumTrackList .track-item-more-btn { width: 44px; height: 44px; margin-block: calc(-1 * var(--s2)); }
.ios-album-page:not(.is-show) #albumTrackList ~ .album-footer { border-top: 0; }

/* --------------------------------------------------------------------------
   Подкасты, аудиокниги, концерты, справка и новости (17.11.2026)
   Плоское содержимое: без стекла, цвет и отступы только из токенов.
   -------------------------------------------------------------------------- */

/* Страница передачи/книги — каркас альбома без номеров, «Перемешать» и «+». */
.ios-album-page.is-show .album-track-no,
.ios-album-page.is-show #albumShuffleBtn,
.ios-album-page.is-show #albumAddBtn { display: none; }

/* Ряд сведений об артисте: концерт или новость. Разделитель — волосяная линия. */
.artist-extras-list { display: flex; flex-direction: column; }
.artist-extra-row {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  padding: var(--s2) 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.artist-extra-row:last-child { border-bottom: 0; }
.artist-extra-row:disabled { cursor: default; }
.artist-extra-row.is-pressed { opacity: 0.7; }
.artist-extra-date {
  flex: 0 0 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--s1) 0;
  border-radius: var(--r-thumb);
  background: var(--inset);
  font-variant-numeric: tabular-nums;
}
.artist-extra-date b { font-size: 17px; font-weight: 700; line-height: 1.1; color: var(--text); }
.artist-extra-date i { font-size: 11px; font-style: normal; text-transform: uppercase; color: var(--accent); }
.artist-extra-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.artist-extra-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.artist-extra-title-wrap {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.artist-extra-sub { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* «Об артисте»: короткая выдержка и ссылка на статью (лицензия CC BY-SA требует источник). */
.artist-about-text { margin: 0 0 var(--s2); font-size: 15px; line-height: 1.4; color: var(--text); }
.artist-about-source {
  padding: 0;
  background: none;
  border: 0;
  font: inherit;
  font-size: 13px;
  color: var(--accent);
  cursor: pointer;
}
.artist-about-source.is-pressed { opacity: 0.7; }

/* Подвал экрана альбома (дата выхода, число песен, копирайт): плоский приглушённый текст. */
.album-footer { padding: var(--s5) 0 0; border-top: 1px solid var(--line-soft); margin-top: var(--s3); }
.album-footer-line { margin: 0 0 var(--s1); font-size: 13px; line-height: 1.4; color: var(--text-muted); }


/* УКРАШЕНИЕ НАЧАЛО
   Полоски «песня играет» на обложке — 17.11.2026
   Пять белых полосок в правом нижнем углу обложки мини-плеера и плеера.
   Высоту каждой в кадре пишет nowplaying-bars.js (только transform: scaleY,
   раскладка не анимируется — раздел 7 Liquid Glass). Появляются и гаснут
   переходом; на паузе стоят на 0.25 и гаснут до 45 %: движение — причина звук.
   Под обложкой законный фон белый (светлая заливка обложки), поэтому полоска
   тени: она читается и на светлой песне, и на стеклянной дымке дока.
   ========================================================================== */
.mini-art-wrap {
  position: relative;
}.nowplaying-bars {
  position: absolute;
  right: 4px;
  bottom: 4px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 2.5px;
  width: 22px;
  height: 16px;
  padding: 3px 3.5px;
  box-sizing: border-box;
  border-radius: 6px;
  background: rgb(0 0 0 / 0.34);
  pointer-events: none;
  opacity: 0;
  translate: 0 3px;
  transition:
    opacity var(--dur-micro) var(--ease-out),
    translate var(--dur-micro) var(--ease-out);
}
body.is-playing .nowplaying-bars {
  opacity: 1;
  translate: 0 0;
}

/* Мини-плеер сжат — в доке и обложка сжата (island.js), полоски идут следом. */
.island-mini-player .nowplaying-bars {
  width: 16px;
  height: 12px;
  gap: 2px;
  padding: 2px 2.5px;
  border-radius: 4px;
}

.nowplaying-bars i {
  flex: 0 0 2.5px;
  width: 2.5px;
  height: 100%;
  border-radius: 999px;
  background: #fff;
  transform: scaleY(0.25);
  transform-origin: 50% 100%;
  transition: transform var(--dur-release) var(--ease-release);
}
.island-mini-player .nowplaying-bars i {
  flex-basis: 2px;
  width: 2px;
}
.nowplaying-bars i:nth-child(odd) {
  height: 76%;
}
.nowplaying-bars i:nth-child(2),
.nowplaying-bars i:nth-child(4) {
  height: 55%;
}
.nowplaying-bars i:nth-child(3) {
  height: 88%;
}
body.is-playing .nowplaying-bars i {
  transition: none;
}
/* Пауза: полоски стоят и гаснут — звук не играет, нет и жизни. */
body:not(.is-playing) .nowplaying-bars {
  opacity: 0.45;
}


/* Пять полосок по центру обложки текущего трека. */
.track-cover-wrap { position: relative; display: inline-flex; flex: 0 0 auto; border-radius: 8px; }
#playlistsDetailView .track-cover-wrap { border-radius: 10px; }
#nowPlayingModal.queue-mode #playerQueueList .track-cover-wrap { border-radius: 4px; }
.track-cover-beat {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: inherit;
  background: rgb(0 0 0 / .32);
  opacity: 0;
  pointer-events: none;
}
.ios-track-item.active-track .track-cover-beat { opacity: 1; }
.track-cover-beat i {
  width: 3px;
  height: 16px;
  flex: 0 0 3px;
  border-radius: 999px;
  background: #fff;
  transform: scaleY(.16);
  transform-origin: center;
}

/* Единый индикатор на карточках, в чартах и на обложках плеера. */
.home-quick-track-thumb-wrap { position: relative; }
.track-cover-beat { z-index: 2; }
.track-cover-beat.is-active { opacity: 1; }
.ios-track-item.active-track .track-cover-beat:not(.is-active) { opacity: 0; }
.track-cover-beat--large {
  gap: 4px;
  background: radial-gradient(circle at center, rgb(0 0 0 / .38), transparent 28%);
}
.track-cover-beat--large i { width: 5px; height: 30px; flex-basis: 5px; }
.home-recent-art-wrap .track-cover-beat--large {
  /* Большая волна на обложке не должна выглядеть как чёрная плашка. */
  background: radial-gradient(circle at center, rgb(0 0 0 / .16), transparent 34%);
  opacity: 0;
  filter: blur(.35px);
  transform: scale(.94);
  transition: opacity var(--dur-move) var(--ease-out), transform var(--dur-move) var(--ease-out);
}
.home-recent-art-wrap .track-cover-beat--large.is-active {
  opacity: .78;
  transform: scale(1);
}
.home-recent-art-wrap .track-cover-beat--large i {
  background: rgb(255 255 255 / .78);
}
.nm-screen .track-cover-wrap:has(> .nm-track-cover) { border-radius: 12px; }

/* Музыкальный альбом: фон — зеркально продолженная размытая обложка. */
.ios-album-page:not(.is-show).album-tinted {
  --bg: #121317;
  --bg-surface-raised: rgb(255 255 255 / .10);
  --text: #fff;
  --text-secondary: rgb(255 255 255 / .74);
  --text-muted: rgb(255 255 255 / .68);
  --line: rgb(255 255 255 / .20);
  --line-soft: rgb(255 255 255 / .14);
  --inset: rgb(255 255 255 / .08);
  --accent: color-mix(in srgb, var(--album-art-color, #fff) 25%, #fff);
  --scroll-header-fade: linear-gradient(180deg, var(--bg) 0%, var(--bg) var(--scroll-header-fade-solid-stop), transparent 100%);
  background: var(--bg);
  color: var(--text);
}
.album-ambient { display: none; }
:root[data-glass="solid"] .ios-album-page:not(.is-show).album-tinted .album-ambient { display: none; }
.ios-album-page:not(.is-show).album-tinted .album-ambient {
  display: block;
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.album-ambient-layer {
  position: absolute;
  inset: -20%;
  filter: blur(55px) brightness(.43) saturate(1.2);
  animation: album-ambient-drift var(--dur-ambient-slow) var(--ease-breathe) infinite alternate;
}
.album-ambient-layer::before,
.album-ambient-layer::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 50%;
  background: var(--album-artwork, none) center / cover no-repeat;
}
.album-ambient-layer::before { top: 0; }
.album-ambient-layer::after {
  top: 50%;
  transform: scaleY(-1);
}
.album-ambient-layer--soft {
  filter: blur(75px) brightness(.43) saturate(1.2);
  animation-name: album-ambient-breathe;
}
@keyframes album-ambient-drift {
  from { transform: translate(-6%, -5%) scale(1); }
  to { transform: translate(6%, 5%) scale(1.1); }
}
@keyframes album-ambient-breathe {
  from { opacity: 0; transform: translate(-6%, -5%) scale(1); }
  to { opacity: 1; transform: translate(6%, 5%) scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
  .album-ambient-layer { animation: none; }
  .album-ambient-layer--soft { opacity: .5; }
}
html[data-motion="instant"] .album-ambient-layer { animation: none; }
html[data-motion="instant"] .album-ambient-layer--soft { opacity: .5; }
.ios-album-page.hidden .album-ambient-layer {
  animation-play-state: paused;
}
.album-related-section { margin: var(--s6) 0; }
.album-related-section h2 { margin: 0 0 var(--s3); font-size: var(--t-title, 21px); }
.album-related-list { display: flex; gap: var(--s3); overflow-x: auto; padding: 0 var(--s4) var(--s2); scroll-snap-type: x mandatory; scrollbar-width: none; }
.album-related-list::-webkit-scrollbar { display: none; }
.album-related-card { flex: 0 0 min(40vw, 170px); min-width: 0; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; scroll-snap-align: start; font: inherit; }
.album-related-card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-card); background: var(--inset); }
.album-related-title, .album-related-meta { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.album-related-title { margin-top: var(--s2); font-weight: 600; }
.album-related-meta { color: var(--muted); font-size: 13px; }
.album-related-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ==========================================================================
   Главная (18.11.2026): одна лента без чипов-фильтров, ленты «Ещё от <артист>»,
   круглые артисты, «Альбомы для вас», «Под настроение». Всё плоское — стекла и блюра
   здесь нет: эти блоки прокручиваются вместе со страницей (docs/LIQUID-GLASS.md).
   ========================================================================== */
/* Лента артистов: те же круглые карточки, что в медиатеке, чуть крупнее. */
#homeArtistsContainer .fav-artist-card { flex: 0 0 92px; width: 92px; min-width: 0; max-width: 92px; }
#homeArtistsContainer .fav-artist-avatar { width: 92px; height: 92px; }
#homeArtistsContainer .fav-artist-name { width: 100%; text-align: center; }

/* «Ещё от <артист>»: шапка — аватар, подпись, имя, шеврон; ниже лента альбомов. */
.home-ribbon-head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.home-ribbon-avatar {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--inset);
  border: 1px solid var(--border-subtle);
  transition: transform var(--dur-fast) var(--ease);
}
.home-ribbon-head:active .home-ribbon-avatar { transform: scale(0.94); }
.home-ribbon-heading {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}
.home-ribbon-eyebrow {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--text-secondary);
}
.home-ribbon-name {
  overflow: hidden;
  font-size: var(--title-size-section);
  font-weight: 700;
  letter-spacing: var(--title-track-section);
  line-height: var(--title-line-section);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-ribbon-chevron {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  fill: var(--text-muted);
}

/* «Под настроение»: обложки в одном ритме с соседними музыкальными полками. */
.home-mood-row .home-mood-card {
  flex: 0 0 148px;
  width: 148px;
  min-height: 0;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  scroll-snap-align: start;
  -webkit-tap-highlight-color: transparent;
}
.home-mood-row .home-mood-card.is-pressed { background: transparent; }
.home-mood-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--r-shelf);
  background: linear-gradient(135deg, #d2a6d4, #536cb3);
}
.home-mood-card[data-mood="focus"] .home-mood-art { background: linear-gradient(145deg, #e99666, #a85473); }
.home-mood-card[data-mood="party"] .home-mood-art { background: linear-gradient(135deg, #f7838e, #ad338a); }
.home-mood-card[data-mood="drive"] .home-mood-art { background: linear-gradient(135deg, #5bb6c4, #304b9e); }
.home-mood-card[data-mood="workout"] .home-mood-art { background: #160a10; }
.home-mood-card[data-mood="sleep"] .home-mood-art { background: linear-gradient(145deg, #b7a3d6, #576db3); }
.home-mood-card[data-mood="sad"] .home-mood-art { background: linear-gradient(145deg, #6c72b8, #2e408c); }
.home-mood-art > svg { display: block; width: 100%; height: 100%; }
.home-mood-layer { animation-play-state: paused; }
.home-mood-layer-top { animation: home-mood-drift-top calc(var(--dur-ambient-slow) + var(--dur-ambient)) ease-in-out infinite alternate paused; }
.home-mood-layer-lower { animation: home-mood-drift-lower calc(var(--dur-ambient-slow) + var(--dur-ambient-slow)) ease-in-out infinite alternate paused; }
.home-mood-layer-ribbon { animation: home-mood-drift-ribbon calc(var(--dur-ambient) + var(--dur-ambient)) ease-in-out infinite alternate paused; }
.home-mood-gesture {
  transform-box: fill-box;
  transform-origin: center;
  animation: home-mood-sleep calc(var(--dur-ambient-slow) + var(--dur-ambient)) ease-in-out infinite paused;
}
.home-mood-card[data-mood="focus"] .home-mood-gesture { animation-name: home-mood-focus; }
.home-mood-card[data-mood="party"] .home-mood-gesture { animation-name: home-mood-party; }
.home-mood-card[data-mood="drive"] .home-mood-gesture { animation-name: home-mood-drive; }
.home-mood-card[data-mood="sleep"] .home-mood-gesture { animation-name: home-mood-sleep; }
.home-mood-card[data-mood="sad"] .home-mood-gesture { animation-name: home-mood-sad; }
.mood-object-body, .mood-object-detail { transform-box: view-box; transform-origin: 50px 50px; }
.mood-object-body { animation: mood-object-float var(--dur-ambient-slow) ease-in-out infinite paused; }
.home-mood-card[data-mood="focus"] .mood-object-body { animation-name: mood-object-focus; }
.home-mood-card[data-mood="party"] .mood-object-body { animation-name: mood-object-party; }
.home-mood-card[data-mood="drive"] .mood-object-body { animation-name: mood-object-float; }
.home-mood-card[data-mood="sleep"] .mood-object-body { animation-name: mood-object-sleep; }
.home-mood-card[data-mood="sad"] .mood-object-body { animation-name: mood-object-drop; }
.home-mood-card[data-mood="focus"] .mood-object-detail { animation: mood-object-steam var(--dur-ambient-slow) ease-in-out infinite paused; }
.home-mood-card[data-mood="party"] .mood-object-detail { animation: mood-object-disco var(--dur-ambient-slow) linear infinite paused; }
.home-mood-card[data-mood="party"] .mood-disco-glint { opacity: .15; animation: mood-disco-sparkle var(--dur-ambient-fast) ease-in-out infinite paused; }
.home-mood-card[data-mood="drive"] .mood-object-detail { animation: mood-object-compass var(--dur-ambient-slow) ease-in-out infinite paused; }
.home-mood-card[data-mood="sleep"] .mood-object-detail { animation: mood-object-twinkle var(--dur-ambient-slow) ease-in-out infinite paused; }
.home-mood-card[data-mood="sad"] .mood-object-detail { animation: mood-object-ripples var(--dur-ambient-slow) ease-out infinite paused; }
.workout-stream { animation: workout-stream-flow var(--dur-ambient) var(--ease-breathe) infinite alternate paused; }
.workout-glint { opacity: .22; animation: workout-glint-pass var(--dur-ambient-slow) var(--ease-breathe) infinite paused; }
.workout-spark { opacity: .46; animation: workout-spark-drift var(--dur-ambient-fast) var(--ease-breathe) infinite paused; }
.focus-steam { transform-box: view-box; transform-origin: 48% 50%; animation: focus-steam-rise var(--dur-ambient-slow) var(--ease-breathe) infinite alternate paused; }
.sleep-star { animation: sleep-star-glow var(--dur-ambient-slow) var(--ease-breathe) infinite alternate paused; }
.party-facet-glow { animation: party-facet-sweep var(--dur-ambient-fast) var(--ease-breathe) infinite alternate paused; }
.drive-needle { transform-box: view-box; transform-origin: 50% 49%; animation: drive-needle-sway var(--dur-ambient-slow) var(--ease-breathe) infinite alternate paused; }
.sad-drop-light { animation: sad-drop-breathe calc(var(--dur-ambient-slow) * 2) var(--ease-breathe) infinite alternate paused; }
.home-mood-card.is-mood-visible .home-mood-layer { animation-play-state: running; }
.home-mood-card:nth-child(even) .home-mood-layer { animation-delay: calc(var(--dur-ambient) * -1); }
.home-mood-card[data-mood="workout"] .workout-spark:nth-child(2) { animation-delay: calc(var(--dur-ambient-fast) / -2); }
.home-mood-card[data-mood="focus"] .focus-steam-secondary,
.home-mood-card[data-mood="sleep"] .sleep-star:nth-child(2) { animation-delay: calc(var(--dur-ambient-slow) / -2); }
.home-mood-card[data-mood="party"] .mood-disco-glint:nth-child(2) { animation-delay: calc(var(--dur-ambient-fast) / -3); }
.home-mood-card[data-mood="party"] .mood-disco-glint:nth-child(3) { animation-delay: calc(var(--dur-ambient-fast) * -2 / 3); }
html.home-moods-page-hidden .home-mood-card.is-mood-visible .home-mood-layer,
main:is(.player-expanded, .player-closing) .home-mood-card.is-mood-visible .home-mood-layer { animation-play-state: paused; }
@keyframes home-mood-drift-top {
  from { transform: translate(-2px, -1px); }
  to { transform: translate(3px, 2px); }
}
@keyframes home-mood-drift-lower {
  from { transform: translate(2px, 2px); }
  to { transform: translate(-3px, -2px); }
}
@keyframes home-mood-drift-ribbon {
  from { transform: translate(-2px, 3px); opacity: .78; }
  to { transform: translate(2px, -3px); opacity: 1; }
}
/* Каждое настроение разыгрывает собственное движение, а не общую смену фона. */
@keyframes home-mood-focus {
  0%, 12%, 100% { transform: scale(.72, 1.3); opacity: .22; }
  38%, 54% { transform: scale(1, 1); opacity: .9; }
  75% { transform: scale(1.08, .85); opacity: .38; }
}
@keyframes home-mood-party {
  0%, 15%, 100% { transform: translate(-30px, 18px); opacity: 0; }
  29% { transform: translate(2px, -2px); opacity: .95; }
  38% { transform: translate(-3px, 2px); opacity: .45; }
  47% { transform: translate(4px, -3px); opacity: .9; }
  65% { transform: translate(30px, -18px); opacity: 0; }
}
@keyframes home-mood-drive {
  0%, 12%, 100% { transform: translate(-45px, 12px); opacity: 0; }
  28% { opacity: .85; }
  67% { transform: translate(38px, -10px); opacity: .85; }
  78% { transform: translate(52px, -14px); opacity: 0; }
}
@keyframes focus-steam-rise {
  from { transform: skewX(-6deg) scaleY(.9); opacity: .5; }
  to { transform: skewX(9deg) scaleY(1.05); opacity: .86; }
}
@keyframes sleep-star-glow { from { opacity: .38; } to { opacity: 1; } }
@keyframes party-facet-sweep {
  from { transform: translate(-7px, 1px); opacity: .43; }
  to { transform: translate(6px, -5px); opacity: .96; }
}
@keyframes drive-needle-sway { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
@keyframes sad-drop-breathe { from { opacity: .48; } to { opacity: .94; } }
@keyframes workout-stream-flow {
  from { transform: translateY(2px); opacity: .69; }
  to { transform: translateY(-2px); opacity: 1; }
}
@keyframes workout-glint-pass {
  0%, 100% { transform: translateX(-12px); opacity: 0; }
  38% { opacity: .30; }
  69%, 95% { transform: translateX(13px); opacity: 0; }
}
@keyframes workout-spark-drift {
  0%, 100% { transform: translate(-3px, 2px); opacity: 0; }
  35% { opacity: .9; }
  81% { transform: translate(4px, -3px); opacity: 0; }
}
@keyframes home-mood-sleep {
  0%, 100% { transform: translate(-6px, 5px) scaleY(.85); opacity: .35; }
  50% { transform: translate(6px, -5px) scaleY(1.12); opacity: .72; }
}
@keyframes home-mood-sad {
  0%, 10%, 100% { transform: translate(-10px, -13px); opacity: 0; }
  35% { opacity: .7; }
  70% { transform: translate(10px, 13px); opacity: .7; }
  88% { transform: translate(15px, 20px); opacity: 0; }
}
@keyframes mood-object-focus {
  0%, 12%, 100% { transform: translateY(1px) rotate(-4deg) scale(.96); }
  38%, 55% { transform: translateY(-3px) rotate(2deg) scale(1.04); }
  75% { transform: translateY(0) rotate(0) scale(1); }
}
@keyframes mood-object-party {
  0%, 14%, 100% { transform: translateY(0) rotate(-3deg); }
  28% { transform: translateY(-4px) rotate(4deg); }
  38% { transform: translateY(1px) rotate(-2deg); }
  48% { transform: translateY(-3px) rotate(3deg); }
  64% { transform: translateY(0) rotate(0); }
}
@keyframes mood-object-disco { to { transform: translateY(-14%); } }
@keyframes mood-disco-sparkle {
  0%, 100% { opacity: .08; }
  35% { opacity: .18; }
  48% { opacity: .95; }
  60% { opacity: .12; }
}
@keyframes mood-object-steam {
  0%, 100% { opacity: .15; transform: translateY(3px); }
  45% { opacity: .9; transform: translateY(-2px); }
  80% { opacity: .2; transform: translateY(-5px); }
}
@keyframes mood-object-float {
  0%, 100% { transform: translateY(2px) rotate(-2deg); }
  50% { transform: translateY(-3px) rotate(2deg); }
}
@keyframes mood-object-compass {
  0%, 14%, 100% { transform: rotate(-18deg); }
  35% { transform: rotate(25deg); }
  52% { transform: rotate(-6deg); }
  70% { transform: rotate(4deg); }
}
@keyframes mood-object-sleep {
  0%, 100% { transform: translateY(2px) rotate(-3deg); }
  50% { transform: translateY(-3px) rotate(3deg); }
}
@keyframes mood-object-twinkle {
  0%, 100% { opacity: .3; transform: scale(.9); }
  50% { opacity: 1; transform: scale(1.08); }
}
@keyframes mood-object-drop {
  0%, 18%, 100% { transform: translateY(-5px) scale(.97, 1.04); }
  38% { transform: translateY(5px) scale(1.06, .93); }
  53% { transform: translateY(2px) scale(.98, 1.03); }
  70% { transform: translateY(0) scale(1); }
}
@keyframes mood-object-ripples {
  0%, 24%, 100% { transform: scale(.6); opacity: 0; }
  42% { transform: scale(.75); opacity: .75; }
  70% { transform: scale(1.12); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .home-mood-card[data-mood] .home-mood-layer { animation: none; }
}
html[data-motion="instant"] .home-mood-card[data-mood] .home-mood-layer { animation: none; }
.home-mood-row .home-mood-card .mood-card-title {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 9px;
  font-size: 14px;
  line-height: 1.25;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.home-mood-row .home-mood-card .mood-card-desc {
  margin-top: 4px;
  -webkit-line-clamp: 2;
}
.home-mood-row .home-mood-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: var(--r-shelf); }

/* Финальный override: компонентные правила выше могут задавать ellipsis своим
   именам. У артистов всегда остаётся прозрачный край, включая узкие карточки. */
.artist-name-fade,
.artist-name-fade:is(
  .home-recent-artist,
  .home-quick-track-artist,
  .track-artist-sub,
  .nm-track-sub,
  .fav-artist-name,
  .search-artist-name,
  .chart-page-artist-text,
  .replay-artist-name
) {
  text-overflow: clip;
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - min(28px, 35%)), transparent 100%);
  mask-image: linear-gradient(to right, #000 0, #000 calc(100% - min(28px, 35%)), transparent 100%);
}

/* Названия песен в однострочных карточках тоже растворяются, а не получают
   текстовое многоточие. Кнопка действий остаётся отдельным элементом справа. */
.title-name-fade,
.title-name-fade:is(.home-quick-track-title, .home-recent-title) {
  text-overflow: clip;
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - min(28px, 35%)), transparent 100%);
  mask-image: linear-gradient(to right, #000 0, #000 calc(100% - min(28px, 35%)), transparent 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

/* Специфичнее экранных правил строк: ни один поздний ellipsis-override не
   должен вернуть многоточие артистскому имени. */
body .track-artist-sub.artist-name-fade,
body .nm-track-sub.artist-name-fade {
  text-overflow: clip;
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - min(28px, 35%)), transparent 100%);
  mask-image: linear-gradient(to right, #000 0, #000 calc(100% - min(28px, 35%)), transparent 100%);
}

/* ==========================================================================
   Медиатека (18.11.2026): ваши вещи вместо плиток меню. Три коллекции с настоящими
   обложками — сердце-стрелка, мозаика обложек ваших плейлистов, лица ваших артистов —
   и под ними один ряд чипов-инструментов, как фильтры главной. Раньше было шесть
   одинаковых тёмных плиток-значков, как в настройках: они ничего не показывали и не
   вписывались в экран с живыми обложками. Всё плоское — без стекла и теней:
   блок прокручивается вместе со страницей (docs/LIQUID-GLASS.md). Картинки и подписи
   кладёт renderLibraryHub (app.js) по модели core/library-hub.js.
   ========================================================================== */
.lib-collections {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 2px;
}
/* Базовая .ios-menu-item — строка списка (отступы, линия снизу); у карточки всё это отключено. */
#libraryRootView .lib-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  -webkit-tap-highlight-color: transparent;
  transition: scale var(--dur-press) var(--ease-out);
}
#libraryRootView .lib-card.is-pressed { scale: var(--press-content-scale); }

.lib-art {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: stretch;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-shelf);
  background: var(--inset);
}
.lib-art > img, .lib-art > svg {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  object-fit: cover;
}
/* Мозаика 2×2: четыре разные обложки, щель в 2 px — подложка плитки. */
.lib-art.is-grid {
  grid-template: repeat(2, minmax(0, 1fr)) / repeat(2, minmax(0, 1fr));
  gap: 2px;
}
.lib-art.is-grid > img { grid-area: auto; }
/* Запасной значок: пока ответа нет и когда показывать нечего. С картинками прячется. */
.lib-art.has-art > .lib-art-empty { display: none; }
.lib-art-artists > svg.lib-art-empty {
  width: 46%;
  height: 46%;
  place-self: center;
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Артисты: круглые лица, как в «Избранных исполнителях»; одно лицо — крупный круг по центру. */
.lib-art-artists.has-art:not(.is-grid) > img {
  width: 74%;
  height: 74%;
  place-self: center;
  border-radius: 50%;
}
.lib-art-artists.is-grid {
  gap: 8px;
  padding: 10px;
}
.lib-art-artists.is-grid > img {
  border-radius: 50%;
  aspect-ratio: 1;
}

.lib-title {
  margin-top: 8px;
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Высота подписи занята заранее: число приходит с ответом сервера, и блок ниже не прыгает. */
.lib-sub {
  min-height: 1.3em;
  margin-top: 1px;
  overflow: hidden;
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Инструменты — триптих (решение владельца 18.11.2026): одна плоская плита из ячеек, в каждой крупное
   число, акцентная чёрточка и подпись. Без стекла: плита едет вместе со страницей. Ячейка остаётся
   role=button (клавиатура, нажатие NMPress, предзагрузка), id и счётчики прежние. Значков у ячеек нет,
   поэтому анимация значка из core/icon-motion.js для них ничего не находит и молчит. */
#libraryRootView .lib-tools {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  margin: 14px 0 0;
  border-radius: var(--r-card);
  background: var(--bg-card);
  box-shadow: inset 0 0 0 1px var(--line-soft);
  overflow: hidden;   /* скругление плиты обрезает нажатый фон крайних ячеек */
}
#libraryRootView .lib-tool {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: 16px 14px 15px;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--dur-fast) var(--ease-out);
}
#libraryRootView .lib-tool + .lib-tool:not(.hidden)::before {   /* разделитель — слева от каждой ячейки, кроме первой */
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 1px;
  background: var(--line);
}
#libraryRootView .lib-tool.is-pressed { background: var(--bg-card-active); }
#libraryRootView .lib-tool-num {
  display: block;
  max-width: 100%;
  line-height: 1;
}
/* Число лежит в прежнем .menu-count: его пишут sync.js, app.js, recognize.js и replay.js, id не менялись.
   Единица («сервиса», «ч») приходит атрибутом data-unit и рисуется после числа. */
#libraryRootView .lib-tool .menu-count {
  display: block;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--text);
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}
#libraryRootView .lib-tool .menu-count::after {
  content: attr(data-unit);
  margin-left: 3px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text-muted);
}
#libraryRootView .lib-tool .menu-count:empty {   /* числа ещё нет (или оно нулевое): тире, а не пустое место */
  display: block;
  color: var(--text-muted);
}
#libraryRootView .lib-tool .menu-count:empty::before { content: "—"; }
#libraryRootView .lib-tool .menu-count:empty::after { content: none; }
#libraryRootView .lib-tool-dash {
  display: block;
  width: 18px;
  height: 2px;
  margin: 12px 0 9px;
  border-radius: 1px;
  background: var(--accent);
}
.lib-tool-label {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-secondary);
}
/* colab.js прячет «Совпадение вкусов», когда функция выключена: у ячейки display задан выше, поэтому — явно. */
#libraryRootView .lib-tool.hidden { display: none; }
@media (max-width: 360px) {
  .lib-collections { gap: 8px; }
  .lib-title { font-size: 14px; }
}

/* Микс дня: одна обложка связывает карточку на главной с экраном потока. */
#homeTab #forYouMixDayCard { background: #180b13; }
#homeTab #forYouMixDayCard .for-you-card-content { padding: 38px 16px 18px; background: linear-gradient(transparent, #180b13 75%); }
#homeTab #forYouMixDayCard .for-you-card-title { font-size: 23px; letter-spacing: -.035em; }
#homeTab #forYouMixDayCard .for-you-card-sub { color: rgba(255, 240, 231, .72); }
#forYouMixDayCard:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.home-mix-detail.is-daily-mix { background: var(--bg); }
.is-daily-mix .home-mix-detail-inner { max-width: 520px; }
.is-daily-mix .home-mix-nav { margin-bottom: 14px; }
.is-daily-mix .home-mix-cover { width: 100%; max-width: 390px; aspect-ratio: 300 / 268; border-radius: 20px; margin-bottom: 25px; }
.is-daily-mix .home-mix-heading h2 { font-size: 34px; letter-spacing: -.045em; }
.is-daily-mix .home-mix-heading p { margin-top: 8px; }
.is-daily-mix .home-mix-play { min-height: 56px; border-radius: 16px; margin-top: 24px; }
.is-daily-mix .home-mix-note { margin-top: 26px; }
