:root {
  --hmp-ink: #172126;
  --hmp-muted: #6b777b;
  --hmp-line: #d8dedf;
  --hmp-surface: #ffffff;
  --hmp-soft: #f3f6f5;
  --hmp-accent: #128476;
  --hmp-accent-dark: #0a5f56;
  --hmp-warm: #c75d3a;
  --hmp-bar: #121b1f;
}

.hmp-root,
.hmp-root * {
  box-sizing: border-box;
  letter-spacing: 0;
}

.hmp-root {
  width: 100%;
  height: 74px;
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9998;
  visibility: hidden;
  color: var(--hmp-ink);
  font-family: "Microsoft YaHei UI", "Segoe UI", sans-serif;
  font-size: 14px;
}

.hmp-root.ready {
  visibility: visible;
}

.hmp-page-spacer {
  width: 100%;
  height: 74px;
  flex: 0 0 74px;
}

.hmp-bar {
  width: 100%;
  height: 74px;
  position: relative;
  z-index: 1;
  padding: 10px max(18px, calc((100vw - 1440px) / 2));
  display: grid;
  grid-template-columns: 48px minmax(150px, 260px) auto minmax(180px, 1fr) 130px 40px;
  align-items: center;
  gap: 12px;
  color: #f5f8f8;
  background: var(--hmp-bar);
  border-top: 1px solid #2b393d;
  box-shadow: 0 -8px 26px rgba(12, 22, 25, 0.16);
}

.hmp-icon-button,
.hmp-cover-button,
.hmp-track-row,
.hmp-tab,
.hmp-mode-option,
.hmp-lyric-line:is(button) {
  font: inherit;
  letter-spacing: 0;
  cursor: pointer;
}

.hmp-icon-button {
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  color: inherit;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 16px;
}

.hmp-icon-button:hover,
.hmp-icon-button:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.24);
  outline: 0;
}

.hmp-play {
  width: 40px;
  height: 40px;
  color: #10201f;
  background: #72d1c3;
  border-color: #72d1c3;
  font-size: 15px;
  font-weight: 800;
}

.hmp-play:hover,
.hmp-play:focus-visible {
  background: #94e0d5;
  border-color: #94e0d5;
}

.hmp-cover-button {
  width: 48px;
  height: 48px;
  padding: 0;
  position: relative;
  overflow: hidden;
  color: #d8eeea;
  background: #213136;
  border: 1px solid #3d5358;
  border-radius: 4px;
}

.hmp-cover,
.hmp-track-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hmp-cover {
  display: none;
}

.hmp-cover.visible {
  display: block;
}

.hmp-cover-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
}

.hmp-cover-fallback.hidden,
.hmp-empty.hidden,
.hmp-lyrics-empty.hidden {
  display: none;
}

.hmp-track-info {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.hmp-track-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.hmp-track-heading .hmp-title {
  min-width: 0;
  flex: 1;
}

.hmp-track-info strong,
.hmp-track-info > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hmp-track-info strong {
  font-size: 13px;
}

.hmp-track-info > span {
  color: #9eabad;
  font-size: 11px;
}

.hmp-track-info .hmp-transport-indicator {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  overflow: visible;
  color: #8b9699;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.hmp-transport-indicator::before {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  content: "";
  background: #748084;
  border-radius: 50%;
}

.hmp-root[data-transport="p2p"] .hmp-transport-indicator {
  color: #82dbcf;
}

.hmp-root[data-transport="p2p"] .hmp-transport-indicator::before {
  background: #62c5b7;
  box-shadow: 0 0 0 2px rgba(98, 197, 183, 0.16);
}

.hmp-transport-indicator.pending::before {
  background: #c6a65b;
}

.hmp-root.playing .hmp-live-lyric {
  color: #b9e8e1;
}

.hmp-lyric-char {
  color: inherit;
  transition: color 80ms linear;
}

.hmp-root.playing .hmp-live-lyric .hmp-lyric-char.past {
  color: #82dbcf;
}

.hmp-root.playing .hmp-live-lyric .hmp-lyric-char.current {
  color: #ffab82;
}

.hmp-root.playing .hmp-live-lyric .hmp-lyric-char.future {
  color: #9eabad;
}

.hmp-transport,
.hmp-progress-wrap,
.hmp-volume-wrap {
  display: flex;
  align-items: center;
}

.hmp-transport {
  gap: 2px;
}

.hmp-progress-wrap {
  min-width: 0;
  gap: 9px;
}

.hmp-current-time,
.hmp-duration {
  width: 38px;
  flex: 0 0 38px;
  color: #9eabad;
  font-size: 10px;
  text-align: center;
}

.hmp-progress,
.hmp-volume {
  height: 20px;
  margin: 0;
  accent-color: #62c5b7;
  cursor: pointer;
}

.hmp-progress {
  width: 100%;
  min-width: 80px;
}

.hmp-volume-wrap {
  gap: 4px;
}

.hmp-volume {
  width: 88px;
}

.hmp-library-button.active {
  color: #82dbcf;
}

.hmp-status {
  max-width: min(480px, calc(100vw - 32px));
  position: absolute;
  right: 18px;
  bottom: 82px;
  display: none;
  padding: 9px 11px;
  color: #194f49;
  background: #e4f4f1;
  border: 1px solid #a7d6cf;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(18, 29, 32, 0.16);
  font-size: 12px;
}

.hmp-status.visible {
  display: block;
}

.hmp-status.error {
  color: #742d2d;
  background: #fff0f0;
  border-color: #e1b0b0;
}

.hmp-drawer {
  width: min(390px, calc(100vw - 20px));
  height: min(680px, calc(100vh - 92px));
  position: fixed;
  right: 10px;
  bottom: 74px;
  z-index: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  overflow: hidden;
  color: var(--hmp-ink);
  background: var(--hmp-surface);
  border: 1px solid var(--hmp-line);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  box-shadow: 0 -16px 46px rgba(14, 27, 31, 0.2);
  opacity: 0;
  transform: translateY(24px);
  pointer-events: none;
  transition: opacity 150ms ease, transform 150ms ease;
}

.hmp-drawer.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hmp-drawer-header {
  min-height: 72px;
  padding: 15px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #fff;
  background: #182326;
}

.hmp-drawer-header > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.hmp-drawer-header strong {
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hmp-eyebrow {
  color: #6fcfc1;
  font-size: 9px;
  font-weight: 800;
}

.hmp-tabs {
  height: 44px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-bottom: 1px solid var(--hmp-line);
}

.hmp-tab {
  padding: 0 14px;
  color: var(--hmp-muted);
  background: #fff;
  border: 0;
  border-bottom: 2px solid transparent;
  font-size: 12px;
  font-weight: 700;
}

.hmp-tab.active {
  color: var(--hmp-accent-dark);
  border-bottom-color: var(--hmp-accent);
}

.hmp-count {
  margin-left: 4px;
  color: var(--hmp-muted);
  font-weight: 500;
}

.hmp-playback-modes {
  min-height: 42px;
  padding: 5px 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  background: var(--hmp-soft);
  border-bottom: 1px solid var(--hmp-line);
}

.hmp-mode-option {
  min-width: 0;
  padding: 0 6px;
  color: var(--hmp-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.hmp-mode-option span {
  margin-right: 5px;
  font-size: 13px;
}

.hmp-mode-option:hover,
.hmp-mode-option:focus-visible {
  color: var(--hmp-ink);
  border-color: #c8d1d1;
  outline: 0;
}

.hmp-mode-option.active {
  color: var(--hmp-accent-dark);
  background: #fff;
  border-color: #b8ceca;
}

.hmp-panel {
  min-height: 0;
  display: none;
  overflow: auto;
}

.hmp-panel.active {
  display: block;
}

.hmp-track-list {
  display: grid;
}

.hmp-track-row {
  width: 100%;
  min-width: 0;
  height: 64px;
  padding: 8px 14px;
  display: grid;
  grid-template-columns: 24px 42px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 9px;
  color: var(--hmp-ink);
  background: #fff;
  border: 0;
  border-bottom: 1px solid #e8ecec;
  text-align: left;
}

.hmp-track-row:hover,
.hmp-track-row:focus-visible {
  background: var(--hmp-soft);
  outline: 0;
}

.hmp-track-row.active {
  background: #e8f4f1;
  box-shadow: inset 3px 0 0 var(--hmp-accent);
}

.hmp-track-order,
.hmp-track-duration {
  color: #8a9699;
  font-size: 10px;
}

.hmp-track-art {
  width: 42px;
  height: 42px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #e3efed;
  background: #26383c;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 800;
}

.hmp-track-art img {
  position: absolute;
  inset: 0;
}

.hmp-track-text {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.hmp-track-text strong,
.hmp-track-text span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hmp-track-text strong {
  font-size: 12px;
}

.hmp-track-text span {
  color: var(--hmp-muted);
  font-size: 10px;
}

.hmp-empty,
.hmp-lyrics-empty {
  margin: 0;
  padding: 46px 18px;
  color: var(--hmp-muted);
  font-size: 12px;
  text-align: center;
}

.hmp-lyrics {
  min-height: 100%;
  padding: 45% 20px;
}

.hmp-lyric-line {
  width: 100%;
  margin: 0;
  padding: 8px 6px;
  display: block;
  color: #718083;
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 13px;
  line-height: 1.65;
  text-align: center;
  transition: color 140ms ease, transform 140ms ease;
}

.hmp-lyric-line.active {
  color: var(--hmp-accent-dark);
  font-weight: 800;
  transform: scale(1.04);
}

.hmp-lyric-line.active .hmp-lyric-char.past {
  color: var(--hmp-accent);
}

.hmp-lyric-line.active .hmp-lyric-char.current {
  color: var(--hmp-warm);
}

.hmp-lyric-line.active .hmp-lyric-char.future {
  color: var(--hmp-ink);
}

.hmp-lyric-line:is(button):hover {
  color: var(--hmp-ink);
}

.hmp-standalone {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  color: var(--hmp-ink);
  background: #edf1f1;
  font-family: "Microsoft YaHei UI", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.hmp-page-header {
  height: 84px;
  padding: 0 max(20px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  gap: 16px;
  color: #fff;
  background: #182326;
  border-bottom: 1px solid #34464a;
}

.hmp-page-header span {
  color: #70cfc1;
  font-size: 10px;
  font-weight: 800;
}

.hmp-page-header h1 {
  margin: 3px 0 0;
  font-size: 23px;
  letter-spacing: 0;
}

.hmp-page-back {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  border: 1px solid #526468;
  border-radius: 4px;
  text-decoration: none;
}

#halo-music-page {
  height: calc(100vh - 84px);
}

.hmp-root.hmp-page-mode {
  height: 100%;
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 74px;
}

.hmp-page-mode .hmp-drawer {
  width: min(1180px, 100%);
  height: auto;
  position: relative;
  right: auto;
  bottom: auto;
  margin: 0 auto;
  z-index: 0;
  grid-row: 1;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.hmp-page-mode .hmp-bar {
  grid-row: 2;
  padding-right: max(18px, calc((100vw - 1180px) / 2));
  padding-left: max(18px, calc((100vw - 1180px) / 2));
}

.hmp-page-mode .hmp-close,
.hmp-page-mode .hmp-library-button {
  display: none;
}

.hmp-page-mode .hmp-drawer-header {
  background: #fff;
  color: var(--hmp-ink);
  border-bottom: 1px solid var(--hmp-line);
}

.hmp-page-mode .hmp-drawer-header .hmp-eyebrow {
  color: var(--hmp-accent);
}

@media (max-width: 820px) {
  .hmp-bar {
    padding: 9px 12px;
    grid-template-columns: 44px minmax(96px, 1fr) auto 36px;
    gap: 8px;
  }
  .hmp-cover-button { width: 44px; height: 44px; }
  .hmp-progress-wrap,
  .hmp-volume-wrap,
  .hmp-mode { display: none; }
  .hmp-transport { gap: 0; }
  .hmp-previous { display: none; }
  .hmp-icon-button { width: 32px; min-width: 32px; }
  .hmp-play { width: 38px; height: 38px; }
  .hmp-drawer {
    width: 100%;
    height: min(72vh, calc(100vh - 74px));
    right: 0;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }
  .hmp-hide-mobile:not(.hmp-page-mode) { display: none; }
  .hmp-hide-mobile:not(.hmp-page-mode) + .hmp-page-spacer { display: none; }
  .hmp-status { right: 10px; left: 10px; max-width: none; }
  .hmp-page-header { height: 76px; padding: 0 14px; }
  .hmp-page-header h1 { font-size: 19px; }
  #halo-music-page { height: calc(100dvh - 76px); }
  .hmp-page-mode .hmp-drawer { height: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .hmp-root *,
  .hmp-root *::before,
  .hmp-root *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
