.dplayer .player-pause-ad {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
  box-sizing: border-box;
  padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
}
/* Original settings/speed menus expand above the toolbar into the card area.
   Lift only the controls while a card is visible, keeping their existing handlers. */
.dplayer.player-pause-ad-visible .dplayer-controller { z-index: 4; }
.dplayer .player-pause-ad-card {
  position: absolute;
  visibility: hidden;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  overflow: hidden;
  border-radius: 6px;
  background: #202020;
  color: #fff;
  box-shadow: 0 3px 18px rgba(0, 0, 0, .3);
  font-family: inherit;
  font-size: 13px;
  line-height: 20px;
}
.dplayer .player-pause-ad-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  column-gap: 4px;
  height: 40px;
  padding: 0 6px 0 10px;
  box-sizing: border-box;
}
.dplayer .player-pause-ad-label { flex: 0 0 auto; white-space: nowrap; color: #c9c9c9; font-size: 12px; cursor: default; }
.dplayer .player-pause-ad-content {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  color: inherit;
  text-decoration: none;
}
.dplayer .player-pause-ad-image {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 !important;
  padding: 0;
  border: 0;
  border-radius: 0;
  object-fit: contain;
}
.dplayer .player-pause-ad-caption {
  padding: 6px 12px;
  box-sizing: border-box;
  max-height: 56px;
  overflow: hidden;
  font-size: 13px;
  line-height: 20px;
  text-align: left;
}
.dplayer .player-pause-ad-caption strong,
.dplayer .player-pause-ad-caption span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dplayer .player-pause-ad-caption span { color: #c9c9c9; }
.dplayer .player-pause-ad-close {
  position: static;
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 50%;
  background: rgba(0, 0, 0, .75);
  color: #fff;
  font: 24px/28px sans-serif;
  text-align: center;
  cursor: pointer;
}
.dplayer .player-pause-ad-close:focus-visible,
.dplayer .player-pause-ad-content:focus-visible { outline: 2px solid #fadfa3; outline-offset: -2px; }
/* The existing mobile center play button sits under the card. Reuse its original
   toolbar counterpart while the card is visible, with its original click handler. */
.dplayer.dplayer-mobile.player-pause-ad-visible .dplayer-controller .dplayer-icons .dplayer-play-icon { display: inline-block; }
@media (max-width: 600px) {
  .dplayer .player-pause-ad-header { height: 32px; padding: 0 4px; }
  .dplayer .player-pause-ad-close { width: 28px; height: 28px; font-size: 22px; line-height: 24px; }
  .dplayer .player-pause-ad-caption { padding: 4px 8px; font-size: 12px; line-height: 16px; white-space: nowrap; text-overflow: ellipsis; }
  .dplayer .player-pause-ad-caption strong,
  .dplayer .player-pause-ad-caption span { display: inline; }
  .dplayer .player-pause-ad-caption strong + span { margin-left: 8px; }
}
