.scratch-date-target {
  position: relative;
  isolation: isolate;
}
h2.scratch-date-target {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 112px;
  padding: 14px 12px;
  border: 1px solid var(--scratch-line, currentColor);
  border-radius: var(--scratch-radius, 4px);
  background-color: var(--scratch-paper, transparent);
  background-image: var(--scratch-image, none);
  color: var(--scratch-ink, inherit);
  box-shadow: var(--scratch-shadow, none);
  white-space: normal !important;
  overflow-wrap: anywhere;
  line-height: 1.25;
}
.scratch-date-cover {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  font: italic 600 24px/1.5 Georgia, serif;
  letter-spacing: normal;
  word-spacing: normal;
  text-transform: none;
  border-radius: inherit;
  cursor: crosshair;
  touch-action: none;
}
.scratch-date-cover[hidden] { display: none; }
.scratch-date-reveal {
  display: block;
  min-height: 40px;
  margin: 7px auto 16px;
  padding: 5px 10px;
  border: 0;
  background: transparent;
  color: inherit;
  font: 13px/1.5 Studio, Arial, sans-serif;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.scratch-date-reveal[hidden] { display: none; }
.scratch-date-reveal:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.scratch-date-added {
  width: min(90%, 720px);
  margin: 32px auto;
  padding: clamp(18px, 4vw, 32px);
  border: 1px solid var(--scratch-line, #ba9659);
  border-radius: var(--scratch-radius, 4px);
  background: var(--scratch-paper, #fff8eb);
  background-image: var(--scratch-image, none);
  color: var(--scratch-ink, #513b2c);
  box-shadow: var(--scratch-shadow, none);
  text-align: center;
}
.scratch-date-added > p { margin: 0 0 12px; font: 11px/1.5 Studio, Arial, sans-serif; letter-spacing: .15em; text-transform: uppercase; }
.scratch-date-added h2 { margin: 0; font-size: clamp(24px, 5vw, 38px); }
.scratch-date-added .scratch-date-target { border: 0; box-shadow: none; background: transparent; }
.scratch-date-added[data-scratch-theme="royal-linen"] { position: relative; }
.scratch-date-added[data-scratch-theme="royal-linen"]::before {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1px dashed var(--scratch-line);
  opacity: .5;
  pointer-events: none;
}
.scratch-date-added[data-scratch-theme="butterfly-blessings"] { border: 0; border-top: 3px double var(--scratch-line); }
.scratch-date-confetti { position: fixed; inset: 0; z-index: 2147482000; overflow: hidden; pointer-events: none; contain: strict; }
.scratch-date-confetti > i {
  position: absolute;
  top: -20px;
  left: var(--confetti-x);
  width: var(--confetti-size);
  height: calc(var(--confetti-size) * 1.5);
  background: var(--confetti-colour);
  border-radius: 2px;
  animation: scratch-confetti-fall var(--confetti-duration) var(--confetti-delay) linear both;
}
.scratch-date-confetti > i:nth-child(3n) { border-radius: 80% 12% 70% 20%; }
.scratch-date-confetti[data-celebration="rose"] > i:not(:nth-child(5n)) { border-radius: 76% 25% 70% 32%; box-shadow: inset 1px 1px 2px #fff6e82e; }
@keyframes scratch-confetti-fall {
  from { transform: translate3d(-18px, -20px, 0) rotate(0deg); }
  to { transform: translate3d(var(--confetti-drift), calc(100vh + 42px), 0) rotate(630deg); }
}
@media (prefers-reduced-motion: reduce) { .scratch-date-confetti { display: none; } }
@media print { .scratch-date-cover, .scratch-date-reveal, .scratch-date-confetti { display: none !important; } }
