.advent-lock {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 7;
  overflow: hidden;
  touch-action: none;
  background: radial-gradient(ellipse at 49% 40%, #fbf6e7c9, #e9debfed),
    repeating-linear-gradient(110deg, #a58d6320 0 1px, transparent 1px 4px);
  backdrop-filter: blur(5px);
  box-shadow: inset 0 0 36px #99845c35;
  color: #5c4828;
  transition: opacity .3s ease .48s;
}
.advent-band { width: 100%; text-align: center; }
.advent-seal {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: clamp(72px, 12vw, 116px);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.advent-seal:focus-visible { outline: 2px solid #786335; outline-offset: 4px; }
.advent-ribbon {
  position: absolute;
  top: 23%;
  bottom: 23%;
  width: 50%;
  border-block: 1px solid #d3b877;
  box-shadow: inset 0 2px #091a2b, inset 0 -2px #091a2b, 0 4px 10px #38281358;
  background: repeating-linear-gradient(0deg, #ffffff09 0 1px, transparent 1px 3px),
    linear-gradient(170deg, #284766, #142e49 52%, #091a2b);
  transition: transform .8s cubic-bezier(.52,.07,.34,1), opacity .65s ease;
}
.advent-ribbon-left { left: 0; }
.advent-ribbon-right { right: 0; }
.advent-wax {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(68px, 12vw, 100px);
  aspect-ratio: 1;
  border: 2px solid #b48743;
  border-radius: 47% 53% 51% 49% / 52% 45% 55% 48%;
  background: radial-gradient(ellipse at 32% 22%, #f5dfab, #c7974c 68%, #87612b);
  color: #513416;
  box-shadow: inset 0 2px 4px #fff4d1, inset 0 -3px 5px #5e381c8f, 1px 5px 9px #241c17a3;
  font: 600 clamp(16px, 3.4vw, 23px)/1 var(--serif);
  letter-spacing: .07em;
  text-shadow: 0 1px #ffe7b3;
  transition: transform .65s cubic-bezier(.21,.56,.34,1), opacity .6s ease;
}
.advent-wax::before, .advent-wax::after {
  content: "";
  position: absolute;
  inset: 10%;
  border: 1px solid #7f562e86;
  border-radius: 50%;
  box-shadow: 0 1px #ffe1a5b0;
}
.advent-wax::after {
  inset: 15%;
  border-style: dotted;
  box-shadow: none;
  opacity: .65;
}
.advent-wax span { position: relative; }
.advent-date, .advent-status {
  margin: 10px 18px 0;
  font: italic clamp(13px, 2.5vw, 17px)/1.4 var(--serif);
}
.advent-status { min-height: 2.8em; margin-top: 5px; color: #71562c; }
.advent-demo {
  position: absolute;
  bottom: clamp(15px, 5%, 40px);
  padding: 8px;
  border: 0;
  background: transparent;
  color: #77674c;
  font: italic 12px/1.3 var(--serif);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.advent-lock.is-ready .advent-wax { animation: advent-glow 2.8s ease-in-out infinite; }
@keyframes advent-glow {
  50% { box-shadow: inset 0 2px 4px #fff4d1, inset 0 -3px 5px #5e381c8f, 0 0 26px 6px #f7d98aad; }
}
.advent-lock.is-opening { opacity: 0; }
.advent-lock.is-opening .advent-wax {
  animation: none;
  transform: translateY(-22px) scale(1.04);
  opacity: 0;
}
.advent-lock.is-opening .advent-ribbon-left { transform: translateX(-100%); opacity: 0; }
.advent-lock.is-opening .advent-ribbon-right { transform: translateX(100%); opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .advent-lock, .advent-lock * { animation: none !important; transition: none !important; }
}
