:root {
  color-scheme: dark;
  --bg: #16181c; --panel: #202329; --panel-2: #292e36; --edge: #3a3f4a;
  --ink: #e8eaed; --dim: #a2a8b2; --muted: #6c7482; --amber: #f5a623;
  --green: #3ddc84; --red: #ff7375; --blue: #7dc0ff;
  --sans: "Chakra Petch", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled, input:disabled { opacity: .42; cursor: default; }
button:focus-visible, input:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
button:active:not(:disabled) { transform: translateY(1px); }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, p { margin: 0; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; font-size: 22px; font-weight: 750; letter-spacing: -.035em; white-space: nowrap; }
.brand img { flex-shrink: 0; }
.brand b { color: var(--amber); font-weight: 650; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 18px; background: var(--panel-2); color: var(--ink); border: 1px solid var(--edge); border-radius: 10px; font-size: 15px; font-weight: 650; transition: background .15s, border-color .15s; }
.button:hover:not(:disabled) { background: #343a44; border-color: #657080; }
.button.primary { background: var(--amber); color: #241b0d; border-color: var(--amber); }
.button.primary:hover:not(:disabled) { background: #ffb846; }
.button.quiet { background: transparent; }
.text-button { min-height: 44px; padding: 8px; background: none; border: 0; color: var(--dim); font-size: 13px; font-weight: 550; }
.text-button:hover:not(:disabled) { color: var(--amber); }
.connection { display: inline-flex; align-items: center; gap: 8px; color: var(--dim); font-size: 13px; min-height: 24px; }
.connection-dot { width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; background: var(--muted); }
.connection.connected .connection-dot { background: var(--green); }
.connection.connecting .connection-dot { background: var(--amber); }
.connection.disconnected .connection-dot { background: var(--red); }
.control-icon { width: 22px; height: 22px; flex-shrink: 0; }
/* Focus sentinel: the shell refocuses the first tabbable element after history calls. Kept rendered
   (1px, fixed) so focusing it never scrolls; it only resumes the remembered control. */
.tv-focus-sentinel { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
input[type="range"] { height: 36px; min-width: 0; margin: 0; accent-color: var(--amber); cursor: pointer; }
input[type="text"], input[type="search"] { min-width: 0; background: #1b1e23; border: 1px solid var(--edge); border-radius: 10px; color: var(--ink); padding: 14px; min-height: 50px; }
input::placeholder { color: var(--dim); opacity: .8; }
input[type="text"]:focus, input[type="search"]:focus { border-color: var(--blue); }
.form-error { color: var(--red); font-size: 14px; line-height: 1.5; margin-top: 12px; }

/* TV: type and layout dimensions at 80% of the original size; no visual scaling. */
/* Margem segura da TV (title-safe ~5% por borda: 48px x 27px a 960x540): a Philips corta o overscan.
   Todo conteúdo e todo anel de foco (--tv-ring = contorno + afastamento) ficam dentro dela; só o fundo vai até a borda. */
.tv-page { --tv-safe-x: 5vw; --tv-safe-y: 5vh; --tv-ring: 6px; --tv-control-h: clamp(36px, 3vw, 56px); --tv-control-font: clamp(14px, 1.1vw, 21px); --tv-focus-space: 10px; --tv-backdrop: radial-gradient(ellipse at 20% -35%, #282d36, #16181c 65%); --tv-fade: .4s; overflow: hidden; height: 100vh; height: 100dvh; }
.tv-page ::selection { background: #f5a62342; color: var(--ink); }
.tv-page input { caret-color: var(--amber); }
.tv-page .tv-shell { position: relative; z-index: 1; height: 100%; padding: calc(var(--tv-safe-y) + var(--tv-ring)) calc(var(--tv-safe-x) + var(--tv-ring)); display: flex; flex-direction: column; }
/* The usual gradient sits behind the content and fades out while the screen's ambient video is on. */
.tv-page .tv-shell::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--tv-backdrop); transition: opacity var(--tv-fade) ease-out; }
.tv-page .tv-ambient.has-media ~ .tv-shell::before, .tv-page .tv-theme:not([hidden]) ~ .tv-shell::before { opacity: 0; }
/* Fundo escolhido no perfil: o vídeo do tema cobre a tela; a versão CSS (static/karaoke/themes.css)
   segura o lugar enquanto o vídeo carrega ou se ele faltar, e o Grafite é só ela. */
.tv-page .tv-theme { position: fixed; z-index: 0; }
.tv-page:has(.tv-ambient.has-media) .tv-theme { display: none; }
/* Ambient video: behind everything (lyrics and pairing) and inside the Agora card. Only opacity animates. */
.tv-page .tv-ambient { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: var(--tv-backdrop); }
.tv-page .tv-ambient-media { position: absolute; inset: 0; opacity: 0; transition: opacity var(--tv-fade) ease-out; }
.tv-page .tv-ambient-media.is-on { opacity: 1; }
.tv-page .tv-ambient-poster, .tv-page .tv-ambient-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tv-page .tv-ambient-video { opacity: 0; transition: opacity var(--tv-fade) ease-out; }
.tv-page .tv-ambient-video.is-ready { opacity: 1; }
.tv-page .tv-ambient::before, .tv-page .tv-now-ambient::before { content: ''; position: absolute; inset: 0; z-index: 1; opacity: 0; transition: opacity var(--tv-fade) ease-out; }
.tv-page .tv-ambient::after, .tv-page .tv-now-ambient::after { content: ''; position: absolute; inset: 0; z-index: 2; background: #090b0e; opacity: 0; transition: opacity .6s ease-out; }
.tv-page .tv-ambient.has-media::before, .tv-page .tv-now-ambient.has-media::before { opacity: 1; }
.tv-page .tv-ambient.has-media.is-paused::after, .tv-page .tv-now-ambient.has-media.is-paused::after { opacity: .4; }
/* Lyrics: dark centre where the line sits; header, sync footer and transport over dark bands. */
.tv-page .tv-ambient:is([data-scene="palco"], [data-scene="aurora"], [data-scene="neon"], [data-scene="galaxia"], [data-scene="por-do-sol"], [data-scene="oceano"])::before { background:
  linear-gradient(to bottom, #101216c2 0, #101216a6 11%, #10121600 26%),
  linear-gradient(to top, #101216d1 0, #101216a6 15%, #10121600 32%),
  radial-gradient(ellipse 44% 54% at 50% 50%, #101216b3 0, #101216a6 60%, #10121652 86%, #10121612 100%); }
/* Pairing: the text half stays dark; the QR keeps an opaque card. */
.tv-page .tv-ambient[data-scene="boas-vindas"]::before { background:
  linear-gradient(to bottom, #101216b8 0, #10121694 10%, #10121600 28%),
  linear-gradient(to right, #101216ad 0, #101216a3 50%, #10121624 100%); }
/* Agora card: the video becomes the card background, with a dark band over the text. */
.tv-page .tv-now-ambient { position: absolute; inset: 0; z-index: -1; overflow: hidden; border-radius: inherit; pointer-events: none; }
.tv-page .tv-now-ambient::before { background: linear-gradient(to right, #14161bdb 0, #14161bc4 62%, #14161ba3 100%), linear-gradient(to top, #14161baa 0, #14161b00 50%); }
.tv-page .tv-header { display: flex; align-items: center; justify-content: space-between; gap: 1.6vw; min-height: var(--tv-control-h); margin-bottom: 2.08vh; flex-shrink: 0; }
.tv-page .brand { font-size: clamp(19.2px, 1.6vw, 30.4px); gap: 9.6px; letter-spacing: -.03em; }
.tv-page .brand img { width: clamp(30.4px, 2.56vw, 48px); height: auto; }
.tv-page .tv-header-actions { display: flex; align-items: center; gap: 14.4px; }
.tv-page .connection { font-size: clamp(12.8px, 0.96vw, 19.2px); }
/* Sem conexão a TV avisa de longe: o selo ganha cor e o ponto pulsa (só opacidade) até reconectar. */
.tv-page .tv-header .connection { padding: 4px 12px 4px 10px; border-radius: 999px; border: 1px solid transparent; transition: background-color .2s ease-out, border-color .2s ease-out, color .2s ease-out; }
.tv-page .tv-header .connection.connecting { color: #ffd68f; background: #302719; border-color: #6c572f; }
.tv-page .tv-header .connection.disconnected { color: #ffc4c5; background: #3b2528; border-color: #825155; }
.tv-page .connection:is(.connecting, .disconnected) .connection-dot { animation: tv-dot-pulse 1.2s ease-in-out infinite alternate; }
@keyframes tv-dot-pulse { from { opacity: 1; } to { opacity: .3; } }
.tv-page .tv-header .connection { max-width: 17.6vw; min-width: 0; }
.tv-page #tvConnectionText { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-page .connection-dot { width: 10px; height: 10px; }
/* O foco anda a cada toque do D-pad: troca na hora, sem esmaecer cor nem anel (só transform/opacity animam). */
.tv-page button { transition: none; }
.tv-page [data-tv-focus]:focus { outline: 3px solid var(--amber); outline-offset: 3px; box-shadow: 0 0 0 var(--tv-ring) #f5a6231c; }
.tv-page [data-tv-focus]:focus-visible { outline-color: var(--amber); }
/* Âmbar em volta de botão âmbar some a 3 metros: o principal ganha anel claro. */
.tv-page .tv-play-button:focus, .tv-page .tv-play-button:focus-visible { outline-color: var(--ink); box-shadow: 0 0 0 var(--tv-ring) #e8eaed1f; }
.tv-page [data-tv-focus] { scroll-margin: var(--tv-focus-space); }
.tv-page [data-tv-focus-group] { scroll-margin: var(--tv-focus-space); }
.tv-page button[aria-busy='true'] { opacity: .65; }
.tv-page button[aria-disabled='true']:hover { background: #252a32; border-color: var(--edge); }
.tv-page button:active:not(:disabled) { transform: none; }
.tv-page button:disabled { opacity: .36; }
.tv-page .tv-view-nav { display: flex; align-items: center; align-self: stretch; gap: 8px; }
.tv-page .tv-nav-button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; color: var(--dim); padding: 6px 14px; min-height: var(--tv-control-h); font-size: clamp(15px, 1.2vw, 24px); font-weight: 650; }
.tv-page .tv-nav-button.active { color: var(--ink); border-bottom-color: var(--amber); }
.tv-page .tv-nav-button:hover { color: var(--ink); }
/* Abas: o hover global desenharia uma caixa; só o sublinhado âmbar marca a aba em uso. */
.tv-page .tv-nav-button:hover:not(:disabled) { background: transparent; border-color: transparent; }
.tv-page .tv-nav-button.active:hover:not(:disabled) { border-bottom-color: var(--amber); }
.tv-page .tv-icon-button, .tv-small-button, .tv-action-button, .tv-play-button, .tv-search-button { min-height: var(--tv-control-h); display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--edge); border-radius: 7.2px; background: #252a32; color: var(--ink); font-size: var(--tv-control-font); font-weight: 600; padding: 6px 12px; }
.tv-page .tv-icon-button { min-width: var(--tv-control-h); padding: 6px; }
.tv-page .tv-icon-button svg, .tv-action-button svg, .tv-search-button svg, .tv-play-button svg, .tv-small-button svg { width: 18px; height: 18px; flex-shrink: 0; }
.tv-page .tv-small-button { min-height: var(--tv-control-h); font-size: clamp(13.6px, 1vw, 20px); padding: 6px 10px; background: transparent; }
.tv-page .tv-action-button { background: #262b33; }
.tv-page .tv-play-button { min-width: 104px; background: var(--amber); color: #21180a; border-color: var(--amber); }
.tv-page button:hover:not(:disabled) { border-color: #727c8d; background: #353c47; }
.tv-page .tv-play-button:hover:not(:disabled) { border-color: var(--amber); background: #ffb743; }
/* Cabeçalho: Fundo e Conexão são ações secundárias do mesmo peso — ambas sem preenchimento. */
.tv-page .tv-header .tv-icon-button { background: transparent; }
.tv-page .tv-update-button { border: 1px solid #6c572f; color: var(--amber); padding: 9.6px; background: #302719; border-radius: 8px; min-height: var(--tv-control-h); font-size: clamp(12.8px, 0.9vw, 18.4px); }
.tv-page .tv-pairing { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(264px, .64fr); align-items: center; gap: 5.6vw; padding: 1.6vh 2.4vw; }
.tv-page .pairing-copy h1 { font-size: clamp(38.4px, 4.24vw, 88px); font-weight: 700; letter-spacing: -.035em; line-height: 1.05; margin-bottom: 2.4vh; }
.tv-page .pairing-copy > p { color: var(--dim); font-size: clamp(16px, 1.44vw, 29.6px); line-height: 1.5; max-width: 27em; }
.tv-page .pairing-steps { list-style: none; counter-reset: steps; display: grid; gap: 1.6vh; margin: 3.2vh 0 0; padding: 0; font-size: clamp(13.6px, 1.2vw, 24px); }
.tv-page .pairing-steps li { counter-increment: steps; display: flex; align-items: center; gap: 12px; }
.tv-page .pairing-steps li::before { content: counter(steps); color: var(--amber); font-family: var(--mono); font-size: .8em; border: 1px solid #6c512b; border-radius: 50%; width: 1.9em; height: 1.9em; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tv-page .pairing-card { text-align: center; background: #202329; border: 1px solid var(--edge); border-radius: 14.4px; padding: 2.4vh 1.6vw; }
.tv-page .pairing-mode { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 1.4vh; color: var(--dim); font-size: clamp(12.8px, .8vw, 17.6px); }
.tv-page .pairing-mode::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.tv-page .pairing-mode.online { color: #86c9a0; }
.tv-page .pairing-hint { color: var(--dim); font-size: clamp(12.8px, .84vw, 17.6px); line-height: 1.5; max-width: 30em; margin: .8vh auto 0; }
.tv-page .pairing-qr { width: min(20vw, 24vh); height: auto; display: block; margin: 0 auto 1.6vh; border-radius: 8px; }
.tv-page .pairing-qr-loading { min-height: 19.2vh; display: flex; align-items: center; justify-content: center; color: var(--dim); font-size: 16px; }
.tv-page .pairing-code-label { color: var(--dim); font-size: clamp(12.8px, 0.88vw, 19.2px); }
.tv-page .pairing-code { display: block; color: var(--amber); font-size: clamp(28.8px, 2.64vw, 57.6px); letter-spacing: .19em; font-weight: 500; font-family: var(--mono); margin: 0.8vh 0 1.2vh; padding-left: .19em; }
.tv-page .pairing-address { font-size: clamp(12.8px, 0.8vw, 17.6px); overflow-wrap: anywhere; }
.tv-page .pairing-expires { min-height: 1.5em; color: var(--dim); font-size: clamp(12.8px, 0.84vw, 17.6px); margin: 1.28vh 0 0.8vh; }
.tv-page .tv-paired { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.tv-page .tv-dashboard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(232px, .43fr); gap: 2.24vw; flex: 1; min-height: 0; }
.tv-page .tv-library { min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.tv-page .tv-recent { flex-shrink: 0; margin-bottom: 1.6vh; }
.tv-page .tv-recent h2 { font-size: clamp(16px, 1.24vw, 25.6px); font-weight: 600; }
.tv-page .tv-recent-list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(8px, .8vw, 16px); list-style: none; margin: 0; padding: var(--tv-focus-space); }
.tv-page .tv-recent-tile { display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 0; background: transparent; border: 0; border-radius: 9px; color: var(--ink); text-align: left; }
.tv-page .tv-recent-art { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; border-radius: 8px; background: #2d3440; color: #afb8c6; overflow: hidden; }
.tv-page .tv-recent-art img { width: 100%; height: 100%; object-fit: cover; }
.tv-page .tv-recent-art svg { width: 22.4px; height: 22.4px; }
.tv-page .tv-recent-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: clamp(13.6px, .96vw, 19.2px); line-height: 1.25; font-weight: 600; }
.tv-page .tv-recent-tile:focus .tv-recent-title { color: var(--amber); }
.tv-page .tv-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; }
.tv-page .tv-section-heading h1 { font-size: clamp(22.4px, 2vw, 38.4px); letter-spacing: -.025em; font-weight: 650; }
.tv-page .tv-section-heading h2 { font-size: clamp(16px, 1.24vw, 25.6px); font-weight: 600; }
.tv-page .tv-section-heading p { margin-top: 5px; color: var(--dim); font-size: clamp(12px, 0.88vw, 18.4px); }
.tv-page .tv-library-count, .tv-queue-count { color: var(--dim); font-size: clamp(12px, 0.88vw, 18.4px); font-family: var(--mono); }
.tv-page .tv-search { display: flex; gap: 8px; margin: 1.6vh 0; flex-shrink: 0; }
.tv-page .tv-search input { flex: 1; width: 0; min-height: var(--tv-control-h); font-size: clamp(14.4px, 1.12vw, 22.4px); padding: 9.6px 14.4px; background: #1c1f25; }
.tv-page .tv-search-button { width: clamp(40px, 3.4vw, 62px); min-height: var(--tv-control-h); padding: 6px; }
.tv-page .tv-library-status { color: var(--dim); font-size: clamp(16px, 1.28vw, 24.8px); line-height: 1.5; padding: 3.2vh 0.8vw; }
.tv-page .tv-library-filter { display: flex; gap: 6px; margin-left: 6px; }
.tv-page .tv-filter-button { display: inline-flex; align-items: center; gap: 7px; min-height: var(--tv-control-h); padding: 0 clamp(12px, 1vw, 20px); border: 1px solid var(--edge); border-radius: 999px; background: transparent; color: var(--dim); font-size: clamp(13.6px, 1vw, 20px); font-weight: 600; white-space: nowrap; }
.tv-page .tv-filter-button svg { width: 1.05em; height: 1.05em; color: #e0607e; }
.tv-page .tv-filter-button.active { background: #302719; border-color: #6c572f; color: var(--ink); }
.tv-page .tv-song-list { display: flex; flex-direction: column; gap: 4px; list-style: none; margin: 0; overflow-y: auto; min-height: 0; padding: var(--tv-focus-space); scroll-padding: var(--tv-focus-space); overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #515968 transparent; }
.tv-page .tv-library-row { position: relative; display: flex; align-items: center; gap: 6px; min-width: 0; padding: 0 6px 0 0; border-radius: 10px; border: 1px solid transparent; }
.tv-page .tv-library-row:focus-within { background: #2b313b; border-color: #4f5866; }
.tv-page .tv-library-row.is-current { background: #29261f; border-color: #5a4a2c; }
.tv-page .tv-library-row.is-loading { background: #29261f; border-color: #94713c; }
.tv-page .tv-library-row.is-loading .tv-library-art { position: relative; }
.tv-page .tv-library-row.is-loading .tv-library-art > * { opacity: .25; }
.tv-page .tv-library-row.is-loading .tv-library-art::after,
.tv-page .lyrics-stage.is-loading::before { content: ''; width: 28px; height: 28px; border: 3px solid #f5a62335; border-top-color: var(--amber); border-radius: 50%; animation: tv-loading-spin .8s linear infinite; }
.tv-page .tv-library-row.is-loading .tv-library-art::after { position: absolute; inset: 0; margin: auto; }
.tv-page .lyrics-stage.is-loading::before { width: 48px; height: 48px; flex-shrink: 0; margin-bottom: 20px; }
@keyframes tv-loading-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tv-page .tv-library-row.is-loading .tv-library-art::after, .tv-page .lyrics-stage.is-loading::before { animation: none; } }
.tv-page .tv-library-song { display: flex; align-items: center; gap: clamp(10px, .9vw, 18px); flex: 1; min-width: 0; min-height: clamp(56px, 3.8vw, 76px); padding: 5px 12px 5px 8px; background: transparent; border: 0; border-radius: 9px; color: var(--ink); text-align: left; }
.tv-page .tv-library-art { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: clamp(42px, 2.9vw, 56px); height: clamp(42px, 2.9vw, 56px); border-radius: 7px; background: #2d3440; color: #afb8c6; overflow: hidden; }
.tv-page .tv-library-art img { width: 100%; height: 100%; object-fit: cover; }
.tv-page .tv-library-art svg { width: 22.4px; height: 22.4px; }
.tv-page .tv-library-meta { min-width: 0; flex: 1; }
.tv-page .tv-library-meta strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: clamp(15.2px, 1.2vw, 24px); line-height: 1.25; font-weight: 600; }
.tv-page .tv-library-meta small { display: block; margin-top: 4px; font-size: clamp(12px, .86vw, 17.6px); color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Tocando / Na fila: texto de estado, sem pílula; a linha atual já tem o fundo âmbar. */
.tv-page .tv-library-badge { flex-shrink: 0; color: var(--amber); font-size: clamp(13.6px, .96vw, 19.2px); font-weight: 600; white-space: nowrap; }
.tv-page .tv-library-duration { flex-shrink: 0; min-width: 3.4em; text-align: right; font-family: var(--mono); font-size: clamp(12px, .84vw, 17.6px); color: var(--dim); }
.tv-page .tv-row-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-shrink: 0; min-height: var(--tv-control-h); border: 1px solid transparent; border-radius: 8px; background: transparent; font-weight: 600; font-size: clamp(13.6px, .96vw, 19.2px); }
.tv-page .tv-library-row [data-tv-focus]:focus { outline-width: 3px; outline-offset: -3px; box-shadow: none; }
.tv-page .tv-row-button svg { width: 1.25em; height: 1.25em; flex-shrink: 0; }
.tv-page .tv-add-button { color: var(--amber); padding: 0 clamp(12px, 1vw, 18px); }
.tv-page .tv-fav-button, .tv-page .tv-fav-spacer { width: var(--tv-control-h); flex-shrink: 0; }
.tv-page .tv-fav-button { color: #8a929f; }
.tv-page .tv-fav-button[aria-pressed='true'] { color: #e0607e; }
.tv-page .tv-library-row.is-favorite:not(:focus-within) .tv-fav-button { color: #e0607e; }
.tv-page .tv-library-row::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 3px; border-radius: 2px; background: var(--amber); transform: scaleX(0); transform-origin: left; opacity: 0; pointer-events: none; }
.tv-page .tv-library-row.is-holding::after { opacity: 1; transform: scaleX(1); transition: transform .55s linear, opacity .1s; }
.tv-page .tv-track-actions > div { width: min(560px, 60vw); }
.tv-page .tv-track-actions-song { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.tv-page .tv-track-actions-song > div { min-width: 0; }
.tv-page .tv-track-actions-song .tv-library-art { width: 64px; height: 64px; }
.tv-page .tv-track-actions h2 { margin: 0; font-size: clamp(19.2px, 1.4vw, 28px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-page .tv-track-actions-song p { margin: 4px 0 0; }
.tv-page .tv-track-actions-list { display: flex; flex-direction: column; gap: 2px; margin: 0 -18px; }
.tv-page .tv-track-action { display: flex; align-items: center; gap: 14px; width: 100%; min-height: clamp(52px, 3.6vw, 68px); padding: 0 18px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--ink); font-size: clamp(15.2px, 1.1vw, 22.4px); font-weight: 600; text-align: left; }
.tv-page .tv-track-action svg { width: 22px; height: 22px; color: var(--amber); flex-shrink: 0; }
.tv-page #trackActionFavorite svg { color: #e0607e; }
.tv-page .tv-track-action:focus { background: #302719; }
.tv-page .tv-track-actions-hint { margin: 16px 0 0 !important; font-size: 13.6px !important; text-align: center; }
.tv-page .tv-rename-input { width: 100%; min-height: var(--tv-control-h); font-size: clamp(14.4px, 1.12vw, 22.4px); padding: 9.6px 14.4px; background: #1c1f25; }
.tv-page .tv-rename-error { color: var(--red) !important; margin: 11.2px 0 0 !important; font-size: 15.2px !important; }
/* Renomear: Salvar é a ação principal, como o Tocar do transporte (anel claro no foco). */
.tv-page #renameSave { background: var(--amber); color: #21180a; border-color: var(--amber); }
.tv-page #renameSave:hover:not(:disabled) { background: #ffb743; border-color: var(--amber); }
.tv-page #renameSave:focus { outline-color: var(--ink); box-shadow: 0 0 0 var(--tv-ring) #e8eaed1f; }
.tv-page .tv-yt-action { color: var(--amber); min-width: clamp(104px, 7.2vw, 140px); justify-content: center; padding: 0 clamp(12px, 1vw, 18px); }
.tv-page .tv-yt-action[aria-disabled="true"] { color: var(--dim); }
.tv-page .tv-library-meta .tv-yt-error { color: var(--red); }
.tv-page .tv-yt-error[hidden] { display: none; }
.tv-page .tv-youtube-row .tv-library-song { cursor: default; }
@media (prefers-reduced-motion: reduce) { .tv-page .tv-library-row.is-holding::after { transition: opacity .1s; } }
/* A coluna não tem moldura própria: o card Agora já marca o lado; fila e card alinham na mesma margem interna (15px). */
.tv-page .tv-sidebar { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.tv-page .tv-source-label { color: var(--amber); font-size: clamp(12px, 0.88vw, 18.4px); }
.tv-page .tv-now-playing { position: relative; isolation: isolate; flex-shrink: 0; padding: 10px 14px 12px; background: #20242b; border: 1px solid #363d48; border-radius: 9.6px; }
.tv-page .tv-now-song { display: flex; align-items: center; gap: 11.2px; margin-top: 5px; }
.tv-page .tv-now-song img { width: clamp(48px, 4.16vw, 78.4px); height: clamp(48px, 4.16vw, 78.4px); border-radius: 7.2px; object-fit: cover; flex-shrink: 0; }
.tv-page .tv-now-song > div { min-width: 0; }
.tv-page .tv-now-song h2 { font-size: clamp(18.4px, 1.6vw, 31.2px); line-height: 1.2; font-weight: 650; letter-spacing: -.025em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tv-page .tv-now-song p { color: var(--dim); font-size: clamp(12.8px, 0.92vw, 19.2px); margin-top: 7px; }
.tv-page .tv-playback-status { color: var(--amber); font-size: clamp(12.8px, 0.92vw, 19.2px); margin-top: 5px; min-height: 1.4em; line-height: 1.4; }
.tv-page .tv-playback-status.error { color: var(--red); }
.tv-page .tv-now-playing > .tv-action-button { margin-top: 7px; width: 100%; justify-content: space-between; }
.tv-page .tv-queue-section { margin-top: 1.4vh; min-height: 0; flex: 1; display: flex; flex-direction: column; }
.tv-page .tv-queue-section > .tv-section-heading { padding: 0 15px; }
.tv-page .tv-queue-empty { color: var(--dim); font-size: clamp(13.6px, 0.96vw, 20px); line-height: 1.5; margin-top: 16px; padding: 0 15px; }
.tv-page .tv-queue-list { display: flex; flex-direction: column; gap: 12px; list-style: none; margin: 4px 0 0; padding: var(--tv-focus-space); scroll-padding: var(--tv-focus-space); overscroll-behavior: contain; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #515968 transparent; }
.tv-page .tv-queue-row { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid #ffffff0a; }
.tv-page .tv-queue-song { display: flex; align-items: center; gap: 9.6px; flex: 1; min-width: 0; min-height: 46px; padding: 6px 5px; border: 0; border-radius: 7px; background: transparent; color: var(--ink); text-align: left; }
.tv-page .tv-queue-number { color: var(--dim); font-family: var(--mono); font-size: clamp(12px, 0.8vw, 17.6px); }
.tv-page .tv-queue-song strong { display: block; font-size: clamp(14.4px, 1.04vw, 20.8px); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-page .tv-queue-song small { display: block; font-size: clamp(12px, 0.86vw, 17.6px); color: var(--dim); margin-top: 4px; }
.tv-page .tv-queue-song > span:last-child { min-width: 0; }
.tv-page .tv-queue-remove { display: flex; align-items: center; justify-content: center; border: 0; border-radius: 7px; min-width: 35.2px; min-height: var(--tv-control-h); color: var(--dim); background: transparent; }
.tv-page .tv-queue-remove svg { width: 20px; height: 20px; }
.tv-page .tv-stage { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tv-page .tv-song { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 0.8vw; flex-shrink: 0; }
.tv-page .tv-song > div { min-width: 0; }
.tv-page .tv-song-main { display: flex; align-items: center; gap: 12px; }
.tv-page .tv-song-main > div { min-width: 0; }
.tv-page .tv-song-art { width: 48px; height: 48px; flex-shrink: 0; border-radius: 8px; object-fit: cover; background: var(--panel-2); }
.tv-page .tv-song h1 { font-size: clamp(20px, 1.76vw, 33.6px); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-page .tv-song p { color: var(--dim); font-size: clamp(12.8px, 0.96vw, 20px); margin-top: 6px; }
.tv-page .tv-stage-status { display: inline-flex; align-items: center; gap: 8px; color: var(--amber); font-size: clamp(13.6px, 0.96vw, 20.8px); flex-shrink: 0; }
.tv-page .tv-stage-status svg { width: 1.15em; height: 1.15em; flex-shrink: 0; }
.tv-page .tv-stage-status.paused { color: var(--dim); }
.tv-page .lyrics-stage { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 1.6vh 3.2vw; }
.tv-page .stage-note { font-size: clamp(25.6px, 2.64vw, 51.2px); font-weight: 600; letter-spacing: -.02em; line-height: 1.3; }
.tv-page .stage-description { color: var(--dim); font-size: clamp(14.4px, 1.08vw, 23.2px); margin-top: 12.8px; line-height: 1.5; max-width: 42em; }
.tv-page .synced-lyrics { width: min(100%, 74vw); display: flex; flex-direction: column; justify-content: center; gap: 1.44vh; }
.tv-page .lyric-line { font-weight: 600; line-height: 1.22; overflow-wrap: anywhere; text-shadow: 0 1px 2px #0009, 0 2px 22px #000a; }
.tv-page .lyric-previous { color: #727a87; font-size: clamp(19.2px, 1.68vw, 32px); min-height: 1.22em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tv-page .lyric-current-block { position: relative; padding: 1.2vh 0 1.92vh; }
/* The line being sung: a little larger, in a pale amber drawn from --amber, with a faint warm glow. */
.tv-page .lyric-current { color: #ffd68f; font-size: clamp(33.6px, 4.1vw, 84px); font-weight: 700; letter-spacing: -.025em; min-height: 1.22em; text-shadow: 0 1px 2px #0009, 0 2px 22px #000a, 0 0 32px #f5a62329; }
.tv-page .tv-line-track { height: 6px; background: #3d3525; border-radius: 4px; width: min(544px, 75%); margin: 1.2vh auto 0; overflow: hidden; }
/* Barras de progresso andam por transform (scaleX): nenhum quadro refaz o layout da tela numa TV fraca. */
.tv-page .tv-line-track > div { height: 100%; background: var(--amber); width: 100%; transform: scaleX(0); transform-origin: left; }
.tv-page .tv-next-line { display: flex; justify-content: center; align-items: center; gap: 13.6px; }
.tv-page .lyric-next { color: #8f97a3; font-size: clamp(19.2px, 1.76vw, 34.4px); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tv-page .lyric-second { color: #7f8794; font-size: clamp(17.6px, 1.6vw, 31.2px); }
.tv-page .tv-cifra { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 1.6vh; }
.tv-page .tv-cifra-hint { color: var(--dim); font-size: clamp(12.8px, 0.96vw, 19.2px); }
.tv-page .tv-cifra-status { color: var(--dim); font-size: clamp(17.6px, 1.36vw, 27.2px); margin: auto; max-width: 38em; text-align: center; }
.tv-page .tv-cifra-body { flex: 1; min-height: 0; overflow: auto; padding: 1.6vh 2.4vw; font: 500 clamp(17.6px, 1.4vw, 28.8px)/1.45 var(--mono); scrollbar-color: var(--amber) var(--panel); border-radius: 8px; background: #15181dcc; }
.tv-page .tv-cifra-line { white-space: pre; overflow-wrap: normal; min-height: 1.45em; }
.tv-page .tv-cifra-chords { position: relative; min-height: 1.45em; color: var(--amber); }
.tv-page .tv-cifra-chords b { position: absolute; font-weight: 700; white-space: pre; }
.tv-page .tv-cifra-footer { display: flex; align-items: center; justify-content: space-between; color: var(--dim); font-size: clamp(12.8px, 0.88vw, 17.6px); gap: 12.8px; }
.tv-page .tv-cifra-footer > div { display: flex; gap: 9.6px; }
/* Plain text beside the next line; tabular digits keep the countdown from shifting it. */
.tv-page .tv-line-countdown { color: #d9a24a; font-size: clamp(15.2px, 1.3vw, 26px); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; text-shadow: 0 1px 2px #0009; }
.tv-page .plain-lyrics { white-space: pre-wrap; overflow-y: auto; max-height: 100%; width: min(100%, 74vw); line-height: 1.65; font-size: clamp(19.2px, 2.16vw, 43.2px); text-align: left; padding: 9.6px 14.4px; scrollbar-color: var(--edge) transparent; }
.tv-page .lyrics-stage.is-plain .stage-description { margin: 0 0 12px; color: var(--amber); font-size: clamp(12.8px, 0.88vw, 18.4px); }
/* Letra completa: the whole lyric in one reading column, scrolled with the D-pad. The mask fades both ends so it reads as scrolling;
   its tile is 12px larger than the box and not clipped to it, so the D-pad outline is not cut off. */
.tv-page .full-lyrics { flex: 1; min-height: 0; width: fit-content; max-width: 32ch; overflow-y: auto; overscroll-behavior: contain; padding: 4vh 1.2vw 8vh; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; font-size: clamp(20px, 2.1vw, 42px); line-height: 1.3; font-weight: 600; color: #c3c9d2; text-shadow: 0 1px 2px #0009, 0 2px 22px #000a; scrollbar-width: thin; scrollbar-color: #515968 transparent; --ring: 12px; --fade: 6vh;
  --full-mask: linear-gradient(to bottom, #000 0, #000 var(--ring), transparent var(--ring), #000 calc(var(--ring) + var(--fade)), #000 calc(100% - var(--ring) - var(--fade)), transparent calc(100% - var(--ring)), #000 calc(100% - var(--ring)));
  -webkit-mask: var(--full-mask) center / calc(100% + 2 * var(--ring)) calc(100% + 2 * var(--ring)) no-repeat; -webkit-mask-clip: no-clip;
  mask: var(--full-mask) center / calc(100% + 2 * var(--ring)) calc(100% + 2 * var(--ring)) no-repeat; mask-clip: no-clip; }
/* Padding sits on every line, so the amber rule of the current line never moves the text sideways. */
/* Tight leading inside a verse, a clear gap between verses: a wrapped verse never reads as two. */
.tv-page .full-line { margin: 0 0 .55em; padding: .1em 0 .1em .6em; }
.tv-page .full-line.is-past { color: #727a87; }
.tv-page .full-line.is-current { color: #ffd68f; box-shadow: inset 3px 0 0 #f5a623; }
.tv-page .tv-lyric-footer { display: flex; align-items: center; justify-content: space-between; gap: 14.4px; flex-shrink: 0; min-height: var(--tv-control-h); margin-top: 0.8vh; }
/* Karaokê / Letra completa: tabs in the header's style, a little smaller, with a shorter hit area for the footer. */
.tv-page .tv-lyrics-mode { display: flex; align-items: center; gap: clamp(8px, 0.8vw, 16px); flex-shrink: 0; }
.tv-page .tv-lyrics-mode .tv-nav-button { padding: 0 clamp(4px, 0.5vw, 10px) 4px; font-size: clamp(14px, 1vw, 20px); }
.tv-page .tv-upnext { flex: 1; min-width: 0; font-size: clamp(12.8px, 0.96vw, 20px); color: #c3c9d2; text-shadow: 0 1px 2px #000c, 0 0 16px #000b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-page .tv-sync-controls { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.tv-page .tv-sync-controls > span { font-size: clamp(12px, 0.88vw, 18.4px); color: var(--dim); }
.tv-page .tv-sync-controls output { font-family: var(--mono); color: var(--amber); font-size: clamp(12.8px, 0.96vw, 20px); min-width: 50.4px; text-align: center; }
.tv-page .tv-sync-controls .tv-small-button { padding: 6px 9px; }
.tv-page .tv-transport { flex-shrink: 0; margin-top: 1.6vh; padding-top: 1.2vh; border-top: 1px solid #3a414b; }
.tv-page .tv-timeline { display: flex; align-items: center; gap: 14.4px; color: #bcc4cf; font-size: clamp(12.8px, 0.96vw, 19.2px); font-family: var(--mono); margin-bottom: 1.2vh; }
.tv-page .timeline-track { flex: 1; height: 6px; border-radius: 5px; background: #3a414b; overflow: hidden; }
.tv-page .timeline-track > div { height: 100%; width: 100%; background: var(--amber); transform: scaleX(0); transform-origin: left; }
.tv-page .tv-transport-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14.4px; }
.tv-page .tv-controls, .tv-audio-controls { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tv-page .tv-audio-controls output { font-family: var(--mono); color: #c2c9d2; font-size: clamp(12.8px, 1vw, 20px); min-width: 49.6px; text-align: center; }
.tv-page .tv-volume-label { color: var(--dim); font-size: clamp(12px, 0.88vw, 17.6px); margin-left: 8px; }
.tv-page .tv-transport .tv-small-button { background: #252a32; font-size: var(--tv-control-font); }
.tv-page #tvVocal[aria-pressed='true'] { color: var(--amber); border-color: #94713c; background: #32291d; }
.tv-page .tv-key-hint { display: flex; justify-content: center; gap: 7.2px; color: #8f99a8; font-size: clamp(12px, 0.84vw, 17.6px); margin-top: 1.2vh; flex-shrink: 0; }
.tv-page .tv-key-hint > span { color: #a9b2bf; margin-left: 10.4px; }
.tv-page .tv-keys { width: 4em; height: 1em; vertical-align: -.14em; }
.tv-page #tvSourceHint { margin-left: 22.4px; }
.tv-page .tv-dialog { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: #0c0f13bd; z-index: 10; }
.tv-page .tv-dialog { animation: tv-fade-in .18s ease-out both; }
.tv-page .tv-dialog > div { animation: tv-panel-in .2s cubic-bezier(.23, 1, .32, 1) both; width: min(520px, 100vw - 2 * var(--tv-safe-x)); max-height: calc(100dvh - 2 * var(--tv-safe-y)); overflow-y: auto; overscroll-behavior: contain; scroll-padding: 16px; padding: 28px; border: 1px solid #606b7b; border-radius: 14.4px; background: #222830; box-shadow: 0 16px 80px #0009; }
.tv-page .tv-dialog h2 { font-size: 25.6px; margin-bottom: 16px; }
.tv-page .tv-dialog p { color: var(--dim); font-size: 15.2px; line-height: 1.6; margin-bottom: 11.2px; }
.tv-page .tv-dialog-actions { display: flex; gap: 11.2px; margin-top: 19.2px; }
.tv-page .tv-audio-prompt { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, 60.8vw); padding: 30.4px; background: #222830fa; border: 2px solid var(--amber); border-radius: 14.4px; box-shadow: 0 16px 80px #000b; display: flex; align-items: center; flex-direction: column; gap: 22.4px; text-align: center; z-index: 12; animation: tv-prompt-in .2s cubic-bezier(.23, 1, .32, 1) both; }
.tv-page .tv-audio-prompt h2 { font-size: 27.2px; margin-bottom: 9.6px; }
.tv-page .tv-audio-prompt p { font-size: 16px; color: var(--dim); }
.tv-page .tv-notice { position: fixed; left: 50%; bottom: calc(var(--tv-safe-y) + var(--tv-ring)); transform: translateX(-50%); background: #303744f7; border: 1px solid #6c7685; padding: 14.4px 20.8px; border-radius: 9.6px; font-size: clamp(14.4px, 1.12vw, 22.4px); line-height: 1.4; text-align: center; width: max-content; max-width: 68vw; z-index: 20; animation: tv-notice-in .2s cubic-bezier(.23, 1, .32, 1) both; }
/* Seletor de fundo: a tela some e vira a prévia; só a fileira de miniaturas fica, embaixo. */
.tv-page .tv-shell > * { transition: opacity .24s ease-out; }
.tv-page .tv-shell.is-picking-theme > :not(.tv-theme-picker, .tv-notice) { opacity: 0; }
.tv-page .tv-theme-picker { position: fixed; inset: auto 0 0; z-index: 10; padding: 8vh var(--tv-safe-x) var(--tv-safe-y); background: linear-gradient(to top, #0c0f13f2 0, #0c0f13c2 55%, #0c0f1300); animation: tv-sheet-in .22s cubic-bezier(.23, 1, .32, 1) both; }
.tv-page .tv-theme-picker-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 2.2vh; padding: 0 var(--tv-focus-space); }
.tv-page .tv-theme-picker h2 { margin: 0; font-size: clamp(22.4px, 1.8vw, 36px); }
.tv-page .tv-theme-picker-head p { margin: 0; color: #a9b2bf; font-size: clamp(14.4px, 1.04vw, 20.8px); }
.tv-page .tv-theme-picker-head span { color: var(--ink); font-weight: 600; margin-left: 12px; }
/* Onze fundos: duas fileiras de seis, cada miniatura larga o bastante para o nome inteiro ("Caleidoscópio"). */
.tv-page .tv-theme-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2.4vh 1.2vw; padding: var(--tv-focus-space); }
.tv-page .tv-theme-option { min-width: 0; display: flex; flex-direction: column; gap: 1.2vh; padding: 0; border: 0; border-radius: 12px; background: none; color: #c3cad4; text-align: left; transition: transform .16s ease-out, color .16s ease-out; }
.tv-page .tv-theme-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; border: 1px solid #ffffff1f; background: radial-gradient(ellipse at 50% 30%, #23262d, #121418 70%); }
.tv-page .tv-theme-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tv-page .tv-theme-name { display: flex; align-items: center; gap: 8px; font-size: clamp(15px, 1.2vw, 24px); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-page .tv-theme-option[aria-pressed="true"] .tv-theme-name::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--amber); flex-shrink: 0; }
.tv-page .tv-theme-option:focus { outline: none; box-shadow: none; color: var(--ink); transform: scale(1.04); }
.tv-page .tv-theme-option:focus .tv-theme-thumb { outline: 3px solid var(--amber); outline-offset: 3px; }
@keyframes tv-sheet-in { from { opacity: 0; transform: translateY(24px); } }
/* Camadas entram ao aparecer (a animação corre quando o hidden sai): curta, só opacidade e transform, sem segurar o controle. */
@keyframes tv-fade-in { from { opacity: 0; } }
@keyframes tv-panel-in { from { opacity: 0; transform: scale(.97); } }
@keyframes tv-prompt-in { from { opacity: 0; transform: translate(-50%, -50%) scale(.97); } }
@keyframes tv-notice-in { from { opacity: 0; transform: translate(-50%, 10px); } }
@media (prefers-reduced-motion: reduce) {
  .tv-page .tv-dialog > div, .tv-page .tv-audio-prompt, .tv-page .tv-notice, .tv-page .tv-theme-picker { animation-name: tv-fade-in; }
  .tv-page .tv-theme-option { transition: none; }
  .tv-page .tv-theme-option:focus { transform: none; }
  .tv-page .connection:is(.connecting, .disconnected) .connection-dot { animation: none; }
}
@media (max-width: 1050px) { .tv-page .tv-dashboard { grid-template-columns: minmax(0, 1fr) minmax(200px, .5fr); } .tv-page .tv-volume-label { display: none; } .tv-page .tv-header-actions { gap: 8px; } .tv-page .tv-header .connection { max-width: 168px; } .tv-page .tv-sync-controls > span { display: none; } }
@media (max-height: 600px) { .tv-page .tv-header { margin-bottom: 1.2vh; } .tv-page .tv-key-hint { display: none; } .tv-page .tv-transport { margin-top: 0.96vh; } .tv-page .tv-library-song { min-height: 48px; } .tv-page .tv-queue-section { margin-top: 1.4vh; } .tv-page .tv-search { margin: 1.2vh 0; } .tv-page .lyric-current { font-size: 5.84vh; } .tv-page .lyric-previous, .tv-page .lyric-next { font-size: 3.2vh; } }

/* Phone: one transport, two panels. Search and queue have the same row anatomy. */
.remote-page { min-height: 100vh; min-height: 100dvh; background: radial-gradient(100% 40% at 50% -5%, #282d36 0, var(--bg) 80%); }
.remote-shell { max-width: 760px; margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) 20px calc(36px + env(safe-area-inset-bottom)); }
.remote-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 14px; }
.remote-header .brand { font-size: 21px; }
.account-link { font-size: 12px; text-decoration: none; color: var(--dim); padding: 10px 0 10px 10px; }
.remote-shell > .connection { margin-bottom: 20px; }
.join-panel { margin: 35px auto; max-width: 500px; }
.join-panel h1 { font-size: 34px; letter-spacing: -.035em; margin-bottom: 15px; }
.join-panel > p { color: var(--dim); line-height: 1.6; margin-bottom: 32px; }
.join-panel label { display: block; font-size: 14px; margin-bottom: 10px; }
.join-input-row { display: flex; gap: 10px; }
.join-input-row input { width: 0; flex: 1; text-transform: uppercase; font-family: var(--mono); letter-spacing: .16em; font-size: 20px; }
.join-input-row .button { flex-shrink: 0; }
.join-actions { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; margin-top: 20px; }
.now-playing { padding: 20px; border: 1px solid var(--edge); border-radius: 16px; background: #202329cc; }
.now-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -8px -5px 10px 0; }
.now-heading h2 { color: var(--dim); font-size: 13px; font-weight: 550; }
.now-song { display: flex; align-items: center; gap: 14px; }
.now-song > div { min-width: 0; }
.now-song h1 { font-size: 23px; font-weight: 650; letter-spacing: -.025em; line-height: 1.3; overflow-wrap: anywhere; }
.now-song p { color: var(--dim); margin-top: 6px; font-size: 14px; line-height: 1.4; }
.now-artwork { width: 64px; height: 64px; object-fit: cover; border-radius: 9px; flex-shrink: 0; background: var(--panel-2); }
.playback-status { margin-top: 15px; min-height: 1.4em; color: var(--amber); font-size: 13px; }
.playback-status.error { color: var(--red); }
.remote-seek { margin-top: 8px; }
.remote-seek input { width: 100%; }
.time-labels { display: flex; justify-content: space-between; color: var(--dim); font-size: 11px; font-family: var(--mono); }
.transport-row { display: flex; gap: 10px; margin-top: 20px; }
.transport-row .button { flex: 1; min-height: 54px; }
.audio-options { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.volume-control { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: var(--dim); }
.volume-control input { width: 0; flex: 1; }
.volume-control output { font-family: var(--mono); font-size: 11px; min-width: 31px; text-align: right; }
.vocal-button { font-size: 13px; padding: 10px 13px; min-height: 44px; white-space: nowrap; }
.vocal-button[aria-pressed="true"] { border-color: var(--amber); color: var(--amber); background: #3c3020; }
.remote-tabs { display: flex; gap: 28px; margin: 30px 0 22px; border-bottom: 1px solid var(--edge); }
.tab-button { border: 0; border-bottom: 2px solid transparent; background: none; color: var(--dim); min-height: 48px; padding: 0 0 13px; margin-bottom: -1px; font-weight: 650; font-size: 16px; }
.tab-button.active { color: var(--ink); border-bottom-color: var(--amber); }
.queue-count { display: inline-flex; min-width: 23px; justify-content: center; padding: 2px 5px; margin-left: 5px; background: var(--panel-2); border-radius: 5px; color: var(--dim); font-size: 12px; }
.search-form { display: flex; gap: 9px; }
.search-form input { flex: 1; width: 0; font-size: 15px; }
.search-button { width: 52px; padding: 10px; flex-shrink: 0; }
.source-tabs { display: inline-flex; gap: 4px; padding: 4px; background: #202329; border: 1px solid #323740; border-radius: 9px; margin: 18px 0 15px; }
.source-button { min-height: 36px; padding: 6px 16px; border-radius: 6px; border: 0; color: var(--dim); background: none; font-size: 13px; font-weight: 600; }
.source-button.active { color: var(--ink); background: #353a44; }
.results-description { font-size: 13px; color: var(--dim); margin-bottom: 14px; line-height: 1.45; }
.results-status { font-size: 14px; color: var(--dim); padding: 20px 0; line-height: 1.5; }
.song-results, .song-queue { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.song-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid #ffffff0b; }
.song-thumb { width: 56px; height: 44px; border-radius: 7px; flex-shrink: 0; background: var(--panel-2); object-fit: cover; }
.song-thumb-placeholder { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 20px; }
.song-meta { flex: 1; min-width: 0; }
.song-meta h3 { margin: 0; font-size: 15px; line-height: 1.4; font-weight: 550; overflow-wrap: anywhere; }
.song-meta p { font-size: 12px; color: var(--dim); margin-top: 4px; line-height: 1.4; }
.song-action { width: 44px; min-height: 44px; padding: 8px; flex-shrink: 0; font-size: 21px; color: var(--amber); background: #252a32; border: 1px solid var(--edge); border-radius: 9px; display: inline-flex; justify-content: center; align-items: center; }
.song-action:hover:not(:disabled) { border-color: var(--amber); }
.song-action.remove { color: var(--dim); background: none; border-color: transparent; }
.queue-number { flex-shrink: 0; width: 23px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.section-heading h2, .preparation-panel h2 { font-size: 18px; font-weight: 600; letter-spacing: -.015em; }
.preparation-panel { border-top: 1px solid var(--edge); margin-top: 26px; padding-top: 24px; }
.preparation-job { margin-top: 17px; padding-bottom: 14px; border-bottom: 1px solid #ffffff0b; }
.preparation-job-title { font-size: 14px; line-height: 1.4; }
.preparation-job-status { margin: 6px 0 8px; color: var(--dim); font-size: 12px; line-height: 1.5; }
.preparation-job-status.error { color: var(--red); }
.preparation-job progress { width: 100%; accent-color: var(--amber); height: 6px; }
.preparation-job .button { margin-top: 8px; font-size: 13px; min-height: 40px; padding: 8px 13px; }
.remote-notice { position: fixed; bottom: calc(16px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: min(calc(100% - 32px), 650px); padding: 15px 18px; border-radius: 12px; background: #333c31f5; border: 1px solid #58734c; box-shadow: 0 8px 40px #0007; color: var(--ink); font-size: 14px; line-height: 1.4; z-index: 20; }
.remote-notice.error { background: #3b2528f5; border-color: #825155; }
@media (min-width: 650px) { .remote-shell { padding: 30px 32px 55px; } .now-playing { padding: 25px; } .now-song h1 { font-size: 27px; } }
@media (max-width: 380px) { .remote-shell { padding-left: 14px; padding-right: 14px; } .now-playing { padding: 16px; } .now-artwork { width: 52px; height: 52px; } .now-song h1 { font-size: 21px; } .audio-options { gap: 10px; } .volume-control { gap: 7px; } .brand { gap: 8px; } .remote-header .brand { font-size: 19px; } }
@media (max-width: 850px) and (max-height: 650px) { .tv-pairing { padding: 3vh 0; gap: 4vw; grid-template-columns: 1fr minmax(250px, .7fr); } .pairing-copy h1 { font-size: 40px; } .pairing-copy > p { font-size: 19px; } .pairing-steps { gap: 12px; margin-top: 24px; font-size: 14px; } .pairing-card { padding: 16px; } .pairing-qr { width: 25vh; } .tv-controls .button { min-height: 40px; padding: 8px 15px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
