/* Текст песни в большом плеере и «круг» исполнителей (desktop/web/js/lyrics.js).
   Текст — белым по чёрному, как всё в Prisma; цвет появляется только у голосов: каждый исполнитель —
   свой цвет света, разложенного призмой. */

/* ---------- кнопка «Текст» в строке плеера ---------- */
.st-words { position: relative; isolation: isolate; }
.st-words.on, .st-words.on:hover { color: #000; background: none; }
.st-words.on::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: 50%; background: #fff; box-shadow: 0 6px 22px -6px rgba(255, 255, 255, .45); }
.st-words.on:hover::before { background: rgba(255, 255, 255, .86); }
.st-words.busy::after { content: ''; position: absolute; inset: 2px; border-radius: 50%; border: 1.5px solid transparent; border-top-color: currentColor; animation: spin .9s linear infinite; }
.st-words:disabled { opacity: .26; }

/* ---------- круг исполнителей ---------- */
/* --S — сторона места под обложку, --a — размер лица, --r — на каком расстоянии от центра стоят лица */
.st-disc { --a: clamp(32px, calc(var(--S) * .13), 60px); --r: calc(var(--S) / 2 + var(--a) * .08); }
.st-art { transition: width .8s var(--ease), border-radius .8s var(--ease), box-shadow .6s var(--ease); }
.st-disc.multi .st-art { width: calc(var(--S) - var(--a) * .84 - 18px); border-radius: 50%; box-shadow: 0 40px 110px -34px rgba(var(--tint), .75), 0 26px 60px -30px #000; }
/* обложка становится пластинкой: в середине — отверстие, и пока играет музыка, она медленно вращается */
.st-disc.multi .st-art::before { content: ''; position: absolute; z-index: 1; left: 50%; top: 50%; width: 12%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, #050507 0 30%, rgba(255, 255, 255, .2) 33%, rgba(12, 12, 16, .9) 38%); box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 0 24px rgba(0, 0, 0, .6); }
.st-disc.multi .st-art img { animation: disc 90s linear infinite; animation-play-state: paused; }
#stage.playing .st-disc.multi .st-art img { animation-play-state: running; }
@keyframes disc { to { transform: rotate(360deg); } }
body.eco .st-disc.multi .st-art img { animation: none; }

.vc-ring { position: absolute; inset: 0; pointer-events: none; }
.vc-orbit { position: absolute; inset: calc(var(--S) / 2 - var(--r)); border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); opacity: 0; transform: scale(.55); transition: opacity .6s var(--ease), transform .9s var(--ease); }
.vc-ring.open .vc-orbit { opacity: 1; transform: none; }
/* луч по кругу показывает на того, кто поёт */
.vc-beam { position: absolute; inset: -2px; border-radius: 50%; background: conic-gradient(from -30deg, transparent, rgba(var(--bc, 255, 255, 255), .95) 30deg, transparent 60deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
  transform: rotate(var(--at, 0deg)); opacity: 0; transition: transform .9s var(--ease), opacity .5s var(--ease); }
.vc-ring.live .vc-beam { opacity: 1; }

/* лица: сперва все в центре, потом разлетаются по кругу — каждое в свою очередь */
.vc { position: absolute; left: 50%; top: 50%; width: var(--a); height: var(--a); margin: calc(var(--a) / -2) 0 0 calc(var(--a) / -2); border-radius: 50%; pointer-events: auto;
  transform: rotate(var(--ang)) translate(0) rotate(calc(var(--ang) * -1)) scale(.3); opacity: 0; -webkit-tap-highlight-color: transparent;
  transition: transform 1s var(--spring) calc(var(--i) * 70ms), opacity .5s var(--ease) calc(var(--i) * 70ms); }
.vc-ring.open .vc { transform: rotate(var(--ang)) translate(var(--r)) rotate(calc(var(--ang) * -1)); opacity: 1; }
.vc.flat { cursor: default; }
.vc-pic, .vc-mini { position: relative; display: grid; place-items: center; border-radius: 50%; overflow: hidden; color: #fff;
  background: linear-gradient(140deg, rgba(var(--c, 255, 255, 255), .6), rgba(var(--c, 255, 255, 255), .18)); }
.vc-pic img, .vc-mini img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vc-pic.pic b, .vc-mini.pic b { visibility: hidden; }
.vc-pic { width: 100%; height: 100%; font: 700 calc(var(--a) * .32)/1 var(--font-display); box-shadow: 0 0 0 2px rgba(0, 0, 0, .6), 0 12px 26px -12px #000;
  transition: transform .55s var(--spring), box-shadow .45s var(--ease), opacity .45s var(--ease), filter .45s var(--ease); }
.vc:hover .vc-pic { transform: scale(1.08); }
.vc-ring.live .vc:not(.on) .vc-pic { opacity: .42; filter: grayscale(.75); }
.vc.on { z-index: 2; }
.vc.on .vc-pic { transform: scale(1.28); box-shadow: 0 0 0 2.5px rgb(var(--c)), 0 0 36px 4px rgba(var(--c), .6); }
.vc.on::before { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid rgba(var(--c), .8); animation: vc-ping 1.8s var(--ease) infinite; pointer-events: none; }
@keyframes vc-ping { from { transform: scale(1.12); opacity: .9; } to { transform: scale(1.8); opacity: 0; } }
.vc-name { position: absolute; left: 50%; top: calc(100% + 14px); transform: translateX(-50%); z-index: 3; padding: 4px 10px; border-radius: 999px; white-space: nowrap; pointer-events: none;
  background: rgba(8, 8, 12, .8); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 8px 20px -8px #000; color: #fff; font: 600 12px/1.15 var(--font-text); opacity: 0; transition: opacity .3s var(--ease); }
.vc.low .vc-name { top: auto; bottom: calc(100% + 14px); }
.vc.on .vc-name, .vc:hover .vc-name, .vc:focus-visible .vc-name { opacity: 1; }
body.touch .vc:hover .vc-name { opacity: 0; }
body.touch .vc.on .vc-name { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .vc, .vc-orbit { transition-duration: .01s; transition-delay: 0s; }
  .vc.on::before, .st-disc.multi .st-art img { animation: none; }
}

/* «Поёт …» под названием трека */
.vc-now { display: inline-flex; align-items: center; gap: 10px; justify-self: start; max-width: 100%; min-height: 26px; color: rgb(var(--c, 255, 255, 255)); font: 600 14.5px/1.2 var(--font-text); transition: color .4s var(--ease); }
.vc-now.idle { visibility: hidden; }
.vc-now-faces, .ly-faces { display: flex; flex: none; }
.vc-mini { width: 24px; height: 24px; flex: none; margin-left: -7px; font: 700 9px/1 var(--font-display); box-shadow: 0 0 0 2px #0b0b10; }
.vc-mini:first-child { margin-left: 0; }

/* ---------- текст песни ---------- */
.st-lyr { display: none; position: relative; min-width: 0; min-height: 0; }
.ly-scroll { position: relative; height: 100%; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; touch-action: pan-y; outline: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 15%, #000 78%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 15%, #000 78%, transparent 100%); }
.ly-scroll::-webkit-scrollbar { display: none; }
.ly-list { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(12px, 1.9vh, 22px); padding: 34vh 28px 52vh 0; }
.ly-line { max-width: 100%; font: 800 clamp(24px, 2.45vw, 38px)/1.2 var(--font-display); letter-spacing: -.025em; color: rgba(255, 255, 255, .26); overflow-wrap: anywhere; text-wrap: balance;
  transform: scale(.955); transform-origin: 0 50%; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: color .5s var(--ease), transform .5s var(--ease), text-shadow .5s var(--ease); }
.ly-line:hover { color: rgba(255, 255, 255, .56); }
.ly-line.past { color: rgba(255, 255, 255, .34); }
.ly-line.on { color: #fff; transform: none; text-shadow: 0 0 42px rgba(var(--c, var(--tint)), .5); }
body.touch .ly-line:hover:not(.on) { color: rgba(255, 255, 255, .26); }
body.touch .ly-line.past:hover:not(.on) { color: rgba(255, 255, 255, .34); }
/* проигрыш без слов — три точки, которые загораются, пока он идёт */
.ly-gap { display: flex; gap: 12px; padding: 12px 0; transform-origin: 0 50%; }
.ly-gap i { width: 13px; height: 13px; border-radius: 50%; background: rgba(255, 255, 255, .2); transition: background .4s var(--ease), box-shadow .4s var(--ease), transform .4s var(--spring); }
.ly-gap.on { animation: ly-breathe 2.6s ease-in-out infinite; }
.ly-gap.on i { transform: scale(1.12); }
.ly-gap.on i.lit { background: #fff; box-shadow: 0 0 16px rgba(255, 255, 255, .55); }
@keyframes ly-breathe { 50% { transform: scale(1.1); } }
/* кто поёт эту часть */
.ly-who { display: flex; align-items: center; gap: 9px; max-width: 100%; margin: 20px 0 -6px; color: rgb(var(--c)); font: 600 13px/1.2 var(--font-text); }
.ly-who:first-child { margin-top: 0; }
.ly-who-names { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ly-who small { flex: none; color: var(--ink-3); font-size: 12px; font-weight: 500; }
.ly-who small::before { content: '·'; margin-right: 9px; }
/* простой текст, без времени строк */
.ly-plain { gap: 3px; padding-top: 64px; padding-bottom: 28vh; }
.ly-plain .ly-line { cursor: text; transform: none; color: var(--ink-2); font: 600 clamp(17px, 1.5vw, 23px)/1.5 var(--font-text); letter-spacing: 0; user-select: text; -webkit-user-select: text; }
.ly-plain .ly-line:hover { color: var(--ink-2); }
.ly-plain .ly-who { margin-top: 22px; margin-bottom: 4px; }
.ly-space { height: 20px; }
.ly-sk { height: clamp(26px, 2.6vw, 40px); border-radius: 13px; }
.ly-note { position: absolute; left: 0; top: 14px; color: var(--ink-3); font-size: 13px; }
.ly-back { position: absolute; left: 0; bottom: 22px; z-index: 2; color: var(--ink); background: rgba(22, 22, 30, .86); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 12px 30px -12px #000; animation: fade-in .25s both; }

/* ---------- раскладка: обложка слева, текст справа ---------- */
#stage.lyr { place-items: stretch; grid-template-rows: minmax(0, 1fr); padding-top: 28px; }
#stage.lyr .st-box { min-height: 0; max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto auto minmax(0, 1fr);
  grid-template-areas: '. lyr' 'disc lyr' 'text lyr' '. lyr'; column-gap: clamp(40px, 6vw, 104px); row-gap: 26px; text-align: left; }
#stage.lyr .st-disc { grid-area: disc; --S: min(36vh, 27vw, 380px); }
#stage.lyr .st-text { grid-area: text; width: min(36vh, 27vw, 380px); justify-items: start; gap: 9px; }
#stage.lyr .st-title { font-size: clamp(22px, 2.3vw, 34px); -webkit-line-clamp: 2; }
#stage.lyr .st-artist { font-size: clamp(15px, 1.3vw, 18px); justify-self: start; }
#stage.lyr .st-reason { display: none; }
#stage.lyr .st-lyr { display: block; grid-area: lyr; align-self: stretch; justify-self: stretch; }

@media (max-width: 1080px) {
  .vc-now { justify-self: center; }                        /* плеер в столбик — подпись посередине, как название */
  #stage.lyr .vc-now { justify-self: start; }
  #stage.lyr .st-box { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); grid-template-areas: 'disc text' 'lyr lyr'; column-gap: 22px; row-gap: 18px; }
  #stage.lyr .st-disc { --S: 104px; }
  #stage.lyr .st-disc.multi .st-art { width: 100%; }
  #stage.lyr .vc-ring { display: none; }
  #stage.lyr .st-text { width: auto; }
  #stage.lyr .ly-list { padding-top: 26vh; }
}

/* ---------- телефон ---------- */
body.phone .st-bar-ctx { padding-left: 44px; }                 /* справа две кнопки, слева одна — название остаётся посередине */
body.phone .st-words.on::before { inset: 6px; }
/* на телефоне по бокам места нет: лица встают внутри места под обложку, а не выступают за него */
body.phone .st-disc { --r: calc(var(--S) / 2 - var(--a) / 2 - 2px); }
body.phone .st-disc.multi .st-art { width: calc(var(--S) - var(--a) * 2 - 16px); }
body.phone #dock .dk-words { display: none; }                    /* на телефоне кнопка «Текст» — в верхней строке плеера */
body.phone .vc-now { grid-column: 1 / -1; justify-self: start; font-size: 13.5px; min-height: 24px; margin-top: 2px; }
body.phone .vc-mini { width: 22px; height: 22px; }
body.phone .vc-name { font-size: 11.5px; padding: 3px 8px; }
body.phone #stage.lyr .st-box { display: grid; grid-template-columns: 58px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); grid-template-areas: 'disc text' 'lyr lyr';
  align-items: center; justify-content: stretch; gap: 16px 14px; margin: 0; }
body.phone #stage.lyr .st-disc { --S: 58px; display: grid; }
body.phone #stage.lyr .st-art { border-radius: 15px; box-shadow: 0 16px 34px -16px #000; }
body.phone #stage.lyr .st-disc.multi .st-art { width: 100%; border-radius: 50%; }
body.phone #stage.lyr .vc-ring { display: none; }
body.phone #stage.lyr .st-text { width: auto; gap: 1px 12px; }
body.phone #stage.lyr .st-title { font-size: 17px; line-height: 1.2; -webkit-line-clamp: 1; }
body.phone #stage.lyr .st-artist { font-size: 14px; }
body.phone #stage.lyr .vc-now { font-size: 12.5px; min-height: 22px; }
body.phone #stage.lyr .vc-now .vc-mini { width: 18px; height: 18px; margin-left: -6px; }
body.phone #stage.lyr .vc-now .vc-mini:first-child { margin-left: 0; }
body.phone .ly-list { padding: 22vh 6px 44vh 0; gap: 14px; }
body.phone .ly-line { font-size: 23px; line-height: 1.22; }
body.phone .ly-plain { padding-top: 46px; gap: 2px; }
body.phone .ly-plain .ly-line { font-size: 17px; }
body.phone .ly-back { bottom: 14px; }
@media (max-height: 500px) {               /* телефон на боку: высоты мало — над текстом только название и «Поёт …» */
  body.phone #stage.lyr .st-box { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'text' 'lyr'; gap: 4px; }
  body.phone #stage.lyr .st-disc, body.phone #stage.lyr .st-artist, body.phone #stage.lyr .st-like-box { display: none; }
  body.phone #stage.lyr .st-text { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 14px; }
  body.phone #stage.lyr .st-title { font-size: 15px; }
  body.phone #stage.lyr .vc-now { grid-column: 2; grid-row: 1; margin: 0; }
  body.phone #stage.lyr .ly-list { padding: 6vh 6px 34vh 0; gap: 8px; }
  body.phone #stage.lyr .ly-line { font-size: 19px; }
  body.phone #stage.lyr .ly-who { margin-top: 8px; }
}
