.ye-card[hidden] {
  display: none !important;
}

.ye-card {
  --ye-accent: #a73e10;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1040;
  box-sizing: border-box;
  width: min(34rem, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  overscroll-behavior: contain;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  background: #fff;
  color: #182331;
  border: 1px solid #d9dee4;
  border-top: 4px solid var(--ye-accent);
  border-radius: 16px;
  box-shadow: 0 18px 72px #15202c40, 0 2px 8px #15202c1a;
  font: 400 1rem/1.55 Verdana, sans-serif;
  text-align: center;
  overflow-wrap: anywhere;
}

.ye-card .ye-offer {
  margin: 0;
  padding-inline: 1.5rem;
  color: var(--ye-accent);
  font: 700 .82rem/1.4 Verdana, sans-serif;
}

.ye-card h2 {
  margin: .8rem 0;
  color: inherit;
  font: 700 clamp(1.35rem, 3vw, 1.85rem)/1.2 Verdana, sans-serif;
  text-transform: none;
  text-wrap: balance;
}

.ye-card .ye-body {
  margin: 0;
  color: inherit;
  font: inherit;
  white-space: pre-line;
}

.ye-card .ye-action {
  display: block;
  box-sizing: border-box;
  width: fit-content;
  max-width: 100%;
  margin: 1.35rem auto .75rem;
  padding: .8rem 1.35rem;
  border-radius: 7px;
  background: var(--ye-accent);
  color: #fff;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.ye-card .ye-action:hover { background: #85320d; }

.ye-card small {
  display: block;
  color: #475661;
  font-size: .8rem;
  line-height: 1.45;
}

.ye-card .ye-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #263744;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.ye-card .ye-close:hover { background: #f3f4f5; }
.ye-card :focus-visible { outline: 3px solid #176bae; outline-offset: 2px; }

/* The existing popup controls the lifetime of its decorative sibling. */
.ye-night-sky { display: none; }
.ye-card:not([hidden]) + .ye-night-sky {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 1039;
  overflow: hidden;
  pointer-events: none;
  background: rgba(18, 29, 43, .28);
}

