/* Temas de palco da TV (js: player/skins/stage.js e skins/temas/*.js). O tema só desenha o fundo no canvas; a capa, o nome, o relógio
   e a música são HTML por cima, nos mesmos lugares em qualquer tema de palco. Guia: docs/19-DESIGN-SYSTEM.md ("Como criar um tema da TV").
   A posição da capa vem de --st-x / --st-y (0 a 1 da TV) e --st-size (fração do lado menor), gravadas pelo hero.js e por theme.js.
   Este arquivo entra depois de tv-janela.css (a música na tela cheia é ajustada aqui). */

.stage { position: absolute; inset: 0; overflow: hidden; container: stage / size; --st-x: .5; --st-y: .5; --st-size: .36; --st-en: 0; background: #07070b; }
.stage > canvas { position: absolute; inset: 0; z-index: 0; display: block; width: 100%; height: 100%; }

.st-logo { position: absolute; z-index: 2; left: calc(var(--st-x) * 100%); top: calc(var(--st-y) * 100%); width: calc(var(--st-size) * 100cqmin); aspect-ratio: 1;
  translate: -50% -50%; scale: calc(1 + var(--st-en) * .05); transition: opacity .25s; }
.player .cv.st-cv { position: relative; overflow: hidden; display: grid; place-items: center; width: 100%; height: 100%; font-size: calc(var(--st-size) * 36cqmin); box-shadow: 0 16px 34px -10px rgb(0 0 0 / .7); }
.player .cv.st-cv[data-logo] { background: #fff; }
.stage[data-shape='circle'] .st-cv { border-radius: 50%; }
.stage[data-shape='squircle'] .st-cv { border-radius: 28%; }
.stage[data-shape='square'] .st-cv { border-radius: 6%; }

/* nome e frequência logo abaixo da capa */
.st-name { position: absolute; z-index: 2; left: calc(var(--st-x) * 100%); top: calc(var(--st-y) * 100% + var(--st-size) * 50cqmin + 10px); translate: -50% 0; width: max-content; max-width: calc(100% - 40px);
  text-align: center; text-shadow: 0 2px 12px rgb(0 0 0 / .65); pointer-events: none; transition: opacity .25s; }
.st-name b { display: block; font: 800 21px/1.15 var(--display); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-name small { display: block; margin-top: 2px; font: 600 12.5px/1.2 var(--display); color: #ece6f6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-name small:empty { display: none; }
@container stage (max-height: 190px) { .st-name small { display: none; } }
@container stage (max-height: 120px) { .st-name { display: none; } }

/* um toque na TV mostra os botões no meio dela: capa e nome ficam de fundo, como na Vibe */
.tv.show-ctrl :is(.st-logo, .st-name) { opacity: .25; }

/* tela cheia: a música desce para logo abaixo do nome, na mesma coluna da capa (a regra geral usa as medidas da Vibe) */
.player[data-tvfull='true'] .st-name b { font-size: clamp(21px, 5vh, 30px); }
.player[data-tvfull='true'][data-stage='true'] .tv-song { left: calc(var(--st-x) * 100%);
  top: calc(var(--st-y) * var(--T) + var(--st-size) * min(100vw, var(--T)) / 2 + 76px); }

/* janela do app Android (PiP do sistema): com a música embaixo, o nome fica sem a frequência */
@media (min-height: 150px) and (min-width: 250px) { html.pip-native .tv:has(.tv-song:not([hidden])) .st-name small { display: none; } }

/* miniatura na folha "Tema da TV": o fundo vem do próprio tema (campo preview) */
.pv-stage::after { content: ''; position: absolute; left: 50%; top: 50%; width: 30%; aspect-ratio: 1; translate: -50% -50%; border-radius: 28%; background: #fff; box-shadow: 0 6px 12px rgb(0 0 0 / .4); }

@media (prefers-reduced-motion: reduce) { .st-logo { scale: none; } }
