.nhfm-dock {
  --nhfm-accent: #fff;
  position: fixed;
  z-index: 32;
  left: max(1rem, env(safe-area-inset-left));
  bottom: max(1rem, env(safe-area-inset-bottom));
  width: min(370px, calc(100vw - 5.5rem));
  color: #f8f8f8;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: bottom .62s cubic-bezier(.16,1,.3,1), opacity .35s ease, transform .45s cubic-bezier(.16,1,.3,1);
}

.nanohex-focus-app.is-session .nhfm-dock {
  opacity: .72;
  transform: translateY(0) scale(.985);
}

.nanohex-focus-app.is-session .nhfm-dock:hover,
.nanohex-focus-app.is-session .nhfm-dock:focus-within {
  opacity: 1;
  transform: translateY(-2px) scale(1);
}

.nanohex-focus-app.is-paused .nhfm-dock {
  bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 270px);
  opacity: 1;
  transform: translateY(-4px) scale(1);
}

.nhfm-dock-panel {
  overflow: hidden;
  background: rgba(12, 12, 12, .68);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0,0,0,.3);
  backdrop-filter: blur(24px) saturate(135%);
  -webkit-backdrop-filter: blur(24px) saturate(135%);
  transform-origin: left bottom;
  transition: opacity .35s ease, transform .45s cubic-bezier(.16,1,.3,1), visibility .35s ease;
}

.nhfm-dock.is-collapsed .nhfm-dock-panel {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(16px) scale(.88);
}

.nhfm-dock-toggle {
  position: absolute;
  left: 0;
  bottom: 0;
  display: none;
  min-width: 76px;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  color: #fff;
  background: rgba(12,12,12,.68);
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 999px;
  box-shadow: 0 18px 50px rgba(0,0,0,.26);
  backdrop-filter: blur(20px) saturate(135%);
  -webkit-backdrop-filter: blur(20px) saturate(135%);
  cursor: pointer;
  font-size: 12px;
  letter-spacing: .08em;
  transition: background .25s ease, transform .3s cubic-bezier(.16,1,.3,1);
}

.nhfm-dock.is-collapsed .nhfm-dock-toggle { display: inline-flex; }
.nhfm-dock-toggle:hover,
.nhfm-dock-toggle:focus-visible { background: rgba(20,20,20,.88); outline: none; transform: translateY(-2px); }

.nhfm-dock-pulse {
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(255,255,255,.5);
  animation: nhfm-pulse 2.4s ease-out infinite;
}

.nhfm-dock-head {
  display: flex;
  height: 36px;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 14px;
  color: rgba(255,255,255,.45);
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .22em;
}

.nhfm-dock-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nhfm-dock-head button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  color: rgba(255,255,255,.62);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: color .25s ease, background .25s ease, transform .32s cubic-bezier(.16,1,.3,1);
}
.nhfm-dock-head button:hover,
.nhfm-dock-head button:focus-visible { color: #fff; background: rgba(255,255,255,.08); outline: none; transform: translateY(-1px) scale(1.08); }

.nhfm-lyric-line {
  overflow: hidden;
  min-height: 34px;
  padding: 9px 14px 8px;
  color: rgba(255,255,255,.78);
  background: rgba(255,255,255,.035);
  border-bottom: 1px solid rgba(255,255,255,.07);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .28s ease, background .28s ease, opacity .28s ease, transform .36s cubic-bezier(.16,1,.3,1);
}

.nhfm-lyric-line.is-switching {
  animation: nhfm-lyric-switch .48s cubic-bezier(.16,1,.3,1) both;
}

.nhfm-player-mount { min-height: 66px; }
.nhfm-player-message { margin: 0; padding: 12px 14px 14px; color: rgba(255,255,255,.62); font-size: 12px; line-height: 1.6; }

.nhfm-dock .aplayer {
  margin: 0;
  color: #202020;
  background: rgba(255,255,255,.94);
  border-radius: 0 0 17px 17px;
  box-shadow: none;
}

.nhfm-dock .aplayer .aplayer-pic { border-radius: 0 0 0 17px; }
.nhfm-dock .aplayer .aplayer-list { background: rgba(255,255,255,.97); }
.nhfm-dock .aplayer .aplayer-list ol { max-height: min(260px, 42vh) !important; }
.nhfm-dock .aplayer .aplayer-info .aplayer-music { margin-bottom: 10px; }
.nhfm-dock .aplayer .aplayer-info { padding-top: 12px; }
.nhfm-dock .aplayer .aplayer-icon-forward { display: inline-block !important; }
.nhfm-dock .aplayer .aplayer-lrc { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.nhfm-dock meting-js { display: block; }

@keyframes nhfm-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,.45); }
  70%, 100% { box-shadow: 0 0 0 9px rgba(255,255,255,0); }
}

@keyframes nhfm-lyric-switch {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .nhfm-dock {
    left: max(.7rem, env(safe-area-inset-left));
    bottom: max(.7rem, env(safe-area-inset-bottom));
    width: min(330px, calc(100vw - 4.6rem));
  }
  .nanohex-focus-app.is-paused .nhfm-dock { bottom: calc(max(.7rem, env(safe-area-inset-bottom)) + 282px); }
}

@media (max-height: 560px) and (orientation: landscape) {
  .nhfm-dock { width: min(330px, 42vw); }
  .nanohex-focus-app.is-paused .nhfm-dock { bottom: calc(max(.7rem, env(safe-area-inset-bottom)) + 150px); }
  .nhfm-dock .aplayer .aplayer-list ol { max-height: 26vh !important; }
}

@media (prefers-reduced-motion: reduce) {
  .nhfm-dock,
  .nhfm-dock-panel,
  .nhfm-dock-toggle,
  .nhfm-dock-pulse,
  .nhfm-lyric-line { animation: none !important; transition-duration: .01ms !important; }
}

/* 1.1.0 loading state and CDN fallback */
.nhfm-player-loading {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  color: rgba(255,255,255,.62);
  font-size: 12px;
}
.nhfm-player-loading[hidden] { display: none !important; }
.nhfm-player-loading span {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255,255,255,.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: nhfm-spin .8s linear infinite;
}
.nhfm-player-loading em { font-style: normal; letter-spacing: .04em; }
.nhfm-native-player {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 12px 14px 14px;
  color: #202020;
  background: rgba(255,255,255,.95);
  border-radius: 0 0 17px 17px;
}
.nhfm-native-meta { min-width: 0; display: grid; gap: 2px; }
.nhfm-native-meta strong,
.nhfm-native-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nhfm-native-meta strong { font-size: 13px; }
.nhfm-native-meta span { color: rgba(0,0,0,.5); font-size: 11px; }
.nhfm-native-player audio { grid-column: 1 / -1; width: 100%; height: 34px; }
.nhfm-native-actions { display: flex; gap: 6px; }
.nhfm-native-actions button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  color: #222;
  background: rgba(0,0,0,.06);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
@keyframes nhfm-spin { to { transform: rotate(360deg); } }
