:root {
  --player-bg: #0a0a0a;
  --player-fg: #f5f5f5;
  --player-muted: rgba(245, 245, 245, 0.68);
  --player-accent: #ffffff;
  --player-panel-bg: rgba(10, 10, 10, 0.78);
  --player-panel-border: rgba(255, 255, 255, 0.08);
  --player-bar-bg: rgba(10, 10, 10, 0.86);
  --player-bar-border: rgba(255, 255, 255, 0.1);
  --player-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  --player-bar-shadow: 0 -16px 40px rgba(0, 0, 0, 0.55);
  --player-radius: 14px;
  --player-bar-height: 80px;
  --player-text-halo:
    0 1px 2px rgba(0, 0, 0, 0.92),
    0 0 10px rgba(0, 0, 0, 0.75),
    0 0 24px rgba(0, 0, 0, 0.55);
  --player-text-halo-strong:
    0 1px 3px rgba(0, 0, 0, 0.95),
    0 0 14px rgba(0, 0, 0, 0.85),
    0 0 32px rgba(0, 0, 0, 0.65);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--player-bg);
  color: var(--player-fg);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  min-height: 100%;
}

.player-body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

.player__skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}
.player__skip-link:focus {
  left: 12px;
  top: 12px;
  background: #fff;
  color: #000;
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 50;
}

.player {
  position: relative;
  display: block;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
}

.player__stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #000;
  isolation: isolate;
}

.player__scene-stack {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #000;
  z-index: 0;
}

.player__scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 420ms ease;
  will-change: opacity;
  z-index: 0;
}

.player__scene--active {
  opacity: 1;
  z-index: 1;
}

.player__panel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--left-pct, 50%);
  background: linear-gradient(
    to right,
    rgba(10, 10, 10, 0.88) 0%,
    rgba(10, 10, 10, 0.78) 65%,
    rgba(10, 10, 10, 0) 100%
  );
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  z-index: 2;
  left: 0;
  transition: opacity 280ms ease, visibility 280ms ease;
}

body[data-panel-mode="right"] .player__panel {
  left: auto;
  right: 0;
  background: linear-gradient(
    to left,
    rgba(10, 10, 10, 0.88) 0%,
    rgba(10, 10, 10, 0.78) 65%,
    rgba(10, 10, 10, 0) 100%
  );
}

/* Durante navegação no carrossel (hover ou controle remoto), some o painel para não competir com o resumo central. */
.player--carousel-browsing .player__panel {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player__panel-inner {
  padding: clamp(24px, 4vw, 72px);
  width: 100%;
  max-width: clamp(640px, 46vw, 960px);
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 1.6vw, 28px);
}

.player__eyebrow {
  margin: 0;
  font-size: clamp(12px, 0.9vw, 16px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--player-muted);
  font-weight: 600;
}

.player__title {
  margin: 0;
  font-size: clamp(28px, 3.8vw, 72px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.player__lyrics {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.1vw, 20px);
  min-height: 180px;
  max-height: 70vh;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
}

.player__lyric {
  margin: 0;
  font-size: clamp(18px, 2.3vw, 44px);
  line-height: 1.3;
  color: var(--player-muted);
  transition: color 200ms ease, transform 200ms ease, opacity 200ms ease;
  opacity: 0.55;
  text-decoration: none;
  border: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

.player__lyric--current {
  color: var(--player-accent);
  opacity: 1;
  font-weight: 600;
  transform: translateX(4px);
  text-decoration: none;
  border: 0;
}

.player__lyric--passed {
  opacity: 0.7;
}

.player__lyric--upcoming {
  opacity: 0.4;
}

.player__intro {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: #000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 32px;
  cursor: pointer;
}

.player__intro[hidden] { display: none !important; }

.player__intro-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: opacity 320ms ease;
}

.player__intro-actions {
  position: relative;
  z-index: 1;
  padding-bottom: env(safe-area-inset-bottom);
}

.player__skip {
  appearance: none;
  background: rgba(255, 255, 255, 0.92);
  color: #0a0a0a;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: var(--player-shadow);
  transition: transform 120ms ease, background 120ms ease;
}
.player__skip:hover { background: #fff; transform: translateY(-1px); }
.player__skip:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.player__exit {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  left: max(14px, env(safe-area-inset-left));
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 30;
  transition: background 160ms ease, transform 120ms ease;
}
.player__exit:hover { background: rgba(10, 10, 10, 0.8); transform: scale(1.04); }
.player__exit:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.player__exit-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.player__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(16px, 2vw, 28px);
  padding: 10px clamp(16px, 2vw, 28px);
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  background: var(--player-bar-bg);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  box-shadow: var(--player-bar-shadow);
  z-index: 10;
}

.player__fs {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  z-index: 30;
  transition: background 160ms ease, transform 120ms ease;
}
.player__fs:hover { background: rgba(10, 10, 10, 0.8); transform: scale(1.04); }
.player__fs:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.player__fs-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.player__exit,
.player__fs,
.player__bar {
  transition: opacity 280ms ease, transform 280ms ease;
}

.player.is-chrome-hidden .player__exit,
.player.is-chrome-hidden .player__fs {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.player.is-chrome-hidden .player__bar {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.player.is-chrome-hidden {
  cursor: none;
}

.player__eyebrow:empty,
.player__now-eyebrow:empty {
  display: none;
}

.player__now-thumb--empty {
  visibility: hidden;
}

.player__now {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--player-fg);
  text-decoration: none;
  padding: 6px 10px 6px 6px;
  border-radius: 12px;
  min-width: 0;
  max-width: 100%;
  transition: background 160ms ease;
}
.player__now:hover { background: rgba(255, 255, 255, 0.05); }
.player__now:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.player__now-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
  background: #111;
}

.player__now-thumb--empty {
  display: block;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
}

.player__now-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.player__now-eyebrow {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--player-muted);
  font-weight: 600;
}

.player__now-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--player-fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player__controls {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-self: center;
}

.player__nav {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--player-fg);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 160ms ease, transform 120ms ease;
}
.player__nav svg { width: 20px; height: 20px; display: block; }
.player__nav:hover { background: rgba(255, 255, 255, 0.08); transform: scale(1.04); }
.player__nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.player__nav:disabled { opacity: 0.35; cursor: not-allowed; }

.player__play {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: #0a0a0a;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--player-shadow);
  transition: transform 120ms ease;
}
.player__play:hover { transform: scale(1.04); }
.player__play:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.player__play-svg {
  width: 22px;
  height: 22px;
  display: block;
}

.player__progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  justify-self: end;
  width: 100%;
  max-width: 360px;
}

.player__progress-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  background: linear-gradient(
    to right,
    #fff var(--played, 0%),
    rgba(255, 255, 255, 0.2) var(--played, 0%)
  );
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}
.player__progress-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.player__progress-range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: 0;
}

.player__time {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  font-variant-numeric: tabular-nums;
  font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--player-muted);
  letter-spacing: 0.05em;
}
.player__time-sep { opacity: 0.5; }

.player__up-next {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--player-bar-height) + env(safe-area-inset-bottom) + 18px);
  z-index: 15;
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 14px 20px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  min-width: 240px;
  text-align: center;
}
.player__up-next[hidden] { display: none !important; }

.player__up-next-eyebrow {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--player-muted);
  font-weight: 600;
}

.player__up-next-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--player-fg);
  line-height: 1.3;
}

.player__up-next-meta {
  font-size: 13px;
  color: var(--player-muted);
  margin-top: 2px;
}
.player__up-next-count {
  font-size: 22px;
  font-weight: 700;
  color: var(--player-fg);
  font-variant-numeric: tabular-nums;
  margin: 0 2px;
}

.player__up-next-cancel {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--player-muted);
  font: inherit;
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px 8px;
  margin-top: 2px;
}
.player__up-next-cancel:hover { color: var(--player-fg); }
.player__up-next-cancel:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 6px; }

.player__carousel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--player-bar-height) + env(safe-area-inset-bottom) + 8px);
  z-index: 4;
  padding: 0 clamp(18px, 2.6vw, 36px);
  transition: opacity 280ms ease, transform 280ms ease;
  --carousel-summary-x: 50%;
}

.player__carousel[hidden] { display: none !important; }

.player__carousel-summary {
  position: absolute;
  left: var(--carousel-summary-x);
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  max-width: min(520px, calc(100vw - 72px));
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(13px, 1.1vw, 18px);
  line-height: 1.45;
  letter-spacing: 0.01em;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.65);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.player__carousel-summary[hidden] { display: none !important; }

.player__carousel-summary-title {
  display: block;
  font-size: 0.82em;
  line-height: 1.2;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.player__carousel-summary-text {
  display: block;
}

.player__carousel-track {
  display: flex;
  align-items: flex-end;
  gap: clamp(10px, 1.2vw, 18px);
  overflow-x: auto;
  overflow-y: visible;
  padding: 18px 0 6px;
  scrollbar-width: none;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  pointer-events: auto;
}

.player__carousel-track::before,
.player__carousel-track::after {
  content: "";
  flex: 0 0 var(--carousel-edge-space, max(24px, calc(50vw - 90px)));
  height: 1px;
}

.player__carousel-track::-webkit-scrollbar {
  display: none;
}

.player__carousel-item {
  position: relative;
  flex: 0 0 auto;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  color: inherit;
  opacity: 0.62;
  transform: scale(1);
  transform-origin: 50% 100%;
  scroll-snap-align: center;
  transition:
    transform 180ms ease,
    opacity 180ms ease,
    filter 180ms ease,
    box-shadow 180ms ease;
}

.player__carousel-item--song {
  width: clamp(118px, 11vw, 178px);
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.player__carousel-item--album {
  width: clamp(96px, 9vw, 156px);
  cursor: default;
  opacity: 0.46;
  filter: saturate(0.95);
}

.player__carousel-image,
.player__carousel-separator-image {
  display: block;
  width: 100%;
  height: 100%;
}

.player__carousel-image {
  object-fit: cover;
}

.player__carousel-separator-image {
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.42));
}

.player__carousel-item.is-active {
  opacity: 0.9;
}

.player__carousel-item.is-focused {
  opacity: 1;
  z-index: 2;
}

.player__carousel-item--song.is-focused {
  transform: scale(1.18);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.18);
}

.player__carousel-item--album.is-focused {
  transform: scale(1.08);
  opacity: 0.82;
  filter: saturate(1.02) drop-shadow(0 14px 24px rgba(0, 0, 0, 0.38));
}

.player.is-chrome-hidden .player__carousel {
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
}

body.player-body:not(.player-body--tizen) .player__panel {
  background: linear-gradient(
    to right,
    rgba(10, 10, 10, 0.76) 0%,
    rgba(10, 10, 10, 0.58) 65%,
    rgba(10, 10, 10, 0) 100%
  );
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

body.player-body:not(.player-body--tizen)[data-panel-mode="right"] .player__panel {
  background: linear-gradient(
    to left,
    rgba(10, 10, 10, 0.76) 0%,
    rgba(10, 10, 10, 0.58) 65%,
    rgba(10, 10, 10, 0) 100%
  );
}

@media (max-width: 899px) {
  :root {
    --player-bar-height: 92px;
  }

  .player-body { overflow-y: auto; }

  .player {
    --player-mobile-carousel-space: clamp(126px, 36vw, 184px);
    display: block;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: calc(
      var(--player-bar-height) +
      var(--player-mobile-carousel-space) +
      env(safe-area-inset-bottom)
    );
    overflow: visible;
    isolation: isolate;
  }

  .player::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--player-cover);
    background-size: cover;
    background-position: center;
    filter: blur(10px) saturate(1.1);
    opacity: 0.6;
    z-index: -2;
    pointer-events: none;
  }

  .player::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.45);
    z-index: -1;
    pointer-events: none;
  }

  body.player-body:not(.player-body--tizen) .player::after {
    background: rgba(10, 10, 10, 0.32);
  }

  .player__stage {
    position: relative;
    inset: auto;
    display: flex;
    flex-direction: column;
    min-height: 60vh;
    background: transparent;
    isolation: auto;
    overflow: visible;
  }

  .player__scene-stack {
    position: relative;
    inset: auto;
    width: 100%;
    aspect-ratio: 16 / 10;
    flex-shrink: 0;
  }

  .player__scene {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .player__panel,
  body[data-panel-mode="right"] .player__panel {
    position: relative;
    width: 100%;
    inset: auto;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    flex: 1;
    z-index: 3;
  }

  .player__panel-inner {
    position: relative;
    z-index: 1;
    padding: 18px 18px calc(24px + var(--player-mobile-carousel-space));
    max-width: none;
  }

  .player__lyrics {
    max-height: none;
    overflow: visible;
  }

  .player__bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    grid-template-areas:
      "progress progress"
      "now controls";
    column-gap: 10px;
    row-gap: 6px;
    padding: 8px 12px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
  }

  .player__now {
    grid-area: now;
    padding: 2px 6px 2px 2px;
    min-width: 0;
  }
  .player__now-thumb { width: 40px; height: 40px; border-radius: 8px; }
  .player__now-eyebrow { font-size: 9px; }
  .player__now-title { font-size: 13px; }

  .player__controls {
    grid-area: controls;
    gap: 6px;
  }
  .player__nav { width: 36px; height: 36px; }
  .player__nav svg { width: 18px; height: 18px; }
  .player__play { width: 44px; height: 44px; }
  .player__play-svg { width: 18px; height: 18px; }

  .player__progress {
    grid-area: progress;
    max-width: none;
    justify-self: stretch;
    gap: 2px;
  }
  .player__time { font-size: 10px; }

  .player__up-next {
    bottom: calc(var(--player-bar-height) + env(safe-area-inset-bottom) + 16px);
    min-width: 0;
    width: calc(100% - 32px);
    max-width: 360px;
  }

  .player__carousel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--player-bar-height) + env(safe-area-inset-bottom) + 2px);
    z-index: 16;
    padding: 0 12px;
  }

  .player__carousel-summary {
    max-width: calc(100vw - 32px);
    font-size: 13px;
  }

  .player__carousel-track {
    --carousel-edge-space: max(18px, calc(50vw - 72px));
    gap: 10px;
    padding-top: 10px;
  }

  .player__carousel-item--song {
    width: clamp(102px, 34vw, 144px);
    border-radius: 12px;
  }

  .player__carousel-item--album {
    width: clamp(78px, 28vw, 120px);
  }
}

@media (max-width: 899px) and (orientation: portrait) {
  .player {
    --player-mobile-carousel-space: clamp(130px, 37vw, 188px);
  }

  .player__scene-stack {
    aspect-ratio: 16 / 10;
  }

  .player__scene,
  .player__intro-slide,
  .player__morph-layer {
    object-position: center top;
  }

  .player__panel-inner {
    padding-top: 16px;
    padding-bottom: calc(26px + var(--player-mobile-carousel-space));
  }

  .player__carousel {
    bottom: calc(var(--player-bar-height) + env(safe-area-inset-bottom) + 4px);
  }

  .player__carousel-summary {
    bottom: calc(100% + 8px);
    max-width: calc(100vw - 28px);
    text-align: center;
  }
}

@media (max-width: 480px) {
  .player__title { font-size: 24px; }
  .player__lyric { font-size: 18px; }

  .player__now-eyebrow { display: none; }
}

.player__morph {
  position: absolute;
  inset: 0;
  z-index: 5;
  overflow: hidden;
  background: #000;
  pointer-events: none;
  transition: opacity 400ms ease;
}

.player__morph.is-done {
  opacity: 0;
}

.player__morph-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  will-change: opacity, transform, filter;
  transform-origin: 50% 50%;
}

.player__morph-layer--from {
  opacity: 1;
  transform: scale(1);
  animation: playerMorphFrom 6000ms linear forwards;
  animation-play-state: paused;
}

.player__morph-layer--to {
  opacity: 0;
  transform: scale(1.06);
  filter: blur(0px);
  animation: playerMorphTo 6000ms ease-out forwards;
  animation-play-state: paused;
}

.player__morph-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    closest-side at 50% 50%,
    rgba(90, 150, 255, 0.18),
    rgba(90, 150, 255, 0) 65%
  );
  opacity: 0;
  pointer-events: none;
  animation: playerMorphGlow 6000ms ease-in-out forwards;
  animation-play-state: paused;
}

.player__morph.is-running .player__morph-layer--from,
.player__morph.is-running .player__morph-layer--to,
.player__morph.is-running .player__morph-glow {
  animation-play-state: running;
}

.player__morph.is-paused .player__morph-layer--from,
.player__morph.is-paused .player__morph-layer--to,
.player__morph.is-paused .player__morph-glow {
  animation-play-state: paused;
}

@keyframes playerMorphFrom {
  0%   { opacity: 1; transform: scale(1); }
  25%  { opacity: 1; transform: scale(1.02); }
  50%  { opacity: 0.5; transform: scale(1.03); }
  75%  { opacity: 0; transform: scale(1.05); }
  100% { opacity: 0; transform: scale(1.05); }
}

@keyframes playerMorphTo {
  0%    { opacity: 0; transform: scale(1.06); filter: blur(0px); }
  25%   { opacity: 0; transform: scale(1.05); filter: blur(6px); }
  41.7% { opacity: 0.5; transform: scale(1.035); filter: blur(10px); }
  58.3% { opacity: 0.85; transform: scale(1.02); filter: blur(6px); }
  75%   { opacity: 1; transform: scale(1.01); filter: blur(0px); }
  100%  { opacity: 1; transform: scale(1); filter: blur(0px); }
}

@keyframes playerMorphGlow {
  0%    { opacity: 0; }
  33%   { opacity: 0; }
  41.7% { opacity: 0.9; }
  58.3% { opacity: 0.6; }
  66.7% { opacity: 0; }
  100%  { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .player__scene,
  .player__lyric,
  .player__intro-slide {
    transition: none;
  }

  .player__morph-layer--from {
    animation: playerMorphFromReduced 1800ms ease-out forwards;
    animation-play-state: paused;
  }
  .player__morph-layer--to {
    animation: playerMorphToReduced 1800ms ease-out forwards;
    animation-play-state: paused;
    filter: none;
    transform: none;
  }
  .player__morph-glow {
    display: none;
  }

  @keyframes playerMorphFromReduced {
    0%   { opacity: 1; }
    100% { opacity: 0; }
  }
  @keyframes playerMorphToReduced {
    0%   { opacity: 0; }
    100% { opacity: 1; }
  }
}

@media (min-width: 900px) {
  .player__panel,
  body[data-panel-mode="right"] .player__panel,
  body.player-body:not(.player-body--tizen) .player__panel,
  body.player-body:not(.player-body--tizen)[data-panel-mode="right"] .player__panel {
    width: min(var(--left-pct, 50%), 46vw);
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    pointer-events: none;
  }

  .player__panel-inner {
    max-width: clamp(640px, 46vw, 960px);
    padding: clamp(28px, 3.4vw, 88px);
    pointer-events: auto;
  }

  .player__eyebrow,
  .player__title,
  .player__lyric {
    text-shadow: var(--player-text-halo);
  }

  .player__title,
  .player__lyric--current {
    text-shadow: var(--player-text-halo-strong);
    -webkit-text-stroke: 0.4px rgba(0, 0, 0, 0.35);
  }

  .player__lyric--passed {
    opacity: 0.78;
  }

  .player__lyric--upcoming {
    opacity: 0.52;
  }

  .player__lyric {
    font-size: clamp(20px, 2vw, 44px);
  }

  .player__title {
    font-size: clamp(28px, 3.4vw, 72px);
  }
}

@media (min-width: 900px) and (prefers-contrast: more) {
  :root {
    --player-text-halo-strong:
      0 1px 3px rgba(0, 0, 0, 0.98),
      0 0 16px rgba(0, 0, 0, 0.92),
      0 0 36px rgba(0, 0, 0, 0.78);
  }

  .player__title,
  .player__lyric--current {
    -webkit-text-stroke: 0.5px rgba(0, 0, 0, 0.5);
  }

  .player__lyric--upcoming {
    opacity: 0.62;
  }
}
