*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0d0708;
  --bg-elevated: #17090d;
  --surface: rgba(26, 13, 16, 0.88);
  --surface-hover: rgba(41, 18, 25, 0.92);
  --border: rgba(255, 255, 255, 0.09);
  --accent: #ff2e88;
  --accent-strong: #ff5ca3;
  --accent-dim: rgba(255, 46, 136, 0.18);
  --text: #f5f2f3;
  --text-muted: #a89ba0;
  --danger: #f28b82;
  --radius: 0;
  --cover-frame: 7px;
  --max: 1280px;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 46, 136, 0.55) rgba(22, 8, 12, 0.35);
  color-scheme: dark;
  background-color: #0d0708;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 46, 136, 0.55) rgba(22, 8, 12, 0.35);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: rgba(22, 8, 12, 0.45);
  border-left: 1px solid rgba(255, 46, 136, 0.12);
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 92, 163, 0.75), rgba(255, 46, 136, 0.55));
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
  min-height: 40px;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(255, 122, 179, 0.9), rgba(255, 46, 136, 0.75));
  background-clip: padding-box;
  border: 2px solid transparent;
}

*::-webkit-scrollbar-thumb:active {
  background: var(--accent);
  background-clip: padding-box;
  border: 2px solid transparent;
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

*::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

body {
  font-family: Manrope, 'Segoe UI', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  background-color: #0d0708;
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.5;
  color-scheme: dark;
}

/* ===== Fundo da home: pôr do sol fosco ===== */
.home-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

body.is-home .home-bg {
  opacity: 1;
  visibility: visible;
}

body.is-home .bg-mosaic {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.home-bg-slide {
  position: absolute;
  inset: 0;
  background-image: url('bg/home-sunset.png?v=5');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 1;
}

.home-bg-frost {
  display: none;
}

/* ===== Fundo: mosaico de capas girando (tema Vinyl) ===== */
.bg-mosaic {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg);
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.bg-mosaic-track {
  position: absolute;
  inset: -6px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
  grid-auto-rows: 85px;
  grid-auto-flow: dense;
  gap: 5px;
}

.bg-mosaic-tile {
  position: relative;
  overflow: hidden;
  perspective: 700px;
  background: linear-gradient(145deg, #241016, #120a0d);
}

/* Só quadrados em tamanhos variados */
.bg-mosaic-tile.tile-md {
  grid-column: span 2;
  grid-row: span 2;
}

.bg-mosaic-tile.tile-xl {
  grid-column: span 3;
  grid-row: span 3;
}

.bg-mosaic-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(1) brightness(0.78) contrast(1.08);
  transition: transform 0.45s ease-in-out;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform;
}

/* Giro no eixo Y: fecha até 90°, troca a capa e reabre */
.bg-mosaic-tile img.is-flipping {
  transform: rotateY(90deg);
}

/* Filtro colorido animado (amarelo / anil / magenta) sobre o P&B */
.bg-color-wash {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  mix-blend-mode: color;
}

.bg-wash-layer {
  position: absolute;
  inset: -40%;
  opacity: 0;
  will-change: transform, opacity;
}

/* Magenta */
.bg-wash-a {
  background:
    radial-gradient(ellipse 65% 80% at 18% 38%, rgba(235, 35, 175, 1), transparent 60%),
    radial-gradient(ellipse 48% 58% at 55% 70%, rgba(210, 45, 180, 0.75), transparent 58%),
    linear-gradient(125deg, rgba(220, 25, 150, 0.85), transparent 70%);
  animation:
    bgWashMoveA 28s ease-in-out infinite,
    bgWashPairA 36s ease-in-out infinite;
}

/* Anil */
.bg-wash-b {
  background:
    radial-gradient(ellipse 58% 70% at 82% 45%, rgba(90, 70, 220, 0.95), transparent 58%),
    radial-gradient(ellipse 45% 55% at 40% 75%, rgba(100, 65, 205, 0.7), transparent 55%),
    linear-gradient(210deg, rgba(75, 55, 200, 0.75), transparent 70%);
  animation:
    bgWashMoveB 32s ease-in-out infinite,
    bgWashPairB 36s ease-in-out infinite;
}

/* Amarelo */
.bg-wash-c {
  background:
    radial-gradient(ellipse 68% 78% at 78% 62%, rgba(255, 190, 35, 1), transparent 60%),
    radial-gradient(ellipse 52% 58% at 30% 28%, rgba(255, 150, 45, 0.8), transparent 58%),
    linear-gradient(45deg, rgba(250, 180, 35, 0.85), transparent 70%);
  animation:
    bgWashMoveC 30s ease-in-out infinite,
    bgWashPairC 36s ease-in-out infinite;
}

@keyframes bgWashMoveA {
  0%   { transform: translate3d(-10%, -8%, 0) rotate(-5deg) scale(1.1); }
  50%  { transform: translate3d(12%, 9%, 0) rotate(6deg) scale(1.2); }
  100% { transform: translate3d(-8%, 11%, 0) rotate(-4deg) scale(1.12); }
}

@keyframes bgWashMoveB {
  0%   { transform: translate3d(11%, 5%, 0) rotate(4deg) scale(1.12); }
  50%  { transform: translate3d(-12%, -8%, 0) rotate(-6deg) scale(1.22); }
  100% { transform: translate3d(9%, -10%, 0) rotate(5deg) scale(1.14); }
}

@keyframes bgWashMoveC {
  0%   { transform: translate3d(5%, 11%, 0) rotate(-3deg) scale(1.14); }
  50%  { transform: translate3d(-11%, -6%, 0) rotate(7deg) scale(1.24); }
  100% { transform: translate3d(10%, -5%, 0) rotate(-5deg) scale(1.12); }
}

/*
  Pares alternados (ciclo 36s, crossfade longo):
  1) magenta + anil
  2) amarelo + anil
  3) magenta + amarelo
*/
@keyframes bgWashPairA {
  /* magenta: pares 1 e 3 */
  0%, 20%    { opacity: 0.88; }
  30%, 52%   { opacity: 0.06; }
  62%, 86%   { opacity: 0.88; }
  96%, 100%  { opacity: 0.88; }
}

@keyframes bgWashPairB {
  /* anil: pares 1 e 2 */
  0%, 52%    { opacity: 0.82; }
  62%, 86%   { opacity: 0.06; }
  96%, 100%  { opacity: 0.82; }
}

@keyframes bgWashPairC {
  /* amarelo: pares 2 e 3 */
  0%, 20%    { opacity: 0.06; }
  30%, 86%   { opacity: 0.88; }
  96%, 100%  { opacity: 0.06; }
}

.bg-mosaic::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(circle at 50% 45%, rgba(13, 7, 8, 0.06), rgba(13, 7, 8, 0.5) 85%),
    linear-gradient(180deg, rgba(13, 7, 8, 0.4), rgba(13, 7, 8, 0.15) 40%, rgba(13, 7, 8, 0.58));
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .bg-mosaic-tile img {
    transition: none;
  }

  .bg-wash-layer {
    animation: none !important;
  }

  .bg-wash-a { opacity: 0.7; }
  .bg-wash-b { opacity: 0.55; }
  .bg-wash-c { opacity: 0.7; }
}

body.is-mobile-app {
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

body.is-mobile-app .window-controls {
  display: none !important;
}

body.is-mobile-app .site-header {
  padding-top: max(0.35rem, env(safe-area-inset-top, 0px));
}

body.is-mobile-app .file-item {
  border-bottom: none;
  padding: 0.45rem 0;
}

.hidden {
  display: none !important;
}

#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.top-chrome {
  position: sticky;
  top: 0;
  z-index: 40;
  background: transparent;
  background-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.site-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 0.85rem 1.5rem;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.is-desktop .site-header {
  justify-content: space-between;
  padding: 0.35rem 0 0.35rem 1rem;
  background: transparent !important;
  background-color: transparent !important;
  -webkit-app-region: drag;
  app-region: drag;
}

body.is-desktop .brand,
body.is-desktop .window-controls,
body.is-desktop .window-btn {
  -webkit-app-region: no-drag;
  app-region: no-drag;
}

/* Fixos no canto da viewport — acompanham melhor o resize */
body.is-desktop .window-controls {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 10000;
  display: flex;
  margin: 0;
  height: 40px;
  background: #0d0708;
}

.window-controls {
  display: none;
  align-items: stretch;
  height: 2.65rem;
  margin-left: auto;
}

body.is-desktop .window-controls {
  display: flex;
}

.window-controls[hidden] {
  display: none !important;
}

.window-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.85rem;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(245, 242, 243, 0.82);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.window-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.window-btn-close:hover {
  background: #e81123;
  color: #fff;
}

.win-icon-restore {
  display: none;
}

body.is-desktop.is-win-maximized .win-icon-max {
  display: none;
}

body.is-desktop.is-win-maximized .win-icon-restore {
  display: block;
}

.playback-dock {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(16rem, 1.4fr);
  align-items: center;
  gap: 0.85rem 1.25rem;
  padding: 0.65rem 1.5rem 0.75rem;
  background: rgba(22, 8, 12, 0.62);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  border-bottom: 1px solid rgba(255, 46, 136, 0.16);
}

.playback-dock.hidden {
  display: none;
}

.playback-dock-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  border: 0;
  padding: 0.25rem;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  border-radius: 0;
}

.playback-dock-main:hover {
  background: rgba(255, 255, 255, 0.04);
}

.playback-dock-art {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 0;
  overflow: hidden;
  background: #fff;
  border: var(--cover-frame) solid #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  box-sizing: content-box;
}

.playback-dock-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.playback-dock-cover.hidden {
  display: none;
}

.playback-dock-disc {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 1.1rem;
  opacity: 0.85;
}

.playback-dock-cover:not(.hidden) + .playback-dock-disc {
  display: none;
}

.playback-dock-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.playback-dock-title {
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playback-dock-status {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.62);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playback-dock-slot {
  min-width: 0;
}

.playback-dock .music-controls {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) auto;
  align-items: center;
  gap: 0.75rem 1rem;
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.playback-dock .music-exec-transport {
  align-items: flex-end;
}

.playback-dock .music-ctrl-row {
  justify-content: flex-end;
  gap: 0.2rem;
}

.playback-dock .music-volume {
  margin-left: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  line-height: 0;
}

.brand-logo {
  display: block;
  height: 2.65rem;
  width: auto;
  max-width: min(3.2rem, 16vw);
  object-fit: contain;
}

.site-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.nav-clear-downloads {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.nav-clear-downloads:hover {
  color: var(--danger);
  border-color: rgba(242, 139, 130, 0.45);
  background: rgba(242, 139, 130, 0.12);
}

.nav-clear-downloads:disabled {
  opacity: 0.45;
  cursor: wait;
}

.nav-link {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.site-search {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: min(280px, 34vw);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 0.2rem 0.35rem 0.2rem 0.9rem;
}

.site-search:focus-within {
  border-color: rgba(255, 46, 136, 0.55);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  outline: none;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-submit {
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  color: rgba(255, 255, 255, 0.7);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.search-submit:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

.main-stage {
  flex: 1;
  width: 100%;
}

.hero {
  position: relative;
  width: 100%;
  height: clamp(22rem, 48vw, 50rem);
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 0%, rgba(255, 46, 136, 0.14), transparent 42%),
    rgba(22, 8, 12, 0.38);
  backdrop-filter: blur(22px) saturate(1.25);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
  background: transparent;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  z-index: 0;
}

.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 20%, rgba(13, 7, 8, 0.45) 98%),
    linear-gradient(transparent 35%, rgba(13, 7, 8, 0.55) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: min(640px, 92vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 1.5rem clamp(3.2rem, 7vh, 4.5rem);
  box-sizing: border-box;
}

.hero-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  align-items: center;
  color: #d7dbe3;
  font-size: 0.92rem;
  margin-bottom: 0.9rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 6px;
  padding: 0.15rem 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge-quality {
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.badge-imdb::before {
  content: '★';
  color: #f5c518;
}

.badge-age {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.hero-desc {
  color: #d5dae3;
  max-width: 52ch;
  margin-bottom: 1.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.btn-outline {
  appearance: none;
  border: 1.5px solid var(--accent);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font: inherit;
  font-weight: 600;
  padding: 0.7rem 1.15rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn-outline:hover {
  background: var(--accent-dim);
  border-color: var(--accent-strong);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 0.4rem;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--accent);
  width: 18px;
}

.history-section {
  max-width: var(--home-panel-max-w, min(52rem, calc(100vw - 1.5rem)));
  width: 100%;
  margin: 0.65rem auto var(--home-panel-bottom-gap, 1.25rem);
  padding: 0;
  box-sizing: border-box;
}

.home-boards {
  --home-boards-max-w: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  width: 100%;
  max-width: none;
  height: var(--home-panel-max-h, calc(100dvh - 5.5rem - 1.25rem));
  max-height: var(--home-panel-max-h, calc(100dvh - 5.5rem - 1.25rem));
  margin: 0.65rem 0 var(--home-panel-bottom-gap, 1.25rem);
  padding: 0.35rem 1rem;
  box-sizing: border-box;
  min-height: 0;
}

.home-boards.hidden {
  display: none !important;
}

.home-board {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 0.75rem 0.8rem 0.85rem;
  background: rgba(22, 8, 12, 0.4);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  box-sizing: border-box;
  overflow: hidden;
}

.home-board-head {
  flex-shrink: 0;
}

.home-board-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.home-board-head p {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
}

.home-board-hint {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}

.home-search-form {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.home-search-modes {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.home-search-mode {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  padding: 0.35rem 0.75rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
}

.home-search-mode:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

.home-search-mode.is-active {
  background: rgba(0, 0, 0, 0.22);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.home-search-input {
  flex: 1;
  min-width: 0;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  padding: 0.55rem 0.7rem;
  font: inherit;
  font-size: 0.85rem;
  border-radius: 0;
}

.home-search-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.home-search-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.22);
  color: rgba(255, 255, 255, 0.7);
  padding: 0.55rem 0.85rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}

.home-search-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

.home-board-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.local-lib-back {
  align-self: flex-start;
  margin: 0 0 0.55rem;
  flex: 0 0 auto;
}

.local-lib-back.hidden {
  display: none !important;
}

.home-card-loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background: rgba(12, 6, 8, 0.35);
  pointer-events: none;
}

.home-card-loading.hidden {
  display: none !important;
}

.home-card-loading .spinner-ring {
  position: relative;
  width: clamp(2.2rem, 6vw, 2.75rem);
  height: clamp(2.2rem, 6vw, 2.75rem);
}

.home-card-results.results {
  --results-bottom-gap: 0;
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: none;
  height: auto;
  max-height: none;
  margin: 0;
  padding: 0;
  gap: 0.35rem;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 0;
  box-shadow: none;
  overflow: hidden;
}

.home-card-results .results-title {
  font-size: 0.82rem;
  text-align: left;
  margin: 0 0 0.25rem;
  flex-shrink: 0;
}

.home-card-results .results-grid {
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.55rem 0.45rem;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
  padding-right: 0.15rem;
}

.home-card-results .results-grid:has(.is-video-thumb) {
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.65rem 0.55rem;
}

.home-card-results .result-poster-card .poster-title {
  font-size: 0.7rem;
  color: #fff;
}

.home-card-results .poster-meta {
  font-size: 0.6rem;
}

.home-card-results .meta-source,
.home-card-results .source-youtube,
.home-card-results .source-starck,
.home-card-results .source-hdr,
.home-card-results .source-apache,
.home-card-results .source-darkmahou {
  color: rgba(255, 255, 255, 0.85);
}

.home-card-results .meta-year {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.home-card-results .meta-audio {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}

.home-card-results .results-title {
  color: #fff;
}

.home-board .history-grid {
  overflow: auto;
  padding-right: 0.2rem;
  flex: 1 1 auto;
  min-height: 0;
  align-content: start;
  align-items: stretch;
  grid-auto-rows: max-content;
  grid-template-columns: repeat(auto-fill, minmax(min(7rem, 100%), 1fr));
  gap: 0.75rem;
}

.home-board .history-empty {
  margin: 1rem 0.15rem;
  font-size: 0.82rem;
}

.local-album-thumb {
  position: relative;
}

.history-card {
  padding: 0.75rem 0.85rem 0.9rem;
  background: rgba(22, 8, 12, 0.4);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  width: 100%;
  max-width: 100%;
  height: var(--home-panel-max-h, calc(100dvh - 5.5rem - 1.25rem));
  max-height: var(--home-panel-max-h, calc(100dvh - 5.5rem - 1.25rem));
  min-height: 0;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(7rem, 100%), 1fr));
  grid-auto-rows: max-content;
  gap: 0.65rem;
  min-height: 0;
  flex: 1 1 auto;
  align-content: start;
  align-items: stretch;
  overflow: auto;
  padding-right: 0.25rem;
}

/* Capas em grid: display:grid no botão evita o flex anônimo do Chromium
   que esmagava as imagens; o span garante o quadrado. */
.history-thumb {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  grid-template: 1fr / 1fr;
  width: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1 / 1;
  margin: 0;
  padding: var(--cover-frame);
  border: 0;
  border-radius: 0;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-sizing: border-box;
  line-height: 0;
  font-size: 0;
  align-self: start;
}

.history-thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(255, 46, 136, 0.22);
}

.history-thumb-art {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #1a0c10;
  position: relative;
  align-self: stretch;
  justify-self: stretch;
}

.history-thumb-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(255, 210, 230, 0.88);
  background: linear-gradient(145deg, #2a121c 0%, #14080e 100%);
}

.history-thumb img,
.history-thumb-art img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

.history-empty {
  margin: 1.5rem 0.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  text-align: center;
}

.history-empty.hidden {
  display: none !important;
}

.home-tagline {
  max-width: var(--max);
  margin: 0.35rem auto 0.85rem;
  padding: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  text-align: center;
}

.home-tagline strong {
  color: var(--accent);
}

.catalog-section {
  max-width: var(--max);
  margin: 1rem auto 0;
  padding: 1.25rem 1.5rem 2rem;
  background: rgba(22, 8, 12, 0.4);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.home-view {
  padding: 0 0 0.75rem;
  min-height: 0;
}

body.is-home {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  --home-panel-max-w: min(52rem, calc(100vw - 1.5rem));
  --home-panel-bottom-gap: 4.25rem;
  --home-panel-max-h: calc(100dvh - 5.5rem - var(--home-panel-bottom-gap));
}

body.is-home.has-exec-bar {
  --home-panel-bottom-gap: 9.75rem;
}

body.is-home #app {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

body.is-home .main-stage {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 0;
}

body.is-home.has-exec-bar .main-stage {
  padding-bottom: 0;
}

body.is-home .home-view {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-left: 0;
  padding-right: 0;
}

body.is-home .home-boards {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

body.is-home .home-card-results:not(.hidden) {
  display: flex;
  flex-direction: column;
}

.home-boards-card,
.home-boards-panels {
  display: contents;
}

.home-board-tabs {
  display: none;
  gap: 0.35rem;
  flex-shrink: 0;
  min-width: 0;
}

.home-board-tab {
  appearance: none;
  flex: 1 1 0;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.45rem 0.55rem;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-board-tab.is-active {
  background: rgba(0, 0, 0, 0.22);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.home-board-tab:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

.home-mobile-hero {
  display: none;
}

.home-tab-icon,
.home-tab-label-short,
.home-search-btn-short,
.home-search-ico,
.home-mode-check,
.local-pick-ico,
.local-pick-mobile {
  display: none;
}

.home-tab-label-full,
.home-search-btn-full,
.local-pick-desktop {
  display: inline;
}

.home-search-field {
  display: contents;
}

@media (max-width: 980px) {
  .home-boards {
    display: flex;
    flex-direction: column;
    height: var(--home-panel-max-h, calc(100dvh - 5.5rem - 1.25rem));
    max-height: calc(100dvh - 5.5rem - var(--home-panel-bottom-gap, 1.25rem));
    overflow: hidden;
    gap: 0;
  }

  .home-boards-card {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    padding: 0.75rem 0.8rem 0.85rem;
    background: rgba(22, 8, 12, 0.4);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
      0 18px 50px rgba(0, 0, 0, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
    box-sizing: border-box;
    overflow: hidden;
  }

  .home-board-tabs {
    display: flex;
  }

  .home-boards-panels {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  .home-board {
    display: none;
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .home-boards[data-home-tab='search'] #boardSearch,
  .home-boards[data-home-tab='recent'] #boardRecent,
  .home-boards[data-home-tab='local'] #boardLocal {
    display: flex;
  }

  /* Título do card já está na aba */
  .home-board-head {
    display: none;
  }
}

.catalog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.catalog-heading h2 {
  font-size: 1.35rem;
  font-weight: 700;
}

.catalog-filters {
  display: flex;
  gap: 0.4rem;
}

.filter-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
}

.filter-btn.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.catalog-grid,
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.15rem 0.95rem;
}

.results .results-grid {
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 0.7rem 0.65rem;
  min-height: 0;
}

.results-title {
  font-size: 1.45rem;
  font-weight: 700;
  text-align: center;
  margin: 0.25rem 0 0.35rem;
}

.results .results-title {
  font-size: 1.05rem;
  margin: 0;
  flex-shrink: 0;
}

.results .home-tagline {
  font-size: 0.78rem;
  margin: 0;
  flex-shrink: 0;
}

.badge-kind,
.badge-quality-corner {
  position: absolute;
  top: 0.4rem;
  z-index: 2;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.18rem 0.4rem;
  border-radius: 4px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge-kind {
  left: 0.4rem;
  background: var(--accent);
  color: #ffffff;
}

.badge-quality-corner {
  right: 0.4rem;
  background: #c62828;
}

.poster-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #2a141c, #150a0e);
  color: var(--accent-strong);
  font-size: 2.4rem;
  font-weight: 700;
}

.meta-source {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.result-poster-card .poster-title {
  font-size: 0.86rem;
  color: var(--accent-strong);
}

.poster-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
}

.poster-frame {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 0;
  overflow: hidden;
  background: #fff;
  padding: var(--cover-frame);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
}

.result-poster-card.is-video-thumb .poster-frame {
  aspect-ratio: 16 / 9;
  padding: 3px;
  background: #0a0a0a;
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.poster-card:hover .poster-frame img {
  transform: scale(1.04);
}

.poster-imdb {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.18rem 0.4rem;
  border-radius: 6px;
}

.poster-title {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.poster-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.meta-year {
  border: 1px solid var(--accent);
  color: var(--accent-strong);
  border-radius: 5px;
  padding: 0.1rem 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.meta-audio {
  background: var(--accent);
  color: #ffffff;
  border-radius: 5px;
  padding: 0.1rem 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.loading {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 60;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
  border: 0;
  pointer-events: none;
}

.loading.hidden {
  display: none !important;
}

.loading .spinner-ring {
  position: relative;
}

/* Anel de load — degradê da logo (laranja → rosa) */
.spinner-ring {
  width: clamp(2.6rem, 8vw, 3.25rem);
  height: clamp(2.6rem, 8vw, 3.25rem);
  border: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    transparent 200deg,
    rgba(255, 122, 10, 0.12) 240deg,
    #ff7a0a 280deg,
    #ff4326 320deg,
    #ff0f40 345deg,
    #fff 356deg,
    transparent 360deg
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3.4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3.4px));
  animation: spin 0.85s linear infinite;
  box-shadow: 0 0 18px rgba(255, 15, 64, 0.28);
  filter: drop-shadow(0 0 6px rgba(255, 67, 38, 0.45));
}

.spinner-ring::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 122, 10, 0.1);
}

.spinner {
  width: 2.2rem;
  height: 2.2rem;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: #ff0f40;
  border-right-color: #ff4326;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-sm {
  width: 1.4rem;
  height: 1.4rem;
  border-width: 2px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.error {
  max-width: var(--max);
  margin: 1rem auto;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  background: rgba(242, 139, 130, 0.12);
  color: #ffc2bc;
  border: 1px solid rgba(242, 139, 130, 0.3);
}

.results {
  --results-bottom-gap: var(--home-panel-bottom-gap, 1.25rem);
  max-width: var(--home-panel-max-w, min(52rem, calc(100vw - 1.5rem)));
  width: 100%;
  margin: 0.65rem auto var(--results-bottom-gap);
  padding: 0.75rem 0.85rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  height: var(--home-panel-max-h, calc(100dvh - 5.5rem - var(--results-bottom-gap)));
  max-height: var(--home-panel-max-h, calc(100dvh - 5.5rem - var(--results-bottom-gap)));
  overflow: hidden;
  box-sizing: border-box;
  background: rgba(22, 8, 12, 0.4);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.has-exec-bar .results {
  --results-bottom-gap: var(--home-panel-bottom-gap, 7.5rem);
}

.results .results-grid {
  overflow: auto;
  padding-right: 0.25rem;
  flex: 1 1 auto;
  min-height: 0;
}

.results .result-poster-card {
  gap: 0.3rem;
}

.results .result-poster-card .poster-title {
  font-size: 0.75rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.results .poster-meta {
  gap: 0.2rem;
  font-size: 0.65rem;
}

.results .badge-kind,
.results .badge-quality-corner {
  font-size: 0.58rem;
  padding: 0.12rem 0.28rem;
  top: 0.28rem;
}

.results .badge-kind {
  left: 0.28rem;
}

.results .badge-quality-corner {
  right: 0.28rem;
}

.results .poster-frame {
  --cover-frame: 4px;
}

.torrent-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
}

.torrent-title {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.torrent-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.source-starck {
  color: var(--accent-strong);
  font-weight: 700;
}

.source-hdr {
  color: #7ec8ff;
  font-weight: 700;
}

.source-apache {
  color: #f0b429;
  font-weight: 700;
}

.source-darkmahou {
  color: #c084fc;
  font-weight: 700;
}

.source-youtube {
  color: #ff6b6b;
  font-weight: 700;
}

.torrent-actions {
  display: flex;
  gap: 0.45rem;
}

.play-btn,
.magnet-btn,
.player-tool-btn {
  appearance: none;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.back-btn {
  appearance: none;
  font: inherit;
  cursor: pointer;
}

.play-btn {
  background: var(--accent);
  color: #ffffff;
  padding: 0.65rem 1rem;
}

.magnet-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  width: 2.4rem;
  height: 2.4rem;
}

.player-section {
  width: 100%;
  min-height: calc(100vh - 5.5rem);
  padding: 0.75rem 1rem 7.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-sizing: border-box;
}

.player-stage {
  --sidebar-w: clamp(15rem, 30vw, 26rem);
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  min-height: 0;
  align-items: start;
}

.player-stage:not(:has(#fileList:not(.hidden))):not(:has(#albumCatalog:not(.hidden))):not(:has(#lyricsPanel:not(.hidden))) {
  grid-template-columns: 1fr;
}

.player-stage:not(:has(#fileList:not(.hidden))):not(:has(#albumCatalog:not(.hidden))):not(:has(#lyricsPanel:not(.hidden))) .player-side-pair {
  display: none;
}

.player-stage-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
}

.yt-video-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(94vw, 88rem);
  max-width: 94vw;
  margin: 0 auto;
}

.yt-video-wrap.hidden {
  display: none !important;
}

/* Iframe vivo fora da tela (áudio na home) — evita reload ao voltar.
   NÃO usar display:none no iframe/ancestrais — reinicia o YouTube. */
.yt-video-wrap.is-audio-bg {
  position: absolute !important;
  left: 0;
  top: 0;
  width: 2px !important;
  height: 2px !important;
  max-width: 2px !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0.01 !important;
  pointer-events: none !important;
  z-index: -1;
  overflow: hidden !important;
}

.yt-video-wrap.is-audio-bg .yt-video-stage {
  width: 2px !important;
  height: 2px !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.yt-video-wrap.is-audio-bg .yt-video-toolbar,
.yt-video-wrap.is-audio-bg .yt-video-fx {
  display: none !important;
}

/* Player host encolhido na home enquanto o iframe continua vivo */
.player-section.is-yt-bg-host {
  position: fixed !important;
  left: 0 !important;
  bottom: 0 !important;
  width: 2px !important;
  height: 2px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0.01 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  z-index: -1 !important;
}

/*
  Vídeo nativo: NÃO encolher a 2px (Android/Chrome pinta branco ao restaurar).
  Mantém tamanho real fora da tela, só esconde.
*/
body.is-yt-native-audio .player-section.is-yt-bg-host {
  left: -130vw !important;
  top: 0 !important;
  bottom: auto !important;
  width: min(100vw, 56rem) !important;
  height: min(56.25vw, 31.5rem) !important;
  opacity: 0 !important;
  background: #000 !important;
}

body.is-yt-native-audio .yt-video-wrap.is-audio-bg {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  opacity: 0 !important;
}

body.is-yt-native-audio .yt-video-wrap.is-audio-bg .yt-video-stage {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
}

body.is-yt-native-audio .yt-video-wrap.is-audio-bg .yt-html-video {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  background: #000 !important;
}

.player-section.is-yt-bg-host .player-header,
.player-section.is-yt-bg-host .player-side-pair,
.player-section.is-yt-bg-host .audio-warning,
.player-section.is-yt-bg-host .audio-track-list,
.player-section.is-yt-bg-host #bufferStatus {
  display: none !important;
}

.yt-video-stage {
  flex: 0 1 auto;
  position: relative;
  width: 100%;
  height: min(74dvh, calc(100dvh - 7.5rem));
  min-height: min(52vh, 22rem);
  background: #000;
  overflow: hidden;
}

.yt-video-stage.hidden {
  display: none !important;
}

.yt-video-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  flex: 0 0 auto;
}

.yt-video-tap {
  position: absolute;
  inset: 0;
  z-index: 5;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.yt-tap-flash {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.yt-tap-flash.is-show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.yt-tap-icon.hidden {
  display: none !important;
}

.video-fs-toggle {
  appearance: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  pointer-events: auto;
}

.video-fs-toggle .hidden {
  display: none !important;
}

/* Iframe não recebe toque — evita chrome do YouTube (título, Mais vídeos, logo) */
body.is-watching-video #ytVideoFrame {
  pointer-events: none !important;
}

body.is-watching-video .yt-html-video {
  pointer-events: none;
  object-fit: contain;
  background: #000 !important;
}

.yt-video-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.yt-html-video {
  object-fit: contain;
}

/* Modo vídeo: vídeo centralizado; mosaico aparece em volta (fundos transparentes) */
body.is-watching-video {
  --yt-exec-reserve: calc(8.5rem + env(safe-area-inset-bottom, 0px));
  --yt-stage-inset-top: 0.35rem;
  --yt-stage-inset-bottom: 0.35rem;
  --yt-stage-inset-x: 0.35rem;
  --yt-pic-w: 100%;
  --yt-pic-h: auto;
}

body.is-watching-video .bg-mosaic {
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 0;
}

body.is-watching-video .home-bg {
  opacity: 0 !important;
  visibility: hidden !important;
}

body.is-watching-video.has-exec-bar .main-stage {
  padding-bottom: 0;
}

body.is-watching-video.is-player .player-section {
  --album-base-from-bottom: 0;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: var(--yt-exec-reserve) !important;
  width: 100% !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
  overflow: hidden !important;
  display: block !important;
  background: transparent !important;
  z-index: 45;
  gap: 0 !important;
  pointer-events: none;
}

body.is-watching-video .player-header {
  display: none !important;
}

body.is-watching-video .player-stage,
body.is-watching-video .player-stage-main,
body.is-watching-video .yt-video-wrap {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  /* Sem isto, .yt-video-wrap { max-width: 94vw } + margin:0 deixa o player colado à esquerda */
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  overflow: hidden !important;
  background: transparent !important;
  pointer-events: none;
}

body.is-watching-video .player-side-pair {
  display: none !important;
}

body.is-watching-video .yt-video-stage {
  position: absolute !important;
  top: var(--yt-stage-inset-top) !important;
  right: 0 !important;
  bottom: var(--yt-stage-inset-bottom) !important;
  left: 0 !important;
  width: 100% !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 var(--yt-stage-inset-x) !important;
  border: 0;
  background: transparent !important;
  overflow: hidden;
  box-shadow: none;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  pointer-events: auto;
}

/* Tamanho vem do JS; centralização pelo flex do stage (align-items: center) */
body.is-watching-video .yt-video-picture {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  inset: auto !important;
  display: block !important;
  flex: 0 0 auto !important;
  align-self: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  transform: none !important;
  overflow: hidden !important;
  background: #000 !important;
  box-sizing: border-box !important;
}

body.is-watching-video .yt-video-frame:not(.yt-html-video),
body.is-watching-video .yt-html-video {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  border: 0;
  background: #000 !important;
  color-scheme: dark;
  object-fit: contain !important;
  object-position: center center !important;
  filter: none !important;
  animation: none !important;
  transform: none !important;
}

body.is-watching-video #ytVideoFrame {
  background: #000 !important;
  color-scheme: dark;
}

body.is-watching-video .yt-html-video {
  background: #000 !important;
}

body.is-watching-video .yt-video-tap {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: auto;
}

/* Toolbar: irmão do quadro (vertical = abaixo; horizontal = overlay) */
body.is-watching-video .yt-video-toolbar {
  position: relative;
  z-index: 8;
  flex: 0 0 auto;
  align-self: center;
  width: auto;
  max-width: 100%;
  margin: 0.55rem 0 0;
  padding: 0;
  justify-content: center;
  gap: 0.45rem;
  pointer-events: auto;
}

body.is-watching-video .video-fx-toggle,
body.is-watching-video .video-autoplay-toggle,
body.is-watching-video .video-fs-toggle {
  pointer-events: auto;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
}

body.is-watching-video .video-autoplay-toggle {
  width: auto !important;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.5rem !important;
  gap: 0.28rem;
  border-radius: 0;
}

body.is-watching-video .video-autoplay-toggle.is-active,
body.is-watching-video.is-video-autoplay .video-autoplay-toggle,
body.is-watching-video .video-autoplay-toggle[aria-pressed='true'] {
  background: rgba(0, 0, 0, 0.45) !important;
  color: #fff !important;
  box-shadow: none !important;
}

body.is-watching-video .video-autoplay-toggle .video-autoplay-tag {
  font-family: inherit;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
}

body.is-yt-fullscreen .yt-video-stage,
body.is-yt-fullscreen #ytVideoStage:fullscreen,
body.is-yt-fullscreen #ytVideoStage:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  background: #000;
  display: block !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
}

body.is-yt-fullscreen .yt-video-picture {
  transform: none !important;
}

/* Horizontal: vídeo na base; controles/timeline colados */
@media (orientation: landscape) {
  body.is-watching-video {
    --yt-exec-reserve: calc(4.35rem + env(safe-area-inset-bottom, 0px));
    --yt-stage-inset-top: 0.45rem;
    --yt-stage-inset-bottom: 0px;
    --yt-stage-inset-x: 0.2rem;
  }

  body.is-watching-video .yt-video-stage {
    justify-content: flex-end !important;
  }

  body.is-watching-video .music-exec-bar {
    bottom: max(0.1rem, env(safe-area-inset-bottom, 0px)) !important;
    padding-top: 0.1rem;
    padding-bottom: 0.15rem;
  }

  body.is-watching-video .music-exec {
    --exec-center-w: min(36rem, 70vw);
    gap: 0.15rem;
  }

  body.is-watching-video .music-exec-seek {
    margin-top: 0 !important;
  }

  /* Horizontal: controles no canto do vídeo */
  body.is-watching-video .yt-video-toolbar {
    position: absolute !important;
    right: 0.35rem !important;
    bottom: 0.35rem !important;
    left: auto !important;
    margin: 0 !important;
    width: auto !important;
    justify-content: flex-end;
  }

  body.is-watching-video .music-viz {
    height: var(--yt-exec-reserve);
  }
}

/* Vertical: centro; controles logo abaixo do vídeo */
@media (orientation: portrait) {
  body.is-watching-video {
    --yt-exec-reserve: calc(8.5rem + env(safe-area-inset-bottom, 0px));
    --yt-stage-inset-top: 0.35rem;
    --yt-stage-inset-bottom: 0.35rem;
    --yt-stage-inset-x: 0.5rem;
    --yt-toolbar-h: 3.1rem;
  }

  body.is-watching-video .yt-video-stage {
    justify-content: center !important;
    align-items: center !important;
    gap: 0;
  }

  body.is-watching-video .yt-video-toolbar {
    position: relative !important;
    inset: auto !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0.65rem 0 0 !important;
    width: min(100%, var(--yt-picture-w, 100%)) !important;
    justify-content: center;
  }
}

/* Filtro só no quadro (.yt-video-picture), não no mosaico */
body.is-watching-video .yt-video-picture::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

body.is-watching-video.is-video-bw .yt-video-picture::after {
  opacity: 1;
  backdrop-filter: grayscale(1) contrast(1.12) brightness(0.92);
  -webkit-backdrop-filter: grayscale(1) contrast(1.12) brightness(0.92);
}

body.is-watching-video.is-video-fx .yt-video-picture::after {
  opacity: 1;
  animation: ytVideoFxBackdrop 36s ease-in-out infinite;
}

/* Só cores quentes: magenta / amarelo / coral — sem anil/azul */
@keyframes ytVideoFxBackdrop {
  0%,
  22% {
    backdrop-filter: grayscale(1) sepia(1) hue-rotate(328deg) saturate(2.55) brightness(0.88) contrast(1.12);
    -webkit-backdrop-filter: grayscale(1) sepia(1) hue-rotate(328deg) saturate(2.55) brightness(0.88) contrast(1.12);
  }
  34%,
  56% {
    backdrop-filter: grayscale(1) sepia(1) hue-rotate(38deg) saturate(2.6) brightness(0.92) contrast(1.1);
    -webkit-backdrop-filter: grayscale(1) sepia(1) hue-rotate(38deg) saturate(2.6) brightness(0.92) contrast(1.1);
  }
  66%,
  88% {
    backdrop-filter: grayscale(1) sepia(1) hue-rotate(12deg) saturate(2.4) brightness(0.9) contrast(1.12);
    -webkit-backdrop-filter: grayscale(1) sepia(1) hue-rotate(12deg) saturate(2.4) brightness(0.9) contrast(1.12);
  }
  96%,
  100% {
    backdrop-filter: grayscale(1) sepia(1) hue-rotate(328deg) saturate(2.55) brightness(0.88) contrast(1.12);
    -webkit-backdrop-filter: grayscale(1) sepia(1) hue-rotate(328deg) saturate(2.55) brightness(0.88) contrast(1.12);
  }
}

/* Wash do vídeo: magenta + amarelo; esconde o anil (frio) */
body.is-watching-video.is-video-fx .yt-video-fx {
  opacity: 0.75;
  z-index: 5;
}

body.is-watching-video.is-video-fx .yt-video-fx .bg-wash-b {
  display: none !important;
}

body.is-watching-video.is-video-fx .yt-video-fx .bg-wash-a {
  opacity: 0.85;
}

body.is-watching-video.is-video-fx .yt-video-fx .bg-wash-c {
  opacity: 0.8;
}

body.is-watching-video.is-video-bw .yt-video-fx {
  opacity: 0;
}

/* Sem capa / metadados na barra — só timeline + controles */
body.is-watching-video .music-exec-now {
  display: none !important;
}

body.is-watching-video .music-seek-artist {
  display: none !important;
}

body.is-watching-video .music-exec {
  --exec-center-w: clamp(22rem, 48vw, 40rem);
  grid-template-columns: 1fr var(--exec-center-w) 1fr;
  grid-template-areas:
    '. seek .'
    '. transport .';
}

body.is-watching-video .music-exec-seek {
  margin-top: 0.35rem;
}

/* Visualizer só na faixa da barra, não por cima do vídeo */
body.is-watching-video .music-viz {
  display: block !important;
  height: var(--yt-exec-reserve);
  z-index: 45;
}

body.is-watching-video .music-viz.is-active,
body.is-watching-video.has-exec-bar .music-viz.is-active {
  opacity: 1;
}

body.is-watching-video .audio-warning,
body.is-watching-video .audio-track-list,
body.is-watching-video #bufferStatus {
  display: none !important;
}

body.is-watching-video .yt-video-frame {
  /* filter no iframe cross-origin não pinta o vídeo — efeito no ::after */
  filter: none !important;
  animation: none !important;
}

/* Filtro P&B + cores: ver .yt-video-picture::after (só no quadro) */

.yt-video-picture {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

.yt-video-fx {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
  mix-blend-mode: color;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.video-fx-toggle,
.video-autoplay-toggle {
  appearance: none;
  margin: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.video-autoplay-toggle {
  width: auto;
  min-width: 2.35rem;
  padding: 0 0.4rem;
  gap: 0.25rem;
}

.video-fx-toggle svg,
.video-autoplay-toggle svg {
  display: block;
}

.video-fx-toggle:hover,
.video-autoplay-toggle:hover {
  color: #fff;
}

.video-fx-toggle.is-active {
  color: var(--accent);
}

.video-autoplay-toggle.is-active {
  background: transparent;
  color: inherit;
}

.video-fx-toggle.is-bw {
  color: #fff;
  opacity: 0.92;
}

.video-fx-toggle.hidden,
.video-autoplay-toggle.hidden {
  display: none !important;
}

body.is-watching-video.is-idle .video-fx-toggle,
body.is-watching-video.is-idle .video-autoplay-toggle {
  opacity: 1;
  pointer-events: auto;
}

.player-side-pair {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  position: sticky;
  top: 4.5rem;
  max-height: calc((100vh - 9rem) * 0.68);
  height: calc((100vh - 9rem) * 0.68);
  width: var(--sidebar-w);
  max-width: var(--sidebar-w);
  flex-shrink: 0;
}

.player-side-tools {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex: 0 0 auto;
  width: 100%;
}

.player-sidebar {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  max-width: none;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Letras abertas: ocupam o lugar da lista */
.player-sidebar:has(#lyricsPanel:not(.hidden)) #fileList,
.player-sidebar:has(#lyricsPanel:not(.hidden)) #albumCatalog {
  display: none !important;
}

.player-stage:not(:has(#fileList:not(.hidden))):not(:has(#albumCatalog:not(.hidden))):not(:has(#lyricsPanel:not(.hidden))) .player-sidebar {
  display: none;
}

body.has-exec-bar .main-stage {
  padding-bottom: 10rem;
}

/* Player: tudo cabe na viewport — sem scroll da página */
body.is-player {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

body.is-player .top-chrome {
  display: none;
}

body.is-player #app {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

body.is-player .main-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0;
}

body.is-player.has-exec-bar .main-stage {
  padding-bottom: 0;
}

body.is-player .player-section {
  flex: 1;
  min-height: 0;
  height: auto;
  /* base da capa ≈ mais alta que o stack de seek/transport */
  --album-base-from-bottom: 12.5rem;
  --side-list-top: 7.75rem;
  padding: 0.75rem 1rem 8.75rem;
  overflow: hidden;
}

body.is-player .player-stage {
  flex: 1;
  min-height: 0;
  align-items: start;
}

body.is-player .player-side-pair {
  position: sticky;
  top: 4.5rem;
  /* base da lista na mesma linha da base da capa */
  height: calc(100dvh - var(--side-list-top) - var(--album-base-from-bottom));
  max-height: calc(100dvh - var(--side-list-top) - var(--album-base-from-bottom));
  margin-right: clamp(1.75rem, 5vw, 4.5rem);
}

.music-exec-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: clamp(1rem, 3vh, 2.35rem);
  transform: none;
  z-index: 50;
  width: 100%;
  max-width: none;
  padding: 0.25rem clamp(0.65rem, 1.8vw, 1.25rem) 0.35rem;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-sizing: border-box;
}

.music-exec-bar.hidden {
  display: none;
}

.music-viz {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4rem;
  z-index: 45;
  pointer-events: none;
  overflow: visible;
  opacity: 0;
  transition: opacity 0.85s ease-out;
  background: linear-gradient(
    to top,
    rgba(210, 20, 45, 0.55) 0%,
    rgba(220, 30, 55, 0.28) 35%,
    rgba(255, 40, 70, 0.08) 65%,
    transparent 100%
  );
  -webkit-mask-image:
    linear-gradient(to top, #000 0%, #000 55%, rgba(0, 0, 0, 0.4) 82%, transparent 100%),
    linear-gradient(
      to right,
      transparent 0%,
      rgba(0, 0, 0, 0.15) 8%,
      rgba(0, 0, 0, 0.55) 18%,
      #000 32%,
      #000 68%,
      rgba(0, 0, 0, 0.55) 82%,
      rgba(0, 0, 0, 0.15) 92%,
      transparent 100%
    );
  mask-image:
    linear-gradient(to top, #000 0%, #000 55%, rgba(0, 0, 0, 0.4) 82%, transparent 100%),
    linear-gradient(
      to right,
      transparent 0%,
      rgba(0, 0, 0, 0.15) 8%,
      rgba(0, 0, 0, 0.55) 18%,
      #000 32%,
      #000 68%,
      rgba(0, 0, 0, 0.55) 82%,
      rgba(0, 0, 0, 0.15) 92%,
      transparent 100%
    );
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

body.has-exec-bar .music-viz.is-active {
  opacity: 1;
}

.music-viz canvas {
  display: block;
  width: 100%;
  height: 100%;
  filter: blur(14px) saturate(1.2);
  mix-blend-mode: screen;
}

.music-exec-bar audio {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.music-exec-now {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  padding: 0;
  font: inherit;
}

.player-header {
  display: none !important;
}

.player-tool-btn {
  background: rgba(22, 8, 12, 0.45);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 0.55rem 0.9rem;
}

.back-btn {
  width: 2.7rem;
  height: 2.7rem;
  padding: 0;
  border-radius: 50%;
  border: 3.5px solid rgba(255, 255, 255, 0.88);
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.back-btn svg {
  display: block;
}

.back-btn:hover {
  background: transparent;
  border-color: #fff;
  color: #fff;
}

.player-info h2 {
  font-size: 1.1rem;
}

.stream-status {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.video-container {
  background: #000;
  border-radius: 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.video-container video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}


.music-player-container,
.music-exec-bar .music-exec {
  position: relative;
}

.music-exec {
  --exec-center-w: clamp(22rem, 42vw, 36rem);
  display: grid;
  grid-template-columns: 1fr var(--exec-center-w) 1fr;
  grid-template-areas:
    'now . .'
    '. seek .'
    '. transport .';
  align-items: end;
  column-gap: 1rem;
  row-gap: 0.15rem;
  width: 100%;
  min-width: 0;
  padding-bottom: 0.2rem;
}

.music-exec-bar .music-exec-now {
  grid-area: now;
  align-self: end;
  justify-self: start;
  margin-left: clamp(4.5rem, 14vw, 11rem);
  transform: translateY(-1rem);
  gap: 1.15rem;
  max-width: min(28rem, calc(100vw - 2rem));
}

.music-exec-seek {
  grid-area: seek;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  width: var(--exec-center-w);
  max-width: var(--exec-center-w);
  justify-self: center;
  margin-top: 1.75rem;
}

.music-exec-transport {
  grid-area: transport;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: none;
  justify-self: center;
  margin-top: -0.15rem;
  margin-bottom: 0;
}

.music-exec-transport .music-ctrl-row {
  display: grid;
  grid-template-columns: max-content auto max-content;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  gap: 0.15rem;
}

.music-ctrl-side {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  min-width: max-content;
  flex-shrink: 0;
}

.music-ctrl-side-left {
  justify-content: flex-end;
  padding-right: 0.2rem;
}

.music-ctrl-side-right {
  justify-content: flex-start;
  padding-left: 0.2rem;
  gap: 0.25rem;
}

.music-exec-transport .music-ctrl-play {
  justify-self: center;
}

.music-exec-transport .music-volume {
  margin-left: 0.85rem;
  flex-shrink: 0;
}

/* Home / fora do player: capa menor à esquerda; timeline + controles no centro */
body:not(.is-player) .music-exec {
  --exec-center-w: clamp(20rem, 40vw, 34rem);
  display: grid;
  grid-template-columns: 1fr var(--exec-center-w) 1fr;
  grid-template-areas:
    'now seek .'
    'now transport .';
  align-items: center;
  column-gap: 1rem;
  row-gap: 0.15rem;
  width: 100%;
  max-width: 100%;
  margin: 0;
  justify-content: stretch;
}

body:not(.is-player) .music-exec-bar .music-exec-now {
  grid-area: now;
  align-self: center;
  justify-self: start;
  margin-left: clamp(0.65rem, 2vw, 1.25rem);
  transform: none;
  gap: 0.7rem;
  max-width: min(16rem, 28vw);
  z-index: 1;
}

body:not(.is-player) .music-cover-wrap {
  --cover-size: clamp(44px, 7vw, 56px);
  --cover-frame: 3px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

body:not(.is-player) .music-cover-wrap .music-disc {
  font-size: 1.1rem;
}

body:not(.is-player) .music-now-artist {
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}

body:not(.is-player) .music-now-album {
  font-size: 0.65rem;
  letter-spacing: 0.03em;
}

body:not(.is-player) .music-now-meta h2 {
  font-size: 0.88rem;
  font-weight: 600;
}

body:not(.is-player) .music-now-meta .stream-status {
  font-size: 0.62rem;
}

body:not(.is-player) .music-exec-seek {
  grid-area: seek;
  margin-top: 0;
  justify-self: stretch;
  width: 100%;
  max-width: none;
}

body:not(.is-player) .music-exec-transport {
  grid-area: transport;
  justify-self: center;
  width: max-content;
}

body:not(.is-player).is-idle .music-exec-bar .music-exec-now {
  transform: none;
}

body:not(.is-player).is-idle .music-cover-wrap {
  --cover-size: clamp(44px, 7vw, 56px);
  transform: none;
}

.music-now-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.65);
}

.music-now-artist {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-now-album {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-now-album:empty {
  display: none;
}

.music-now-meta h2 {
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 0.15rem 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.95);
}

.music-now-meta .stream-status {
  font-size: 0.72rem;
  opacity: 0.75;
}

.music-exec-bar .music-controls-host,
.music-exec-bar .music-controls {
  display: contents;
}

.music-seek-artist {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
  text-align: center;
}

.music-seek-times {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.music-ctrl-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  width: auto;
  position: relative;
}

.music-ctrl-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.music-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-strong);
}

.music-ctrl-play {
  background: rgba(255, 46, 136, 0.22);
  color: #fff;
}

.music-ctrl-play:hover {
  background: rgba(255, 46, 136, 0.38);
  color: #fff;
}

.music-time {
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  min-width: 0;
}

.music-time-remain {
  text-align: right;
}

.music-seek {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 3px;
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(
    to right,
    #fff 0%,
    #fff var(--seek, 0%),
    rgba(255, 255, 255, 0.28) var(--seek, 0%),
    rgba(255, 255, 255, 0.28) 100%
  );
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}

.music-seek::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 999px;
  background: transparent;
}

.music-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px;
  height: 11px;
  margin-top: -4px;
  border-radius: 50%;
  background: #fff;
  border: 0;
  box-shadow: 0 0 0 1px rgba(255, 46, 136, 0.4);
}

.music-seek::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  border: 0;
}

.music-seek::-moz-range-track {
  height: 3px;
  background: transparent;
}

.music-volume {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0;
  flex-shrink: 0;
  min-width: max-content;
}

.music-volume-label {
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  min-width: 0;
}

.music-volume-slider {
  width: clamp(5.75rem, 12vw, 9.5rem);
  min-width: 5.75rem;
  flex-shrink: 0;
  height: 3px;
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(
    to right,
    var(--accent) 0%,
    var(--accent) var(--vol, 100%),
    rgba(255, 255, 255, 0.18) var(--vol, 100%),
    rgba(255, 255, 255, 0.18) 100%
  );
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}

.music-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  border: 0;
}

.music-volume-slider::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  border: 0;
}

@media (max-width: 520px) {
  .music-volume {
    display: none;
  }
}

.music-disc {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  color: var(--accent);
  border: 3px solid rgba(255, 46, 136, 0.65);
  box-shadow: 0 0 45px rgba(255, 46, 136, 0.2);
  background: repeating-radial-gradient(circle, #111 0 5px, #1a1a1a 6px 8px);
}

.music-cover-wrap {
  --cover-size: clamp(88px, 18vw, 128px);
  width: var(--cover-size);
  height: var(--cover-size);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  padding: var(--cover-frame);
  background: #fff;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
  box-sizing: content-box;
}

.music-cover,
.music-cover-wrap .music-disc {
  grid-area: 1 / 1;
}

.music-cover {
  width: var(--cover-size);
  height: var(--cover-size);
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
  z-index: 2;
  display: block;
}

.music-cover-wrap .music-disc {
  width: var(--cover-size);
  height: var(--cover-size);
  font-size: 2rem;
  border-radius: 0;
  border-width: 0;
  background: linear-gradient(145deg, #241016, #120a0d);
}

@media (max-width: 860px) {
  .music-exec {
    --exec-center-w: min(18rem, calc(100vw - 2rem));
    grid-template-columns: 1fr;
    grid-template-areas:
      'now'
      'seek'
      'transport';
    gap: 0.55rem;
    justify-items: stretch;
    align-items: stretch;
  }

  body:not(.is-player) .music-exec {
    grid-template-columns: auto minmax(10rem, 1fr);
    grid-template-areas:
      'now seek'
      'now transport';
    width: 100%;
    max-width: 100%;
    margin: 0;
    column-gap: 0.75rem;
    row-gap: 0.2rem;
    align-items: center;
  }

  body:not(.is-player) .music-exec-bar .music-exec-now {
    max-width: min(11rem, 42vw);
    margin-left: 0.35rem;
  }

  body:not(.is-player) .music-exec-seek,
  body:not(.is-player) .music-exec-transport {
    justify-self: stretch;
    width: 100%;
    max-width: 100%;
  }

  .music-exec-bar .music-exec-now {
    transform: none;
    justify-self: stretch;
    margin-left: 0;
    max-width: none;
    width: 100%;
    padding: 0 0.25rem;
  }

  .music-exec-seek {
    width: 100%;
    max-width: none;
    justify-self: stretch;
    margin-top: 0.35rem;
  }

  .music-exec-transport {
    width: 100%;
    max-width: 100%;
    justify-self: stretch;
    padding: 0 0.15rem;
  }

  .music-exec-transport .music-ctrl-row {
    width: 100%;
    max-width: 100%;
  }

  .music-exec-transport .music-volume {
    margin-left: 0.45rem;
  }

  .music-volume-label {
    display: none;
  }

  .music-volume-slider {
    width: 6rem;
    min-width: 6rem;
  }

  .music-now-artist {
    font-size: clamp(1rem, 4.2vw, 1.35rem);
  }

  .music-now-meta h2 {
    font-size: clamp(0.95rem, 3.6vw, 1.1rem);
  }

  body.is-idle .music-exec-bar .music-exec-now {
    transform: none;
  }
}

@media (max-width: 560px) {
  .music-exec-now {
    align-items: center;
    gap: 0.75rem;
  }

  /* volume some em tela estreita — espaço só para prev/play/next */
  body:not(.is-player) .music-exec-transport .music-ctrl-row {
    display: grid;
    grid-template-columns: max-content auto max-content;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 0.15rem;
  }

  body:not(.is-player) .music-ctrl-side-right {
    display: flex;
    align-items: center;
  }

  .music-volume {
    display: none;
  }

  .player-section {
    padding: 0.5rem 0.65rem 9rem;
  }

  body.is-player .player-section {
    padding: 0.5rem 0.65rem 8.5rem;
  }

  .lyrics-panel,
  .file-list {
    padding: 0.7rem 0.7rem;
  }

  .lyrics-actions {
    flex-wrap: wrap;
  }
}

.player-toolbar {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.buffer-status {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 60;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
  border: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  min-height: 0;
  pointer-events: none;
}

.buffer-status.hidden {
  display: none !important;
}

.buffer-status .spinner-ring {
  position: relative;
}

.buffer-progress {
  display: none;
}

.buffer-bar {
  display: none;
}

.audio-warning,
.audio-track-list {
  margin: 0.75rem 0;
  padding: 0.85rem 1rem;
  background: rgba(22, 8, 12, 0.22);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
}

.file-list {
  margin: 0;
  padding: 0.85rem 0.9rem;
  background: rgba(10, 5, 7, 0.55);
  backdrop-filter: blur(20px) saturate(1.25);
  -webkit-backdrop-filter: blur(20px) saturate(1.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
  flex: 1;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: auto;
  box-sizing: border-box;
}

.file-list.hidden {
  display: none;
}

.player-sidebar .file-list:not(.hidden) {
  display: block;
}

.lyrics-panel {
  margin: 0;
  padding: 0.85rem 0.9rem;
  background: rgba(10, 5, 7, 0.55);
  backdrop-filter: blur(20px) saturate(1.25);
  -webkit-backdrop-filter: blur(20px) saturate(1.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
  flex: 1;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  position: relative;
  z-index: 5;
  overflow: hidden;
  box-sizing: border-box;
}

.lyrics-panel.hidden {
  display: none !important;
}

.player-sidebar .lyrics-panel:not(.hidden) {
  display: flex;
}

.lyrics-body {
  margin: 0;
  flex: 1;
  min-height: 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: Manrope, 'Segoe UI', system-ui, sans-serif;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text);
  padding-right: 0.25rem;
}

.audio-track-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.audio-track-btn {
  border: 1px solid var(--border);
  background: transparent;
  color: #fff;
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  font: inherit;
}

.audio-track-btn.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.file-item {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.file-item.active {
  color: var(--accent-strong);
}

.file-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

.file-list-head h3 {
  margin: 0;
  font-size: 1.05rem;
  flex: 1;
  min-width: 0;
}

.lyrics-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border-radius: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lyrics-toggle svg {
  display: block;
}

.lyrics-toggle:hover,
.lyrics-toggle.is-open {
  color: #fff;
  background: transparent;
  border: 0;
}

.lyrics-body.is-synced {
  white-space: normal;
  scroll-behavior: smooth;
  padding: 1.5rem 0.25rem;
}

.lyrics-line {
  margin: 0;
  padding: 0.28rem 0.4rem;
  border-radius: 8px;
  color: rgba(245, 242, 243, 0.42);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.lyrics-line.is-passed {
  color: rgba(245, 242, 243, 0.55);
}

.lyrics-line.is-active {
  color: #fff;
  background: rgba(255, 46, 136, 0.16);
  transform: scale(1.02);
  font-weight: 650;
}

.lyrics-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.lyrics-panel-head h3 {
  margin: 0;
  font-size: 1rem;
}

.lyrics-actions {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

/* ===== Modo inativo: esconde controles, amplia capa ===== */
body.is-idle .music-exec-seek,
body.is-idle .music-exec-transport,
body.is-idle .player-header,
body.is-idle .lyrics-actions,
body.is-idle .file-list,
body.is-idle .album-catalog,
body.is-idle .player-side-pair:not(:has(#lyricsPanel:not(.hidden))) {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

body.is-idle .music-exec-seek,
body.is-idle .music-exec-transport {
  transform: translateY(0.6rem);
}

body.is-idle .music-exec-bar .music-exec-now {
  transform: translateY(-1.6rem);
}

body.is-idle .music-cover-wrap {
  --cover-size: clamp(112px, 24vw, 168px);
  transition: width 0.5s ease, height 0.5s ease, transform 0.5s ease;
  transform: scale(1.04);
}

body.is-idle .music-cover,
body.is-idle .music-cover-wrap .music-disc {
  transition: width 0.5s ease, height 0.5s ease;
}

body:not(.is-idle) .music-exec-seek,
body:not(.is-idle) .music-exec-transport,
body:not(.is-idle) .player-header,
body:not(.is-idle) .lyrics-actions,
body:not(.is-idle) .file-list,
body:not(.is-idle) .album-catalog,
body:not(.is-idle) .player-side-pair {
  transition: opacity 0.35s ease, transform 0.35s ease, max-width 0.35s ease;
}

body:not(.is-idle) .music-cover-wrap,
body:not(.is-idle) .music-cover,
body:not(.is-idle) .music-cover-wrap .music-disc {
  transition: width 0.4s ease, height 0.4s ease, transform 0.4s ease;
}

@media (prefers-reduced-motion: reduce) {
  body.is-idle .music-exec-seek,
  body.is-idle .music-exec-transport,
  body.is-idle .player-header,
  body.is-idle .lyrics-actions,
  body.is-idle .file-list,
  body.is-idle .album-catalog,
  body.is-idle .player-side-pair,
  body.is-idle .music-cover-wrap,
  body.is-idle .music-cover,
  body.is-idle .music-cover-wrap .music-disc {
    transition: none;
  }
}

.lyrics-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
}

.lyrics-btn.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.28);
}

.lyrics-btn-close {
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
}

.lyrics-meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.album-catalog {
  margin: 0.75rem 0 1rem;
}

.album-catalog-head h3 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
}

.album-catalog-hint {
  margin: 0 0 0.75rem;
  color: var(--muted, #9aa393);
  font-size: 0.85rem;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.65rem;
}

.album-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  text-align: left;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  border-radius: 0;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.album-cover-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 0;
  overflow: hidden;
  background: #fff;
  padding: var(--cover-frame);
  margin-bottom: 0.35rem;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
  box-sizing: border-box;
}

.album-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.album-cover-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--accent-strong, var(--accent));
  opacity: 0.7;
  background: linear-gradient(145deg, #241016, #120a0d);
}

.album-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.album-card.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.album-year {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--accent-strong, var(--accent));
  font-weight: 600;
}

.album-title {
  font-size: 0.92rem;
  line-height: 1.25;
}

.album-tracks {
  font-size: 0.78rem;
  color: var(--muted, #9aa393);
}

.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.detail-panel {
  position: relative;
  z-index: 1;
  width: min(860px, 100%);
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 46, 136, 0.2);
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.detail-close {
  position: absolute;
  top: 0.6rem;
  right: 0.75rem;
  z-index: 2;
  border: 0;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  font-size: 1.2rem;
  cursor: pointer;
}

.detail-body {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.1rem;
  padding: 1.25rem;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0;
  background: #000;
  border: var(--cover-frame) solid #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
}

.detail-copy h2 {
  font-size: 1.35rem;
  margin-bottom: 0.55rem;
}

.detail-desc {
  color: var(--text-muted);
  margin-bottom: 1rem;
  max-height: 8rem;
  overflow: auto;
}

.detail-magnets {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.detail-magnet-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
  background: var(--surface);
  border-radius: 0;
}

@media (max-width: 860px) {
  .site-header {
    gap: 0.7rem;
  }

  .playback-dock {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .hero {
    height: clamp(20rem, 70vw, 28rem);
  }

  .hero-content {
    padding-bottom: 3rem;
  }

  .detail-body {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 180px;
  }
}

@media (max-width: 900px) {
  .player-stage {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  body.is-player .player-header {
    margin-bottom: 0.35rem;
  }

  body.is-player .player-section {
    padding-top: 0.45rem;
    padding-bottom: 11.5rem;
    gap: 0.35rem;
  }

  body.is-watching-video.is-player .player-section {
    padding: 0 !important;
    gap: 0 !important;
  }

  /* Lista no topo, mas com altura limitada para não cobrir a barra de execução */
  body.is-player .player-stage:has(#fileList:not(.hidden)),
  body.is-player .player-stage:has(#albumCatalog:not(.hidden)) {
    display: flex;
    flex-direction: column;
  }

  body.is-player .player-stage:has(#fileList:not(.hidden)) .player-side-pair,
  body.is-player .player-stage:has(#albumCatalog:not(.hidden)) .player-side-pair {
    order: -1;
    position: relative !important;
    top: 0 !important;
    margin-top: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 0;
    width: 100%;
    max-width: 100%;
    height: min(46vh, 22rem) !important;
    max-height: min(46vh, 22rem) !important;
  }

  body.is-player:not(.is-watching-video) .player-stage:has(#fileList:not(.hidden)) .player-stage-main,
  body.is-player:not(.is-watching-video) .player-stage:has(#albumCatalog:not(.hidden)) .player-stage-main {
    display: none;
  }

  .player-side-pair {
    position: relative;
    top: auto;
    width: 100%;
    max-width: 100%;
    max-height: min(46vh, 22rem);
    height: min(46vh, 22rem);
  }

  body.is-player .player-side-pair {
    --side-list-top: 0;
    --album-base-from-bottom: 0;
  }

  .player-sidebar {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .file-item {
    border-bottom: none;
    padding: 0.45rem 0;
  }

  .music-exec-bar {
    bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
    width: 100%;
    left: 0;
    right: 0;
    transform: none;
    padding-left: max(0.65rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.65rem, env(safe-area-inset-right, 0px));
  }
}

/* ===== Home only: neumorphism (dark soft UI) ===== */
body.is-home {
  --neu-bg: #1a1418;
  --neu-surface: #211a1f;
  --neu-text: #efe8ec;
  --neu-muted: #9a8f95;
  --neu-accent: #ff2e88;
  --neu-radius: 1.15rem;
  --neu-radius-sm: 0.85rem;
  /* luz mais no topo; blur maior — sem filete vertical na lateral */
  --neu-shadow-out:
    12px 14px 28px rgba(0, 0, 0, 0.7),
    -5px -12px 30px rgba(255, 255, 255, 0.075),
    -1px -2px 6px rgba(255, 255, 255, 0.04);
  --neu-shadow-out-sm:
    8px 10px 18px rgba(0, 0, 0, 0.65),
    -4px -9px 20px rgba(255, 255, 255, 0.07),
    -1px -1px 4px rgba(255, 255, 255, 0.035);
  --neu-shadow-in:
    inset 8px 8px 16px rgba(0, 0, 0, 0.55),
    inset -6px -6px 14px rgba(255, 255, 255, 0.055);
  --neu-shadow-pressed:
    inset 10px 10px 18px rgba(0, 0, 0, 0.62),
    inset -6px -6px 14px rgba(255, 255, 255, 0.04);
  background: var(--neu-bg);
  color: var(--neu-text);
}

body.is-home .home-bg {
  background: var(--neu-bg);
}

body.is-home .home-bg-slide {
  opacity: 0.22;
  filter: saturate(0.7) blur(2px);
}

body.is-home .home-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 15%, rgba(255, 46, 136, 0.08), transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 80%, rgba(0, 0, 0, 0.35), transparent 50%),
    var(--neu-bg);
  opacity: 0.92;
  pointer-events: none;
}

body.is-home .top-chrome,
body.is-home .site-header {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* header por cima do conteúdo — some a faixa sólida atrás do logo */
body.is-home .top-chrome {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  pointer-events: none;
}

body.is-home .site-header {
  pointer-events: none;
}

body.is-home .brand,
body.is-home .window-controls,
body.is-home .window-btn {
  pointer-events: auto;
}

body.is-home #app {
  position: relative;
}

body.is-home .main-stage {
  padding-top: 0;
}

body.is-home .home-view {
  padding-top: 3.25rem;
}

body.is-home {
  --home-header-clearance: 3.25rem;
  --home-panel-max-h: calc(100dvh - var(--home-header-clearance) - var(--home-panel-bottom-gap));
}

body.is-home .brand {
  border-radius: var(--neu-radius-sm);
  padding: 0.35rem 0.55rem;
  box-shadow: var(--neu-shadow-out-sm);
  background: var(--neu-surface);
}

body.is-home .brand:active {
  box-shadow: var(--neu-shadow-pressed);
}

body.is-home .window-btn {
  border-radius: 0.55rem;
  margin: 0.2rem;
  background: var(--neu-surface);
  box-shadow: var(--neu-shadow-out-sm);
}

body.is-home .window-controls {
  background: transparent;
  height: auto;
  padding: 0.15rem 0.25rem 0 0;
}

body.is-home .window-btn:hover {
  background: var(--neu-surface);
}

body.is-home .window-btn:active {
  box-shadow: var(--neu-shadow-pressed);
}

body.is-home .home-board {
  background: var(--neu-surface);
  border: 0;
  border-radius: var(--neu-radius);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: var(--neu-shadow-out);
}

body.is-home .home-board .history-grid {
  gap: 1.15rem;
  padding: 0.85rem 0.65rem 1.1rem;
  /* espaço para a luz/sombra não ficarem cortadas */
}

body.is-home .history-thumb,
body.is-home .local-album-thumb {
  border-radius: var(--neu-radius-sm);
  background: var(--neu-surface);
  padding: 0.4rem;
  overflow: visible;
  box-shadow: var(--neu-shadow-out-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

body.is-home .history-thumb-art,
body.is-home .local-album-thumb .history-thumb-art {
  border-radius: calc(var(--neu-radius-sm) - 0.2rem);
  overflow: hidden;
  box-shadow: var(--neu-shadow-in);
}

body.is-home .history-thumb:hover,
body.is-home .local-album-thumb:hover {
  transform: translateY(-3px);
  box-shadow:
    14px 16px 28px rgba(0, 0, 0, 0.72),
    -10px -10px 22px rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(255, 46, 136, 0.22);
}

body.is-home .history-thumb:active,
body.is-home .local-album-thumb:active {
  transform: translateY(0);
  box-shadow: var(--neu-shadow-pressed);
}

body.is-home .home-board-head h2 {
  color: var(--neu-text);
  letter-spacing: -0.02em;
}

body.is-home .home-board-head p,
body.is-home .home-board-hint,
body.is-home .history-empty {
  color: var(--neu-muted);
}

body.is-home .home-search-mode,
body.is-home .home-search-btn,
body.is-home .home-board-tab,
body.is-home .local-lib-back {
  border: 0;
  border-radius: 999px;
  background: var(--neu-surface);
  color: var(--neu-muted);
  box-shadow: var(--neu-shadow-out-sm);
  transition: box-shadow 0.18s ease, color 0.18s ease, background 0.18s ease;
}

body.is-home .home-search-mode:hover,
body.is-home .home-search-btn:hover,
body.is-home .home-board-tab:hover,
body.is-home .local-lib-back:hover {
  color: var(--neu-text);
  border-color: transparent;
}

body.is-home .home-search-mode.is-active,
body.is-home .home-board-tab.is-active {
  color: #fff;
  background: var(--neu-surface);
  box-shadow: var(--neu-shadow-pressed);
  border-color: transparent;
}

body.is-home .home-search-btn:active,
body.is-home .home-search-mode:active,
body.is-home .home-board-tab:active,
body.is-home .local-lib-back:active {
  box-shadow: var(--neu-shadow-pressed);
}

body.is-home .home-search-input,
body.is-home #recentSearchInput,
body.is-home .home-board input[type='search'] {
  border: 0;
  border-radius: var(--neu-radius-sm);
  background: var(--neu-bg);
  color: var(--neu-text);
  box-shadow: var(--neu-shadow-in);
}

body.is-home .home-search-input:focus,
body.is-home #recentSearchInput:focus,
body.is-home .home-board input[type='search']:focus {
  outline: none;
  box-shadow:
    var(--neu-shadow-in),
    0 0 0 2px rgba(255, 46, 136, 0.28);
}

body.is-home .home-search-input::placeholder {
  color: rgba(154, 143, 149, 0.75);
}

body.is-home .home-card-loading {
  background: rgba(26, 20, 24, 0.55);
  border-radius: var(--neu-radius-sm);
}

body.is-home .home-card-results .results-title,
body.is-home .home-card-results .poster-title,
body.is-home .home-card-results .meta-source,
body.is-home .home-card-results .source-youtube,
body.is-home .home-card-results .source-starck,
body.is-home .home-card-results .meta-year,
body.is-home .home-card-results .meta-audio {
  color: var(--neu-text);
}

body.is-home .home-card-results .results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.25rem, 1fr));
  grid-auto-rows: max-content;
  align-items: start;
  align-content: start;
  gap: 0.85rem 0.65rem;
}

body.is-home .home-card-results .results-grid:has(.is-video-thumb) {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: 1rem 0.75rem;
}

body.is-home .home-card-results .result-poster-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  align-self: start;
  width: 100%;
  height: auto;
  min-height: 0;
  gap: 0.4rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

body.is-home .home-card-results .result-poster-card .poster-frame {
  width: 100%;
  flex: 0 0 auto;
  aspect-ratio: 1 / 1;
  height: auto;
  min-height: 6rem;
  border-radius: var(--neu-radius-sm);
  overflow: hidden;
  background: var(--neu-surface);
  box-shadow: var(--neu-shadow-out-sm);
  box-sizing: border-box;
}

body.is-home .home-card-results .result-poster-card.is-video-thumb .poster-frame {
  aspect-ratio: 16 / 9;
  min-height: 7.5rem;
  padding: 3px;
  background: #141014;
}

body.is-home .home-card-results .result-poster-card:hover .poster-frame {
  box-shadow:
    12px 14px 26px rgba(0, 0, 0, 0.7),
    -6px -10px 22px rgba(255, 255, 255, 0.07);
}

body.is-home .home-card-results .result-poster-card:hover {
  box-shadow: none;
}

@media (max-width: 980px) {
  body.is-home .home-view {
    padding-top: max(var(--home-header-clearance), calc(2.75rem + env(safe-area-inset-top, 0px)));
    padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
    padding-bottom: var(--home-panel-bottom-gap);
    box-sizing: border-box;
  }

  /* Até ~tablet: mantém os 3 painéis neumorphism como no desktop */
  body.is-home .home-boards {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    height: 100%;
    max-height: none;
    flex: 1 1 0;
    min-height: 0;
    margin: 0;
    /* espaço pras sombras não ficarem cortadas (= filete lateral) */
    padding: 0.55rem 0.85rem 0.65rem;
    overflow: visible;
  }

  body.is-home .home-boards-card,
  body.is-home .home-boards-panels {
    display: contents !important;
  }

  body.is-home .home-board-tabs {
    display: none !important;
  }

  body.is-home .home-board {
    display: flex !important;
    background: var(--neu-surface);
    border: 0;
    border-radius: var(--neu-radius);
    box-shadow: var(--neu-shadow-out);
    padding: 0.75rem 0.7rem 0.85rem;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body.is-home .home-board-head {
    display: block !important;
  }

  body.is-home .home-board .history-grid {
    gap: 0.85rem;
    padding: 0.55rem 0.35rem 0.75rem;
  }

  body.is-mobile-app.is-home .site-header {
    padding-top: max(0.35rem, env(safe-area-inset-top, 0px));
  }
}

/* Celular: home estilo lista + bottom nav (só mobile) */
@media (max-width: 720px) {
  body.is-home {
    --m-accent-top: #ff7a0a;
    --m-accent-mid: #ff4326;
    --m-accent-bot: #ff0f40;
    --m-accent: #ff0f40;
    --m-accent-soft: rgba(255, 15, 64, 0.22);
    --m-grad: linear-gradient(165deg, #ff7a0a 0%, #ff4326 48%, #ff0f40 100%);
    --m-surface: #161616;
    --m-line: rgba(255, 255, 255, 0.08);
    --m-nav-h: calc(3.65rem + env(safe-area-inset-bottom, 0px));
    --m-player-h: 4.15rem;
    --accent: #ff0f40;
    --accent-strong: #ff4326;
    --accent-dim: rgba(255, 15, 64, 0.2);
    --neu-accent: #ff0f40;
    background: #0b0d0f;
  }

  body.is-home .home-bg,
  body.is-home .bg-mosaic,
  body.is-home .music-viz {
    opacity: 0 !important;
    visibility: hidden !important;
  }

  body.is-home .top-chrome,
  body.is-home .site-header {
    display: none !important;
  }

  body.is-home .home-view {
    padding: max(0.85rem, env(safe-area-inset-top, 0px)) max(1rem, env(safe-area-inset-right, 0px)) calc(var(--m-nav-h) + 0.75rem) max(1rem, env(safe-area-inset-left, 0px));
  }

  body.is-home.has-exec-bar .home-view {
    padding-bottom: calc(var(--m-nav-h) + var(--m-player-h) + 0.65rem);
  }

  body.is-home .home-boards {
    display: flex !important;
    flex-direction: column;
    gap: 0;
    padding: 0;
    overflow: visible;
    height: auto;
    max-height: none;
    flex: 1 1 auto;
    min-height: 0;
  }

  body.is-home .home-boards-card {
    display: flex !important;
    flex-direction: column;
    gap: 0.85rem;
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0 !important;
    overflow: visible;
  }

  body.is-home .home-mobile-hero {
    display: block;
    flex-shrink: 0;
    padding: 0.15rem 0.1rem 0.15rem;
  }

  body.is-home .home-mobile-brand {
    margin: 0;
    font-size: clamp(2.15rem, 9vw, 2.65rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: #fff;
  }

  body.is-home .home-mobile-sub {
    margin: 0.35rem 0 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.48);
  }

  body.is-home .home-boards-panels {
    display: flex !important;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: visible;
  }

  body.is-home .home-board {
    display: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    height: auto;
    overflow: visible;
  }

  body.is-home .home-boards[data-home-tab='search'] #boardSearch,
  body.is-home .home-boards[data-home-tab='recent'] #boardRecent,
  body.is-home .home-boards[data-home-tab='local'] #boardLocal {
    display: flex !important;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 0;
  }

  body.is-home .home-board-head {
    display: none !important;
  }

  body.is-home .home-board-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Bottom nav */
  body.is-home .home-board-tabs {
    display: flex !important;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    height: var(--m-nav-h);
    padding: 0.35rem 0.4rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
    margin: 0;
    gap: 0.15rem;
    border-radius: 0;
    background: #121212;
    border-top: 1px solid var(--m-line);
    box-shadow: none;
    align-items: stretch;
  }

  body.is-home .home-board-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.2rem 0.35rem;
    white-space: nowrap;
  }

  body.is-home .home-board-tab .home-tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.55rem;
    height: 1.85rem;
    border-radius: 999px;
    color: inherit;
  }

  body.is-home .home-tab-label-full {
    display: none;
  }

  body.is-home .home-tab-label-short {
    display: inline;
  }

  body.is-home .home-board-tab.is-active {
    background: transparent;
    box-shadow: none;
    color: var(--m-accent-bot);
  }

  body.is-home .home-board-tab.is-active .home-tab-icon {
    background: var(--m-accent-soft);
    color: var(--m-accent-bot);
  }

  body.is-home .home-board-tab:hover,
  body.is-home .home-board-tab:active {
    color: var(--m-accent-mid);
    background: transparent;
  }

  /* Busca */
  body.is-home .home-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
    align-items: stretch;
  }

  body.is-home .home-search-field {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    padding: 0 0.85rem;
    border: 1.5px solid transparent;
    border-radius: 999px;
    background:
      linear-gradient(#141414, #141414) padding-box,
      var(--m-grad) border-box;
  }

  body.is-home .home-search-ico {
    display: inline-flex;
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
  }

  body.is-home .home-search-field .home-search-input,
  body.is-home .home-search-input {
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0.72rem 0 !important;
    min-width: 0;
    width: 100%;
    color: #fff;
    font-size: 0.95rem;
  }

  body.is-home .home-search-field .home-search-input:focus {
    outline: none;
    box-shadow: none !important;
  }

  body.is-home .home-search-btn {
    border: 0;
    border-radius: 0.85rem;
    background: var(--m-grad);
    color: #111;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 0 1.15rem;
    min-width: 3.4rem;
    box-shadow: none;
  }

  body.is-home .home-search-btn:hover,
  body.is-home .home-search-btn:active {
    background: linear-gradient(165deg, #ff8d22 0%, #ff5538 48%, #ff2458 100%);
    color: #111;
    box-shadow: none;
  }

  body.is-home .home-search-btn-full {
    display: none;
  }

  body.is-home .home-search-btn-short {
    display: inline;
  }

  body.is-home .home-search-modes {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  body.is-home .home-search-mode {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: #1a1a1a;
    color: rgba(255, 255, 255, 0.78);
    box-shadow: none;
    padding: 0.42rem 0.95rem;
    font-size: 0.88rem;
    font-weight: 650;
  }

  body.is-home .home-search-mode.is-active {
    background: var(--m-grad);
    border-color: transparent;
    color: #111;
    box-shadow: none;
  }

  body.is-home .home-search-mode.is-active .home-mode-check {
    display: inline-flex;
  }

  body.is-home .home-board-hint {
    margin: 0;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.38);
  }

  body.is-home .history-empty {
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    padding: 2.5rem 1rem;
    font-size: 0.95rem;
  }

  /* Resultados em lista */
  body.is-home .home-card-results.results {
    flex: 0 0 auto;
    min-height: auto;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  body.is-home .home-card-results .results-title {
    display: none;
  }

  body.is-home .home-card-results .results-grid {
    display: flex !important;
    flex-direction: column;
    flex: 0 0 auto !important;
    min-height: auto !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    gap: 0 !important;
    grid-template-columns: none !important;
    padding: 0;
  }

  body.is-home .home-card-results .results-grid:has(.is-video-thumb) {
    grid-template-columns: none !important;
  }

  body.is-home .home-card-results .result-poster-card {
    display: grid !important;
    grid-template-columns: 3.35rem minmax(0, 1fr) 1.6rem;
    grid-template-rows: auto auto;
    grid-template-areas:
      'art title action'
      'art meta action';
    column-gap: 0.75rem;
    row-gap: 0.12rem;
    align-items: center;
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    align-self: stretch;
    width: 100%;
    min-height: 3.9rem;
    height: auto !important;
    max-height: none;
    padding: 0.7rem 0.15rem;
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--m-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-align: left;
    overflow: visible;
    position: relative;
  }

  body.is-home .home-card-results .result-poster-card:hover,
  body.is-home .home-card-results .result-poster-card:active {
    background: rgba(255, 255, 255, 0.04);
    box-shadow: none;
  }

  body.is-home .home-card-results .result-poster-card .poster-frame,
  body.is-home .home-card-results .result-poster-card.is-video-thumb .poster-frame {
    grid-area: art;
    position: relative;
    width: 3.35rem;
    height: 3.35rem;
    min-width: 3.35rem;
    min-height: 3.35rem !important;
    max-width: 3.35rem;
    max-height: 3.35rem;
    aspect-ratio: 1 / 1;
    border-radius: 0.35rem;
    padding: 0 !important;
    overflow: hidden;
    background: #222;
    box-shadow: none;
    flex: none;
  }

  body.is-home .home-card-results .result-poster-card .poster-frame img,
  body.is-home .home-card-results .result-poster-card .poster-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: none !important;
  }

  body.is-home .home-card-results .result-poster-card .badge-kind,
  body.is-home .home-card-results .result-poster-card .badge-quality-corner,
  body.is-home .home-card-results .result-poster-card .poster-imdb {
    display: none !important;
  }

  body.is-home .home-card-results .result-poster-card .poster-title {
    grid-area: title;
    position: static !important;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff !important;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-width: 0;
  }

  body.is-home .home-card-results .result-poster-card .poster-meta {
    grid-area: meta;
    position: static !important;
    margin: 0;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.42);
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.4rem;
    min-width: 0;
  }

  body.is-home .home-card-results .result-poster-card::after {
    content: '';
    grid-area: action;
    width: 1.15rem;
    height: 1.15rem;
    justify-self: end;
    align-self: center;
    background: var(--m-grad);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h11M4 12h11M4 17h7'/%3E%3Cpath d='m15 15 5 2.5L15 20v-5z' fill='black' stroke='none'/%3E%3C/svg%3E") center / contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h11M4 12h11M4 17h7'/%3E%3Cpath d='m15 15 5 2.5L15 20v-5z' fill='black' stroke='none'/%3E%3C/svg%3E") center / contain no-repeat;
  }

  body.is-home .home-board .history-grid {
    gap: 0.85rem;
    padding: 0.35rem 0 0.5rem;
  }

  /* Local */
  body.is-home .local-lib-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  body.is-home .local-lib-form #localLibPath,
  body.is-home #localLibHint {
    display: none !important;
  }

  body.is-home .local-lib-pick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    border-radius: 0.85rem;
    padding: 0.85rem 1rem;
    background: var(--m-grad);
    color: #111;
    font-weight: 800;
    font-size: 1rem;
  }

  body.is-home .local-pick-ico {
    display: inline-flex;
    color: #111;
  }

  body.is-home .local-pick-desktop {
    display: none;
  }

  body.is-home .local-pick-mobile {
    display: inline;
  }

  /* Mini-player acima da bottom nav */
  body.is-home.has-exec-bar .music-exec-bar {
    bottom: var(--m-nav-h);
    left: 0;
    right: 0;
    width: 100%;
    padding: 0.35rem 0.65rem;
    background: #1a1a1a;
    border-top: 1px solid var(--m-line);
    z-index: 65;
  }

  body.is-home.has-exec-bar:not(.is-player) .music-exec {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: 'now transport';
    align-items: center;
    column-gap: 0.35rem;
    width: 100%;
    max-width: none;
    margin: 0;
  }

  body.is-home.has-exec-bar:not(.is-player) .music-exec-bar .music-exec-now {
    grid-area: now;
    max-width: none;
    width: auto;
    margin: 0;
    padding: 0.15rem 0.25rem;
    gap: 0.55rem;
  }

  body.is-home.has-exec-bar:not(.is-player) .music-now-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.1rem;
    min-width: 0;
  }

  body.is-home.has-exec-bar:not(.is-player) .music-exec-seek,
  body.is-home.has-exec-bar:not(.is-player) .music-volume,
  body.is-home.has-exec-bar:not(.is-player) .music-now-artist,
  body.is-home.has-exec-bar:not(.is-player) .stream-status {
    display: none !important;
  }

  body.is-home.has-exec-bar:not(.is-player) .music-cover-wrap {
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 0.3rem;
    overflow: hidden;
  }

  body.is-home.has-exec-bar:not(.is-player) .music-now-meta h2,
  body.is-home.has-exec-bar:not(.is-player) .music-now-album {
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 42vw;
  }

  body.is-home.has-exec-bar:not(.is-player) .music-now-album {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
  }

  body.is-home.has-exec-bar:not(.is-player) .music-controls-host,
  body.is-home.has-exec-bar:not(.is-player) .music-controls,
  body.is-home.has-exec-bar:not(.is-player) .music-exec-transport {
    display: block;
    width: auto;
    max-width: none;
    padding: 0;
    margin: 0;
  }

  body.is-home.has-exec-bar:not(.is-player) .music-exec-transport {
    grid-area: transport;
    justify-self: end;
  }

  body.is-home.has-exec-bar:not(.is-player) .music-exec-transport .music-ctrl-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.15rem;
    width: auto;
  }

  body.is-home.has-exec-bar:not(.is-player) .music-ctrl-side {
    display: contents;
  }

  body.is-home.has-exec-bar:not(.is-player) .music-ctrl-btn {
    color: #fff;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  body.is-home.has-exec-bar:not(.is-player) .music-ctrl-play {
    width: 2.55rem;
    height: 2.55rem;
    border-radius: 999px;
    background: var(--m-grad);
    color: #111;
  }

  body.is-home.has-exec-bar:not(.is-player) .music-ctrl-play .icon-pause,
  body.is-home.has-exec-bar:not(.is-player) .music-ctrl-play .icon-play {
    color: #111;
  }
}

/* ===== Banner instalar PWA (mobile) ===== */
.pwa-install-banner {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
  z-index: 10050;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(160deg, rgba(28, 12, 16, 0.98), rgba(13, 7, 8, 0.99));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s ease, opacity 0.35s ease;
  display: block !important;
}

.pwa-install-banner.hidden {
  display: none !important;
}

.pwa-install-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.pwa-install-inner {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.75rem 0.7rem 0.7rem;
}

.pwa-install-icon {
  width: 2.6rem;
  height: 2.6rem;
  object-fit: contain;
  border-radius: 0.55rem;
  background: #0d0708;
}

.pwa-install-copy {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.pwa-install-copy strong {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.pwa-install-copy span {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.pwa-install-btn {
  border: 0;
  background: linear-gradient(180deg, #ff7a05, #ff0545);
  color: #0d0708;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.55rem 0.8rem;
  cursor: pointer;
  white-space: nowrap;
}

.pwa-install-btn:active {
  transform: scale(0.98);
}

.pwa-install-dismiss {
  width: 2rem;
  height: 2rem;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.pwa-install-steps {
  margin: 0;
  padding: 0 0.9rem 0.85rem 2.2rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  line-height: 1.45;
}

.pwa-install-steps.hidden {
  display: none !important;
}

.pwa-install-steps li + li {
  margin-top: 0.28rem;
}

.pwa-install-steps strong {
  color: #fff;
  font-weight: 700;
}

.pwa-install-banner.is-guide {
  bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
}

.pwa-install-banner.is-guide .pwa-install-timer {
  display: none;
}

.pwa-install-btn:disabled {
  opacity: 0.65;
}

.pwa-install-timer {
  height: 3px;
  width: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, #ff8705, #ff0545);
  transform: scaleX(1);
}

.pwa-install-banner.is-visible .pwa-install-timer {
  animation: pwaInstallTimer 20s linear forwards;
}

@keyframes pwaInstallTimer {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@media (min-width: 1025px) {
  .pwa-install-banner {
    left: auto;
    right: 1.25rem;
    width: min(24rem, calc(100vw - 2rem));
  }
}

/* ========== Google TV / Android TV — shell 10 pés ========== */
html.is-tv,
html.is-tv body,
body.is-tv {
  --tv-focus: #ff8705;
  --tv-focus-glow: rgba(255, 135, 5, 0.4);
  --tv-pad-x: clamp(2rem, 5vw, 4.5rem);
  --tv-search-max: min(52rem, 72vw);
  font-size: 20px;
  cursor: none;
}

body.is-tv .top-chrome,
body.is-tv .site-header,
body.is-tv #homeTabLocal,
body.is-tv #boardLocal,
body.is-tv .home-board-head,
body.is-tv .home-board-hint,
body.is-tv .home-mode-check {
  display: none !important;
}

body.is-tv #searchCardEmpty:not(.hidden) {
  display: block !important;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.72);
  padding: 1rem 0 2rem;
}

/* Banner instalar PWA na TV (visível + tamanho 10 pés) */
body.is-tv #pwaInstallBanner,
html.is-tv #pwaInstallBanner,
body.is-tv .pwa-install-banner {
  display: block !important;
  left: auto;
  right: var(--tv-pad-x, 3rem);
  bottom: 2.5rem;
  width: min(36rem, 48vw);
  border-width: 2px;
  cursor: default;
}

body.is-tv #pwaInstallBanner.hidden {
  display: none !important;
}

body.is-tv .pwa-install-inner {
  padding: 1.1rem 1.15rem;
  gap: 0.9rem;
}

body.is-tv .pwa-install-icon {
  width: 3.4rem;
  height: 3.4rem;
}

body.is-tv .pwa-install-copy strong {
  font-size: 1.25rem;
}

body.is-tv .pwa-install-copy span {
  font-size: 0.95rem;
}

body.is-tv .pwa-install-btn {
  font-size: 1.05rem;
  padding: 0.75rem 1.25rem;
  min-height: 3rem;
}

body.is-tv .pwa-install-dismiss {
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.7rem;
}

body.is-tv #pwaInstallBtn.is-tv-focus,
body.is-tv #pwaInstallDismiss.is-tv-focus {
  outline: none !important;
  box-shadow: 0 0 0 3px #ff9a33 !important;
  transform: scale(1.05);
}

/* Foco via classe (algumas TVs falham no :focus) */
body.is-tv .is-tv-focus {
  outline: none !important;
  border-color: #ff9a33 !important;
  box-shadow: 0 0 0 3px rgba(255, 154, 51, 0.55) !important;
  z-index: 3;
}

body.is-tv .home-search-field.is-tv-focus {
  border: 2px solid #ff9a33 !important;
  background: rgba(255, 255, 255, 0.1) !important;
  box-shadow: none !important;
}

body.is-tv .home-board-tab.is-tv-focus,
body.is-tv .home-search-mode.is-tv-focus,
body.is-tv .home-search-btn.is-tv-focus {
  box-shadow: 0 0 0 3px rgba(255, 154, 51, 0.6) !important;
}

body.is-tv .poster-card.is-tv-focus,
body.is-tv .result-poster-card.is-tv-focus,
body.is-tv .history-thumb.is-tv-focus {
  transform: scale(1.06);
  box-shadow: 0 0 0 3px #ff9a33 !important;
}

body.is-tv #app,
body.is-tv .main-stage,
body.is-tv .home-view {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.is-tv .home-boards {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 100dvh;
  height: auto !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 1.5rem var(--tv-pad-x) 5rem !important;
  gap: 1.1rem !important;
  overflow: visible !important;
  box-sizing: border-box;
}

body.is-tv .home-boards-card {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0;
  margin: 0 !important;
  padding: 0 !important;
  gap: 1.1rem !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow: visible !important;
}

body.is-tv .home-mobile-hero {
  display: flex !important;
  align-items: baseline;
  gap: 1rem;
  padding: 0.15rem 0 0.35rem;
}

body.is-tv .home-mobile-brand {
  margin: 0;
  font-size: clamp(2.6rem, 4.2vw, 3.6rem);
  letter-spacing: -0.03em;
  line-height: 1;
}

body.is-tv .home-mobile-sub {
  margin: 0;
  font-size: 1.15rem;
  opacity: 0.62;
}

body.is-tv .home-board-tabs {
  display: flex !important;
  gap: 0.7rem;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
}

body.is-tv .home-board-tab {
  flex: 0 0 auto;
  width: auto !important;
  min-height: 3rem;
  padding: 0.5rem 1.35rem;
  font-size: 1.02rem;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: rgba(255, 255, 255, 0.72) !important;
  box-shadow: none !important;
}

body.is-tv .home-board-tab.is-active {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #fff !important;
}

body.is-tv .home-board-tab.is-active:not(:focus):not(:focus-visible) {
  outline: none !important;
  box-shadow: none !important;
}

body.is-tv .home-tab-label-full {
  display: inline !important;
}

body.is-tv .home-tab-label-short {
  display: none !important;
}

body.is-tv .home-boards-panels {
  display: block !important;
  width: 100% !important;
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible !important;
}

body.is-tv .home-board {
  display: none !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.is-tv .home-boards[data-home-tab='search'] #boardSearch,
body.is-tv .home-boards[data-home-tab='recent'] #boardRecent {
  display: flex !important;
  flex-direction: column !important;
  gap: 1rem;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  min-height: 0;
}

/* Busca larga e legível */
body.is-tv .home-search-form,
body.is-tv .recent-search-form {
  display: grid !important;
  grid-template-columns: minmax(0, var(--tv-search-max)) auto;
  justify-content: start;
  align-items: stretch;
  gap: 0.9rem;
  width: 100%;
  max-width: none;
  margin: 0;
}

body.is-tv .recent-search-form {
  grid-template-columns: minmax(0, var(--tv-search-max));
}

body.is-tv .home-search-field {
  display: flex !important;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  min-height: 4.1rem;
  padding: 0 1.35rem;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.07) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: none !important;
  box-sizing: border-box;
}

body.is-tv .home-search-ico {
  display: grid !important;
  place-items: center;
  flex: 0 0 auto;
  opacity: 0.7;
  color: #fff;
}

body.is-tv .home-search-input,
body.is-tv #homeSearchInput,
body.is-tv #recentSearchInput {
  display: block !important;
  flex: 1 1 auto !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 3.6rem !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 1.4rem !important;
  font-weight: 500;
  color: #fff !important;
  caret-color: var(--tv-focus);
}

body.is-tv .home-search-input::placeholder,
body.is-tv #recentSearchInput::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

body.is-tv .home-search-btn {
  min-height: 4.1rem !important;
  min-width: 9.5rem;
  padding: 0 1.8rem !important;
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  border-radius: 0.9rem !important;
  background: linear-gradient(135deg, #ff8705, #ff2e54) !important;
  color: #fff !important;
  box-shadow: none !important;
  border: 0 !important;
}

body.is-tv .home-search-btn-full {
  display: inline !important;
}

body.is-tv .home-search-btn-short {
  display: none !important;
}

body.is-tv .home-search-modes {
  display: flex;
  gap: 0.75rem;
  width: min(100%, var(--tv-search-max));
  margin: 0;
}

body.is-tv .home-search-mode {
  flex: 1 1 0;
  min-height: 3.25rem !important;
  padding: 0.55rem 1.2rem !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  border-radius: 999px !important;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06) !important;
  color: rgba(255, 255, 255, 0.7) !important;
  box-shadow: none !important;
  border: 1px solid transparent !important;
}

body.is-tv .home-search-mode.is-active {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
}

/* Ativo ≠ foco do controle — só :focus-visible leva o anel laranja */
body.is-tv .home-search-mode.is-active:not(:focus):not(:focus-visible) {
  outline: none !important;
  box-shadow: none !important;
}

body.is-tv .home-board-body {
  width: 100%;
  overflow: visible !important;
}

/* Foco remoto */
body.is-tv .poster-card,
body.is-tv .result-poster-card,
body.is-tv .history-thumb,
body.is-tv .home-board-tab,
body.is-tv .home-search-mode,
body.is-tv .home-search-btn,
body.is-tv .home-search-input,
body.is-tv .music-ctrl-btn,
body.is-tv .video-autoplay-toggle,
body.is-tv .video-fx-toggle,
body.is-tv .video-fs-toggle,
body.is-tv .file-item {
  outline: none;
}

body.is-tv .poster-card:focus,
body.is-tv .poster-card:focus-visible,
body.is-tv .result-poster-card:focus,
body.is-tv .result-poster-card:focus-visible,
body.is-tv .history-thumb:focus,
body.is-tv .history-thumb:focus-visible,
body.is-tv .home-board-tab:focus-visible,
body.is-tv .home-search-mode:focus-visible,
body.is-tv .home-search-btn:focus-visible,
body.is-tv .music-ctrl-btn:focus-visible,
body.is-tv .video-autoplay-toggle:focus-visible,
body.is-tv .video-fx-toggle:focus-visible,
body.is-tv .video-fs-toggle:focus-visible,
body.is-tv .file-item:focus-visible,
body.is-tv button:focus-visible {
  outline: 3px solid var(--tv-focus) !important;
  outline-offset: 4px;
  box-shadow: 0 0 0 6px var(--tv-focus-glow) !important;
  z-index: 2;
}

/* Busca: foco limpo — só borda clara, sem outline+glow */
body.is-tv .home-search-field:focus-within {
  outline: none !important;
  border: 2px solid #ff9a33 !important;
  box-shadow: none !important;
  background: rgba(255, 255, 255, 0.1) !important;
  z-index: 2;
}

body.is-tv .home-search-input:focus,
body.is-tv .home-search-input:focus-visible,
body.is-tv #homeSearchInput:focus,
body.is-tv #homeSearchInput:focus-visible,
body.is-tv #recentSearchInput:focus,
body.is-tv #recentSearchInput:focus-visible,
body.is-tv.is-home .home-search-input:focus,
body.is-tv.is-home #homeSearchInput:focus,
body.is-tv.is-home #recentSearchInput:focus,
body.is-tv.is-home .home-search-input:focus-visible {
  outline: none !important;
  outline-offset: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

body.is-tv .poster-card:focus,
body.is-tv .result-poster-card:focus,
body.is-tv .history-thumb:focus {
  transform: scale(1.05);
  transition: transform 0.14s ease;
}

/* Filas horizontais */
body.is-tv .home-card-results:not(.hidden),
body.is-tv #results.tv-shelves-host:not(.hidden) {
  display: flex !important;
  flex-direction: column;
  gap: 1.75rem;
  width: 100%;
  padding: 0.75rem 0 4rem;
  overflow: visible;
}

body.is-tv .tv-shelves-heading {
  font-size: 1.5rem;
  margin: 0.2rem 0 0;
  letter-spacing: -0.02em;
}

body.is-tv .tv-shelf {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-width: 0;
}

body.is-tv .tv-shelf-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

body.is-tv .tv-shelf-row,
body.is-tv #historyGrid.tv-shelf-row {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 1.1rem !important;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0.25rem;
  padding: 0.65rem 0.15rem 1.1rem;
  margin: 0;
  grid-template-columns: none !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 135, 5, 0.5) transparent;
}

body.is-tv .tv-shelf-row .poster-card,
body.is-tv .tv-shelf-row .result-poster-card,
body.is-tv #historyGrid.tv-shelf-row .history-thumb {
  flex: 0 0 auto;
  width: clamp(10.5rem, 13.5vw, 13rem);
  scroll-snap-align: start;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  padding: 0 !important;
}

body.is-tv .tv-shelf-row .result-poster-card.is-video-thumb {
  width: clamp(15rem, 20vw, 19.5rem);
}

body.is-tv .tv-shelf-row .poster-title,
body.is-tv .history-thumb-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 1rem;
  line-height: 1.25;
  margin-top: 0.5rem;
  text-align: left;
  color: rgba(255, 255, 255, 0.9);
}

body.is-tv .history-thumb {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  color: inherit;
  text-align: left;
}

body.is-tv .history-thumb-art {
  aspect-ratio: 1;
  border-radius: 0.55rem;
  overflow: hidden;
  background: #1a1012;
}

body.is-tv .history-thumb-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body:not(.is-tv) .history-thumb-title {
  display: none;
}

body.is-tv .music-exec-bar {
  font-size: 1.05rem;
}

body.is-tv .music-ctrl-btn {
  width: 3.4rem;
  height: 3.4rem;
}

body.is-tv .music-ctrl-play {
  width: 4.2rem;
  height: 4.2rem;
}

body.is-tv .yt-video-toolbar {
  gap: 0.75rem;
}

body.is-tv .video-autoplay-toggle,
body.is-tv .video-fx-toggle,
body.is-tv .video-fs-toggle {
  width: 3.2rem !important;
  height: 3.2rem !important;
  min-width: 3.2rem;
}

body.is-tv .video-autoplay-toggle {
  width: auto !important;
  padding: 0 0.85rem !important;
  font-size: 1rem;
}

body.is-tv.is-watching-video.is-idle .yt-video-toolbar {
  opacity: 1;
  pointer-events: auto;
}

/* TV: vídeo ocupa quase a tela inteira (ABR do YouTube sobe a qualidade) */
body.is-tv.is-watching-video {
  --yt-stage-inset-top: 0.15rem;
  --yt-stage-inset-bottom: 0.15rem;
  --yt-stage-inset-x: 0.35rem;
  --yt-exec-reserve: calc(6.5rem + env(safe-area-inset-bottom, 0px));
}

body.is-tv.is-watching-video .yt-video-picture {
  min-width: min(100%, 70vw);
}

body.is-tv.is-watching-video #ytVideoFrame,
body.is-tv.is-watching-video .yt-html-video {
  image-rendering: auto;
}
