.hero {
  min-height: 0;
  align-items: start;
  background: var(--gold);
}

.hero-inner {
  padding-block: 24px 16px;
}

.hero::before {
  content: none;
}

.advent-hero-art {
  width: 100%;
  height: clamp(120px, 24svh, 200px);
  margin-top: 14px;
  border-radius: 12px;
  object-fit: cover;
  object-position: center 25%;
}

.calendar {
  padding-top: clamp(16px, 3svh, 28px);
}

.day[aria-current="date"]:focus {
  outline: 3px solid #2280d4;
  outline-offset: 3px;
}

.advent-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 18px;
}

.advent-hero-actions .text-button {
  min-height: 44px;
  color: #242014;
  font-weight: 700;
}

.gift[data-state="archive"] .advent-gift-lead {
  display: none;
}

.gift[data-pace="slow"] {
  --box-wait: 1.3s;
}

.gift[data-reveal="waiting"] .gift-actions {
  visibility: hidden;
  pointer-events: none;
}

@media (min-width: 980px) {
  .masthead {
    width: min(1280px, calc(100% - 48px));
  }

  main {
    --page-edge: max(24px, (100vw - 1280px) / 2);
    display: grid;
    grid-template-columns: minmax(0, .88fr) minmax(0, 1fr);
  }

  .hero {
    border-radius: 0 20px 20px 0;
  }

  .hero-inner {
    width: auto;
    margin-inline: var(--page-edge) 24px;
    padding-block: clamp(34px, 7svh, 72px) 28px;
  }

  .hero h1 {
    font-size: clamp(30px, 3.28vw, 48px);
  }

  .hero .primary span {
    transform: rotate(-90deg);
  }

  .advent-hero-art {
    height: clamp(210px, 36svh, 344px);
    margin-top: 22px;
  }

  .calendar {
    width: auto;
    margin-inline: clamp(20px, 3vw, 48px) var(--page-edge);
    padding-block: clamp(34px, 7svh, 72px) 36px;
  }

  .day {
    min-height: clamp(57px, 9svh, 77px);
    padding-inline: 8px;
  }
}

@media (max-width: 380px) {
  .hero-inner {
    padding-block: 20px 12px;
  }

  .advent-hero-art {
    height: clamp(110px, 21svh, 155px);
    margin-top: 10px;
  }

  .hero h1 {
    font-size: clamp(23px, 7.5vw, 28px);
  }

  .advent-hero-actions {
    gap: 0 12px;
  }

  .advent-hero-actions .text-button {
    font-size: 13px;
  }
}

.advent-lead {
  position: fixed;
  box-sizing: border-box;
  width: min(460px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: clamp(20px, 5vw, 32px);
  overflow: auto;
  border: 0;
  border-radius: 16px;
  color: #131b23;
  background: #f8fbff;
  color-scheme: light;
  box-shadow: 0 18px 64px #080f1c52;
  scrollbar-gutter: stable;
}

.advent-lead::backdrop {
  background: #0c1520b8;
}

.advent-lead-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #c8d3df;
  border-radius: 50%;
  color: #131b23;
  background: #fff;
}

.advent-lead-close:hover {
  background: #eff3f7;
}

.advent-lead-heading h2 {
  padding-right: 40px;
  font: 800 clamp(20px, 4vw, 26px)/1.22 var(--display);
  letter-spacing: -.025em;
  text-wrap: balance;
}

.advent-lead-heading p {
  margin-top: 10px;
  color: #465769;
  font-size: 15px;
  line-height: 1.45;
}

.advent-lead-form {
  display: grid;
  gap: 13px;
  margin-top: 20px;
}

.advent-lead-form label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 650;
}

.advent-lead-form input:not([type="checkbox"]) {
  width: 100%;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid #aebccd;
  border-radius: 8px;
  background: #fff;
  color: #131b23;
  font-size: 16px;
  font-weight: 400;
}

.advent-lead-form .advent-lead-consent {
  grid-template-columns: 19px 1fr;
  align-items: start;
  gap: 9px;
  color: #465769;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}

.advent-lead-consent input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #9c7000;
}

.advent-lead-consent a {
  color: #274c70;
  text-underline-offset: 2px;
}

.advent-lead-form button:disabled {
  background: #e6d9a8;
  cursor: wait;
}

.advent-lead-status {
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.45;
}

.advent-lead-status[data-state="error"] { color: #972b25; }
.advent-lead-status[data-state="success"] { color: #14583e; }
.day[data-state="future"] {
  cursor: pointer;
}

.day[data-state="future"]:active {
  transform: scale(.97);
}

.advent-toast {
  position: fixed;
  z-index: 40;
  top: 0;
  left: 0;
  width: max-content;
  max-width: min(290px, calc(100vw - 24px));
  padding: 11px 14px;
  border: 1px solid #d4e1ed;
  border-radius: 14px;
  background: #f8fbff;
  color: #101720;
  box-shadow: 0 14px 36px #050a1299;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px) scale(.96);
  transform-origin: var(--arrow-x, 50%) 100%;
  transition: opacity .2s ease, transform .2s cubic-bezier(.19, 1, .22, 1);
}

.advent-toast[data-side="bottom"] {
  transform: translateY(-6px) scale(.96);
  transform-origin: var(--arrow-x, 50%) 0%;
}

.advent-toast[data-visible="true"] {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.advent-toast::after {
  content: "";
  position: absolute;
  left: var(--arrow-x, 50%);
  width: 11px;
  height: 11px;
  background: #f8fbff;
  border-right: 1px solid #d4e1ed;
  border-bottom: 1px solid #d4e1ed;
  transform: translateX(-50%) rotate(45deg);
  bottom: -6px;
}

.advent-toast[data-side="bottom"]::after {
  bottom: auto;
  top: -6px;
  transform: translateX(-50%) rotate(225deg);
}

.advent-toast-date {
  display: block;
  margin-bottom: 3px;
  color: #53616d;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .01em;
}

.advent-toast-text {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.38;
}

.gift-condition {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  padding: 5px 12px;
  border: 1px solid #e7cd63;
  border-radius: 999px;
  background: #fff3bd;
  color: #3a2d00;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.gift[data-state="archive"] .gift-condition {
  border-color: #cbd8e5;
  background: #eaf1f8;
  color: #3c5064;
}

@media (max-width: 650px) {
  .gift-condition {
    margin-top: 10px;
    font-size: 12px;
  }
}
