
#hh-music-bar{position:fixed;left:50%;transform:translateX(-50%);bottom:12px;width:min(672px,calc(100vw - 16px));z-index:9998;background:#fff;border-radius:16px;box-shadow:0 12px 40px rgba(0,0,0,0.18);overflow:hidden;}
#hh-music-bar[hidden]{display:none;}
#hh-music-bar-main{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:6px;padding:8px 10px 10px;position:relative;}
.hh-mb-left{display:flex;align-items:center;gap:6px;min-width:0;}
.hh-mb-center{display:flex;align-items:center;gap:6px;justify-self:center;}
.hh-mb-right{display:flex;align-items:center;gap:6px;justify-self:end;}
.hh-mb-cover{width:44px;height:44px;border-radius:8px;overflow:hidden;flex-shrink:0;background:linear-gradient(135deg,#e0e7ff,#fbcfe8);}
.hh-mb-cover img{width:100%;height:100%;object-fit:cover;display:block;}
.hh-mb-info{flex:1;min-width:0;padding:0 4px;}
.hh-mb-title{font-size:13px;font-weight:700;color:#111;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.hh-mb-artist{font-size:11px;color:#6b7280;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px;}
.hh-mb-progress{position:absolute;left:0;right:0;bottom:0;height:12px;cursor:pointer;background:transparent;-webkit-tap-highlight-color:transparent;}
.hh-mb-progress::before{content:'';position:absolute;left:0;right:0;bottom:0;height:2px;background:rgba(0,0,0,0.08);pointer-events:none;}
.hh-mb-progress-fill{position:absolute;left:0;bottom:0;height:2px;width:0;background:linear-gradient(90deg,#ec4899,#f97316);transition:width .15s linear;pointer-events:none;}
.hh-mb-btn{width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;border:none;background:#f3f4f6;color:#374151;border-radius:50%;cursor:pointer;flex-shrink:0;text-decoration:none;transition:background .15s,transform .1s;-webkit-tap-highlight-color:transparent;}
#hh-mb-fs[hidden]{display:none;}
.hh-mb-btn:hover{background:#e5e7eb;}
.hh-mb-btn:active{transform:scale(0.92);}
.hh-mb-btn svg{width:18px;height:18px;}
.hh-mb-play{width:40px;height:40px;background:linear-gradient(135deg,#ec4899,#f97316);color:#fff;}
.hh-mb-play:hover{background:linear-gradient(135deg,#db2777,#ea580c);}
.hh-mb-play svg{width:20px;height:20px;}
#hh-music-bar-list{max-height:220px;overflow-y:auto;border-bottom:1px solid #e5e7eb;background:#fff;}
#hh-music-bar-list[hidden]{display:none;}
/* 滚动歌词条 — bar 顶部一行, 渐变粉底, 居中淡入淡出 */
#hh-mb-lyric{display:none;padding:6px 16px 4px;text-align:center;background:linear-gradient(180deg,#fdf2f8,#fff);border-bottom:1px solid #fce7f3;overflow:hidden;}
#hh-mb-lyric.visible{display:block;}
.hh-mb-lyric-text{display:inline-block;font-size:12px;font-weight:600;color:#be185d;line-height:1.3;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;letter-spacing:.2px;opacity:0;transform:translateY(4px);transition:opacity .35s ease, transform .35s ease;}
.hh-mb-lyric-text.show{opacity:1;transform:translateY(0);}
.hh-mb-list-header{display:flex;flex-direction:column;align-items:center;padding:8px 12px 6px;background:#fff;border-bottom:1px solid #f0f0f0;position:sticky;top:0;z-index:1;}
.hh-mb-list-handle{display:block;width:36px;height:4px;border-radius:2px;background:#d1d5db;margin-bottom:6px;}
.hh-mb-list-header-row{display:flex;align-items:center;justify-content:space-between;width:100%;}
.hh-mb-list-htitle{font-size:11px;font-weight:600;color:#9ca3af;letter-spacing:.04em;}
.hh-mb-list-btns{display:flex;gap:2px;}
.hh-mb-list-btn{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;background:transparent;border-radius:6px;color:#9ca3af;cursor:pointer;padding:0;transition:background .15s,color .15s;-webkit-tap-highlight-color:transparent;}
.hh-mb-list-btn:hover{background:#f3f4f6;color:#374151;}
.hh-mb-list-btn.hh-mb-list-btn-on{color:#ec4899;}
.hh-mb-list-btn svg{width:15px;height:15px;}
#hh-mb-cover-img{transition:opacity .15s;}
.hh-mb-list-item{display:flex;align-items:center;gap:10px;padding:8px 12px;cursor:pointer;transition:background .15s;}
.hh-mb-list-item:hover{background:#f3f4f6;}
.hh-mb-list-item.hh-mb-list-active{background:linear-gradient(90deg,rgba(236,72,153,0.08),rgba(249,115,22,0.08));}
.hh-mb-list-cover{width:32px;height:32px;border-radius:6px;overflow:hidden;background:linear-gradient(135deg,#e0e7ff,#fbcfe8);flex-shrink:0;}
.hh-mb-list-cover img{width:100%;height:100%;object-fit:cover;display:block;}
.hh-mb-list-meta{flex:1;min-width:0;}
.hh-mb-list-title{font-size:12px;font-weight:600;color:#111;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.hh-mb-list-artist{font-size:10px;color:#6b7280;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:1px;}
.hh-mb-list-item.hh-mb-list-active .hh-mb-list-title{color:#ec4899;}
.hh-mb-list-eq{display:none;color:#ec4899;font-size:14px;line-height:1;}
.hh-mb-list-item.hh-mb-list-active .hh-mb-list-eq{display:inline;}
#hh-music-bar-pill{position:fixed;bottom:1.5rem;right:max(1rem, calc((100vw - 672px) / 2 - 56px));z-index:9999;width:44px;height:44px;padding:0;background:linear-gradient(135deg,#ec4899,#f97316);border:none;border-radius:50%;box-shadow:0 4px 16px rgba(236,72,153,0.5);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;overflow:visible;-webkit-tap-highlight-color:transparent;touch-action:manipulation;}
#hh-music-bar-pill[hidden]{display:none;}
#hh-music-bar-pill > svg{width:22px;height:22px;animation:hh-pill-pulse 1.4s ease-in-out infinite;}
@keyframes hh-pill-pulse{0%,100%{opacity:1;transform:scale(1);}50%{opacity:.75;transform:scale(1.1);}}
.hh-pill-notes{position:absolute;left:0;right:0;bottom:100%;height:0;pointer-events:none;}
.hh-pill-note{position:absolute;left:50%;bottom:2px;font-size:14px;font-weight:700;color:#ec4899;text-shadow:0 0 6px rgba(236,72,153,0.45);opacity:0;transform:translateX(-50%);animation:hh-pill-note-rise 1.6s ease-out infinite;animation-play-state:paused;will-change:transform,opacity;}
#hh-music-bar-pill.is-playing .hh-pill-note{animation-play-state:running;}
.hh-pill-note:nth-child(2){animation-delay:.55s;}
.hh-pill-note:nth-child(3){animation-delay:1.1s;}
@keyframes hh-pill-note-rise{
  0%   {opacity:0;transform:translate(-50%,0) scale(.55);}
  20%  {opacity:1;transform:translate(calc(-50% - 4px),-10px) scale(1);}
  60%  {opacity:1;transform:translate(calc(-50% + 6px),-26px) scale(1.05);}
  100% {opacity:0;transform:translate(-50%,-46px) scale(1.15);}
}
@media (prefers-reduced-motion: reduce){
  .hh-pill-note{animation:none;}
  #hh-music-bar-pill > svg{animation:none;}
}
/* 最小化过渡 —— bar 慢慢飞向右下角 pill(看得到轨迹, 知道收哪去了)+ pill 弹出 */
#hh-music-bar.hh-mb-collapsing{transition:transform .5s cubic-bezier(.4,.05,.3,1),opacity .45s ease-in .12s;transform-origin:right bottom;transform:translateX(-50%) translate(min(32vw,380px),22px) scale(.12);opacity:0;pointer-events:none;}
@media (max-width:720px){
  #hh-music-bar.hh-mb-collapsing{transform:translate(38vw,14px) scale(.12);transform-origin:right bottom;}
}
#hh-music-bar-pill.hh-mb-pill-pop{animation:hh-pill-pop .42s cubic-bezier(.34,1.56,.64,1);}
@keyframes hh-pill-pop{
  0%   {transform:scale(.2);opacity:0;}
  60%  {transform:scale(1.18);opacity:1;}
  100% {transform:scale(1);opacity:1;}
}
.hh-pill-tip{position:absolute;right:calc(100% + 12px);top:50%;background:#111827;color:#fff;padding:7px 12px;border-radius:10px;font-size:12px;font-weight:600;white-space:nowrap;box-shadow:0 6px 18px rgba(0,0,0,.22);pointer-events:none;opacity:0;transform:translateY(-50%);animation:hh-pill-tip-show 1s ease-out forwards;z-index:10000;}
.hh-pill-tip::after{content:'';position:absolute;left:100%;top:50%;transform:translateY(-50%);border:6px solid transparent;border-left-color:#111827;}
@keyframes hh-pill-tip-show{
  0%   {opacity:0;transform:translateY(-50%) translateX(10px);}
  18%  {opacity:1;transform:translateY(-50%) translateX(0);}
  72%  {opacity:1;transform:translateY(-50%) translateX(0);}
  100% {opacity:0;transform:translateY(-50%) translateX(0);}
}
@media (prefers-reduced-motion: reduce){
  #hh-music-bar.hh-mb-collapsing{transition:opacity .15s ease;transform:translateX(-50%) translateY(0);}
  #hh-music-bar-pill.hh-mb-pill-pop{animation:none;}
  .hh-pill-tip{animation:hh-pill-tip-fade 1s ease forwards;}
  @keyframes hh-pill-tip-fade{0%,90%{opacity:1;}100%{opacity:0;}}
}
@media (max-width:720px){
  #hh-music-bar{width:100%;border-radius:12px 12px 0 0;bottom:0;left:0;transform:none;}
  .hh-mb-btn{width:32px;height:32px;}
  .hh-mb-btn svg{width:16px;height:16px;}
  .hh-mb-play{width:36px;height:36px;}
  .hh-mb-play svg{width:18px;height:18px;}
  #hh-music-bar-pill{right:1rem;bottom:1.5rem;}
}
