.intro-video {
  --intro-edge: 24px;
  --intro-bottom: calc(var(--intro-edge) + env(safe-area-inset-bottom, 0px));
  position: fixed;
  z-index: 18;
  left: max(var(--intro-edge), env(safe-area-inset-left, 0px));
  bottom: var(--intro-bottom);
  width: 256px;
  color: var(--sand);
  font-family: 'Inter', sans-serif;
}
.intro-video, .intro-video *, .intro-player, .intro-player * { box-sizing: border-box; }
.intro-video[hidden] { display: none; }
body:has(.back-top:not([hidden])) .intro-video { bottom: calc(var(--intro-bottom) + 64px); }
.intro-video__open {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: var(--r-soft);
  background: var(--ink);
  color: inherit;
  font: inherit;
  overflow: hidden;
  cursor: pointer;
}
.intro-video__preview { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.intro-video__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--rule);
  border-radius: var(--r-pill);
  background: rgb(16 13 11 / 80%);
  color: var(--sand);
}
.intro-video__play::before {
  content: "";
  width: 15px;
  height: 16px;
  background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  transform: translateX(1px);
}
.intro-video__dismiss, .intro-player__close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  display: grid;
  place-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 0;
  background: rgb(16 13 11 / 90%);
  color: var(--sand);
  font: 28px/1 'Inter', sans-serif;
  cursor: pointer;
}
.intro-video :focus-visible, .intro-player :focus-visible { outline: 2px solid var(--fire); outline-offset: -3px; }
.intro-player {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--sand);
  background: rgb(16 13 11 / 94%);
}
.intro-player[open] { display: grid; place-content: center; }
.intro-player::backdrop { background: rgb(16 13 11 / 80%); }
.intro-player__screen { width: min(calc(100vw - 32px), calc((100dvh - 128px) * 16 / 9), 1280px); aspect-ratio: 16 / 9; }
.intro-player iframe { display: block; width: 100%; height: 100%; border: 0; }
.intro-player__close { top: max(16px, env(safe-area-inset-top, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); }
.intro-player-open { overflow: hidden; }
@media (max-width: 767px) {
  .intro-video { width: 128px; }
  .intro-video__preview { aspect-ratio: 9 / 16; }
  .is-sbar .intro-video { --intro-bottom: calc(var(--sbar-h, 72px) + var(--intro-edge) + env(safe-area-inset-bottom, 0px)); }
}
@media (orientation: landscape) and (max-height: 540px) {
  .intro-player__screen { width: min(calc(100vw - 128px), calc((100dvh - 32px) * 16 / 9)); }
}
