#mobile-sticky-ad {
  position: fixed;
  bottom: env(safe-area-inset-bottom, 0);
  left: 0;
  width: 100%;
  max-width: 100%;
  z-index: 50;
  background: #f9fafb;
  border-top: 1px solid #ccc;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 4px 0;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.2);
  border-radius: 12px 12px 0 0;
  /* margin-bottom: 10px; */ /* Removed margin, rely on bottom + padding */
}

@media (max-width: 768px) {
  #mobile-sticky-ad {
    display: flex;
    height: 100px;
    padding-bottom: env(safe-area-inset-bottom, 0);
    bottom: calc(env(safe-area-inset-bottom, 0) + 50px); /* Add 50px margin above safe area */
  }
}

@media (max-width: 768px) {
  body.has-mobile-sticky-ad {
    padding-bottom: calc(150px + env(safe-area-inset-bottom, 0)); /* Match ad height + margin */
  }
}

#mobile-sticky-ad-inner {
  width: 320px;
  height: 100px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 0 6px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #333;
}