button.face {
  width: 100%;
  text-align: left;
  border-radius: 0;
}
.media-card-title {
  display: block;
  margin: 12px 0 8px;
  max-width: 94%;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
.media-cover {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}
.face.with-cover {min-height: clamp(164px, 19vw, 200px);}
.face.has-cover {
  color: #fff;
  justify-content: flex-end;
}
.face.has-cover .art { display: none; }
.face.has-cover .media-cover { opacity: 1; }
.face.has-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg,rgba(8,17,12,.16),rgba(8,17,12,.04) 22%, rgba(8,17,12,.68) 60%, rgba(8,17,12,.90));
}
.face.has-cover .branded {
  align-self: flex-start;
  margin-bottom: auto;
  padding: 2px 6px;
  background: rgba(15,31,22,.8);
  color: #fff;
  border-radius: 4px;
}
.face.has-cover .sign {background: transparent;border-color: #f2f6eb66;color: inherit;}
.face.has-cover .media-card-title {text-shadow: 0 1px 3px #0008;}
.face.has-cover .face-meta {margin-top: 0;background: #fafcf4ec;}
.media-external {display: inline-flex;align-items: center;min-height: 29px;padding: 4px 10px;text-decoration: none;}
.media-external:hover, .media-external:focus-visible {text-decoration: underline;}
.media-player {background: #17241e;color: #fff;}
.media-frame {background: #101510;border: 0;width: 100%;display: block;aspect-ratio: 16 / 9;}
.media-player.douyin .media-frame {height: clamp(240px,52vh,405px);height: clamp(240px,52dvh,405px);aspect-ratio: auto;}
.media-player .media-playing-title {margin: 0;padding: 11px 14px 0;font-size: 14px;line-height: 1.5;font-weight: 650;color: #fff;}
.media-player-controls {display: flex;align-items: center;gap: 12px;padding: 1px 14px 5px;flex-wrap: wrap;}
.media-player-controls a, .media-player-controls button {font: inherit;font-size: 13px;color: #eef2e7;text-decoration: none;min-height: 40px;display: inline-flex;align-items: center;padding: 0 2px;}
.media-player-controls a {margin-right: auto;}
.media-player-controls :focus-visible {outline-color: #e6eddc;}
.media-player:fullscreen {display: flex;flex-direction: column;background:#101510;}
.media-player:fullscreen .media-frame {width: 100%;height: 0;min-height: 0;aspect-ratio:auto;flex: 1;}
.media-play-help {margin:0;padding:7px 12px;color:#e8eee7;background:#25382d;font-size:12px;line-height:1.5;}
.extra .media-extra-play, .media-extra-details {flex: 1;text-align: left;min-width: 0;font-size: 13px;line-height:1.6;padding: 9px 0;color:#344d3b;}
.extra .media-extra-play {border: 0;display: block;}
.media-extra-play small {display: inline-block;margin-left: 7px;color:#526950;}
.media-extra-details a {display: inline-block;white-space:nowrap;margin-inline-start:7px;padding:4px 0;color: #526950;font-size:12px;text-decoration: underline;text-underline-offset:2px;}
@media(max-width:650px){
  .media-card-title {font-size: 19px;line-height: 1.46;max-width: 97%;margin: 9px 0 7px;}
  .face.with-cover {min-height: clamp(170px,51vw,215px);}
  .media-external {min-height:36px;}
}

.school-course-view {
  position: relative;
  width: 100%;
  aspect-ratio: 1280 / 770;
  overflow: hidden;
  background: #fff;
}
.media-player.xiaohongshu-school .school-course-view .media-frame {
  position: absolute;
  inset: 0 auto auto 0;
  width: 1280px;
  max-width: none;
  height: 1280px;
  aspect-ratio: auto;
  transform-origin: left top;
}
.media-player.xiaohongshu-school:fullscreen .school-course-view {
  width: min(100%, calc((100dvh - 140px) * 1.6623));
  margin: auto;
}
.school-course-view.mobile-course { aspect-ratio: 375 / 376; }
.media-player.xiaohongshu-school .mobile-course .media-frame { width: 375px; height: 376px; }
.media-player.xiaohongshu-school:fullscreen .mobile-course {
  width: min(100%, calc((100dvh - 140px) * 375 / 376));
}

.media-player.xiaohongshu-school .media-play-help {color: #eef2e7;}

dialog.media-player.acfun {
  position: static;
  width: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
}
.acfun-player-view {
  position: relative;
  width: 100%;
  aspect-ratio: 560 / 355;
  overflow: hidden;
  background: #101010;
}
.acfun-screen { display: contents; }
.acfun-screen:fullscreen { display: flex; flex-direction: column; background: #101010; }
.media-player.acfun .acfun-player-view .media-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: none;
  aspect-ratio: auto;
}
.media-player.acfun .acfun-enlarge { display: none; }
@media (max-width: 650px) {
  .media-player.acfun .acfun-enlarge { display: inline-flex; }
  .media-player.acfun [data-player-fullscreen] { display: none; }
}
.acfun-screen:fullscreen .acfun-player-view { flex: 1; min-height: 0; aspect-ratio: auto; }
dialog.media-player.acfun.expanded-player, .media-player.acfun.expanded-player .acfun-screen:fullscreen {
  position: fixed;
  inset: 0;
  height: 100%;
  height: 100dvh;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  background: #101010;
  color: #fff;
}
.media-player.acfun.expanded-player .acfun-player-view { height: 100%; aspect-ratio: auto; }
.media-player.acfun.expanded-player .media-playing-title,
.media-player.acfun.expanded-player .media-player-controls > :not(.acfun-enlarge) { display: none; }
.media-player.acfun.expanded-player .media-player-controls {
  justify-content: center;
  padding: 4px 12px max(4px, env(safe-area-inset-bottom));
}
.media-player.acfun.expanded-player .acfun-enlarge {
  display: inline-flex;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  color: #fff;
  background: #263b30;
  border-radius: 8px;
}

/* Keep the complete official player centered as the phone rotates. */
.douyin-player-view {
  position: relative;
  width: 100%;
  height: min(68vh, 480px);
  height: min(68dvh, 480px);
  background: #101010;
  overflow: hidden;
  overflow: clip;
  contain: paint;
}
.douyin-player-view.wide { height: auto; aspect-ratio: 960 / 575; }
.media-player.douyin .douyin-player-view .media-frame {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  max-height: none;
  transform-origin: top left;
}
html.zx-video-expanded { overflow: hidden; }
.media-player.douyin.expanded-player { position: fixed; inset: 0; z-index: 2000; }
.media-player.douyin:is(:fullscreen, .expanded-player) { display: block; background: #101010; padding: 0; }
.media-player.douyin:is(:fullscreen, .expanded-player) .douyin-player-view { width: 100%; height: 100%; }
.media-player.douyin:is(:fullscreen, .expanded-player) :is(.media-play-help, .media-playing-title) { display: none; }
.media-player.douyin:is(:fullscreen, .expanded-player) .media-player-controls {
  position: absolute;
  z-index: 2;
  top: max(4px, env(safe-area-inset-top));
  inset-inline-start: max(6px, env(safe-area-inset-left));
  padding: 0;
}
.media-player.douyin:is(:fullscreen, .expanded-player) .media-player-controls > :not([data-player-fullscreen]) { display: none; }
.media-player.douyin:is(:fullscreen, .expanded-player) [data-player-fullscreen] {
  min-height: 32px;
  padding: 2px 9px;
  color: #fff;
  border-radius: 16px;
  background: #111c;
}
