.home-event-popup {
  position: fixed;
  inset: auto 24px 24px auto;
  width: min(410px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  box-sizing: border-box;
  overflow-y: auto;
  margin: 0;
  padding: 30px;
  border: 1px solid rgba(43, 39, 30, .14);
  border-radius: 8px;
  background: var(--cream, #f7f5f0);
  color: var(--ink, #28261f);
  box-shadow: 0 18px 58px rgba(23, 21, 17, .22);
}

.home-event-popup::backdrop {
  background: rgba(29, 27, 22, .38);
  backdrop-filter: blur(2px);
}

.home-event-popup[open] {
  animation: home-event-popup-in .24s ease-out both;
}

.home-event-popup-close {
  position: absolute;
  top: 9px;
  right: 12px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: 300 26px/1 Inter, sans-serif;
  cursor: pointer;
}

.home-event-popup-eyebrow {
  margin: 0 40px 10px 0;
  color: var(--gold-deep, #74633b);
  font: 600 10px/1.4 Inter, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.home-event-popup h2 {
  max-width: 15ch;
  margin: 0 30px 10px 0;
  font: 500 clamp(23px, 3vw, 30px)/1.12 "Noto Serif", Georgia, serif;
  letter-spacing: -.025em;
}

.home-event-popup > p:not(.home-event-popup-eyebrow) {
  margin: 0;
  color: var(--ink-65, #625f56);
  font: 400 14px/1.6 Inter, sans-serif;
}

.home-event-popup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}

.home-event-popup-actions a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid var(--ink, #28261f);
  border-radius: 999px;
  color: var(--ink, #28261f);
  font: 600 10px/1.2 Inter, sans-serif;
  letter-spacing: .055em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

.home-event-popup-actions .home-event-popup-primary {
  background: #373326;
  border-color: #373326;
  color: #fff !important;
  -webkit-text-fill-color: #fff;
}

.home-event-popup-actions a:hover {
  opacity: .82;
}

.home-event-popup-details {
  display: inline-block;
  margin-top: 16px;
  color: var(--ink-65, #625f56);
  font: 500 12px/1.4 Inter, sans-serif;
  text-underline-offset: 3px;
}

.home-event-popup a:focus-visible,
.home-event-popup button:focus-visible {
  outline: 2px solid var(--gold-deep, #74633b);
  outline-offset: 3px;
}

@keyframes home-event-popup-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 520px) {
  .home-event-popup {
    inset: auto 12px calc(12px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-height: calc(100vh - 24px - env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - 24px - env(safe-area-inset-bottom, 0px));
    padding: 26px 22px 22px;
  }
  .home-event-popup-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .home-event-popup-actions a {
    padding-inline: 9px;
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-event-popup[open] { animation: none; }
}
