/* 留言弹幕 */
#dm-layer {
  position: fixed;
  left: 0;
  right: 0;
  top: 78px;
  height: 136px;
  overflow: hidden;
  pointer-events: none;
  z-index: 850;
}

.dm-item {
  position: absolute;
  left: 100%;
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(18, 48, 78, 0.42);
  color: #fff;
  font: 13px/1.5 system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  will-change: transform;
}

@keyframes dm-fly {
  from { transform: translateX(0); }
  to { transform: translateX(var(--dm-dist, -1400px)); }
}

@media (max-width: 767px) {
  #dm-layer {
    top: 62px;
    height: 88px;
  }

  .dm-item {
    font-size: 12px;
    padding: 2px 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #dm-layer { display: none; }
}

/* 很长的弹幕自动收一点字号，仍然完整显示 */
.dm-item.is-long {
  font-size: 12px;
  opacity: 0.92;
}

@media (max-width: 767px) {
  .dm-item.is-long {
    font-size: 11px;
  }
}
