.xcat-ad-slot[hidden], .xcat-ad-slot [hidden], .xcat-ad-consent[hidden] { display: none !important; }

.xcat-ad-slot {
  position: absolute;
  inset-inline-end: calc(clamp(18px, 5vw, 72px) + var(--safe-r));
  inset-block-end: calc(68px + var(--safe-b));
  width: min(292px, calc(100vw - 36px - var(--safe-l) - var(--safe-r)));
  padding: 12px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  border: 1px solid #a3c9be4a;
  border-inline-start: 3px solid var(--xcat-ad-accent, #9ce0d0);
  border-radius: 7px;
  background: #071e25f2;
  color: #f0f5f2;
  pointer-events: auto;
}

.xcat-ad-art {
  display: block;
  width: 62px;
  height: 62px;
  border-radius: 3px;
  object-fit: contain;
  flex: none;
}

.xcat-ad-copy { min-width: 0; overflow-wrap: anywhere; }
.xcat-ad-slot p { margin: 0; }
.xcat-ad-label { display: block; margin-bottom: 4px; color: #bbd8d5; font-size: 10px; line-height: 1.3; }
.xcat-ad-slot .xcat-ad-brand { color: #c6e5df; font-size: 11px; line-height: 1.35; }
.xcat-ad-slot .xcat-ad-title { font-size: 14px; font-weight: 600; line-height: 1.3; }
.xcat-ad-slot .xcat-ad-body { margin-top: 4px; color: #cee3df; font-size: 11px; line-height: 1.4; }
.xcat-ad-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #d2f5ed;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.xcat-ad-consent .notice { margin-bottom: 0; }

.xcat-ad-slot.xcat-ad-banner {
  box-sizing: border-box;
  width: min(360px, calc(100vw - 36px - var(--safe-l) - var(--safe-r)));
  display: grid;
  gap: 0;
  padding: 8px;
}

.xcat-ad-banner .xcat-ad-art {
  width: 100%;
  height: auto;
}

.xcat-ad-banner .xcat-ad-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  column-gap: 10px;
  padding: 2px 4px 0;
}

.xcat-ad-banner .xcat-ad-label { margin: 0; }
.xcat-ad-banner :is(.xcat-ad-brand, .xcat-ad-title, .xcat-ad-body) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.xcat-ad-banner .xcat-ad-link {
  color: var(--xcat-ad-accent);
  font-size: 13px;
  font-weight: 600;
}

.xcat-ad-link:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

[data-xcat-ad-inline] .xcat-ad-slot {
  position: relative;
  inset: auto;
  box-sizing: border-box;
  width: min(360px, 100%);
  margin-block: 16px 4px;
}

[data-xcat-ad-inline="play-pause-card"] .xcat-ad-banner {
  grid-template-columns: min(42%, 132px) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

[data-xcat-ad-inline="play-pause-card"] .xcat-ad-copy {
  flex-direction: column;
  align-items: flex-start;
}

@media (max-width: 700px) and (orientation: portrait) {
  body[data-phase="paused"] #menu-overlay:has([data-xcat-ad-inline]) {
    align-items: flex-end;
    padding-block: 0 calc(20px + var(--safe-b));
    background: linear-gradient(0deg, #041a23ee, #041a23aa 38%, transparent 72%);
  }

  body[data-phase="paused"] #menu-overlay:has([data-xcat-ad-inline]) .modal {
    max-height: min(270px, 43dvh);
  }

  body[data-phase="paused"][data-menu-visible="true"] #ui-root:has([data-xcat-ad-inline]) .route-mini {
    top: calc(76px + var(--safe-t));
    bottom: auto;
  }
}
