html, body { margin: 0; background: #0b0b0c; -webkit-font-smoothing: antialiased; }
a { color: #e6e6e9; }
a:hover { color: #ffffff; }

@keyframes dcDrop { 0% { translate: 0 -120%; opacity: 0 } 60% { translate: 0 6%; opacity: 1 } 80% { translate: 0 -2% } 100% { translate: 0 0; opacity: 1 } }
@keyframes dcFadeUp { from { opacity: 0; translate: 0 18px } to { opacity: 1; translate: 0 0 } }
@keyframes dcSway { 0%, 100% { transform: rotate(-2.5deg) } 50% { transform: rotate(2.5deg) } }
@keyframes dcTwinkle { 0%, 100% { opacity: 0; transform: scale(.3) rotate(0deg) } 50% { opacity: 1; transform: scale(1) rotate(45deg) } }

.page {
  min-height: 100svh; position: relative; overflow: hidden;
  background: radial-gradient(ellipse 90% 60% at 50% 0%, #2b2b30 0%, #121214 55%, #0a0a0b 100%);
  color: #d9d9de; font-family: Lora, serif; font-style: italic;
}
.bg { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }

.silver {
  background: linear-gradient(100deg, #86868c 0%, #f6f6f8 28%, #9a9aa0 48%, #ffffff 64%, #7a7a80 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- disco balls ---------- */
.disco {
  position: absolute; top: 0; z-index: 0; pointer-events: none;
  display: flex; flex-direction: column; align-items: center;
  transform-origin: top center; translate: 0 -120%;
}
.disco-l { left: max(-7%, calc(50% - 580px)); animation: dcDrop 1.8s cubic-bezier(.3,.9,.4,1) .15s forwards, dcSway 9.8s ease-in-out infinite; }
.disco-r { right: max(-5%, calc(50% - 560px)); animation: dcDrop 1.8s cubic-bezier(.3,.9,.4,1) .45s forwards, dcSway 7.7s ease-in-out infinite; }
.disco-string { width: 1.5px; background: linear-gradient(#3a3a3e, #b9b9be); }
.disco-l .disco-string { height: clamp(6px, 2vh, 70px); }
.disco-r .disco-string { height: clamp(40px, 11vh, 160px); }
.disco-cap { width: 10px; height: 8px; border-radius: 2px; background: linear-gradient(90deg, #77777c, #e6e6e9, #77777c); margin-bottom: -2px; }
.disco-ball { position: relative; border-radius: 50%; box-shadow: 0 0 80px rgba(255,255,255,.16), 0 20px 40px rgba(0,0,0,.5); }
.disco-l .disco-ball { width: clamp(116px, 33vw, 210px); height: clamp(116px, 33vw, 210px); }
.disco-r .disco-ball { width: clamp(90px, 25vw, 160px); height: clamp(90px, 25vw, 160px); }
.disco-ball canvas { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; }
.twinkle { position: absolute; color: #fff; line-height: 1; font-style: normal; }
.twinkle-a { left: 22%; top: 14%; font-size: 22px; text-shadow: 0 0 10px #fff; animation: dcTwinkle 2.6s ease-in-out infinite; }
.twinkle-b { right: 20%; top: 48%; font-size: 13px; text-shadow: 0 0 8px #fff; animation: dcTwinkle 3.4s ease-in-out 1.2s infinite; }

/* ---------- main column ---------- */
main {
  position: relative; z-index: 1; opacity: 0; animation: dcFadeUp 1.1s ease .9s forwards;
  max-width: 520px; margin: 0 auto; padding: clamp(34px, 10vw, 150px) 20px 32px;
  display: flex; flex-direction: column; align-items: center; gap: clamp(14px, 3.5vw, 26px);
  box-sizing: border-box;
}
.title {
  margin: 0; font-family: Lora, serif; font-style: italic; font-weight: 500;
  font-size: clamp(30px, 8.4vw, 64px); line-height: 1; letter-spacing: .01em;
  text-align: center; white-space: nowrap; padding: 0 8px 8px;
}
.title-15 { font-weight: 700; font-size: 1.45em; letter-spacing: 0; }

/* ---------- star ---------- */
.star-wrap {
  width: min(84vw, 430px, 46svh);
  filter: drop-shadow(0 0 6px rgba(255,255,255,.55)) drop-shadow(0 0 26px rgba(235,235,245,.4)) drop-shadow(0 0 60px rgba(220,220,235,.22)) drop-shadow(0 16px 24px rgba(0,0,0,.7));
}
.star { position: relative; width: 100%; aspect-ratio: 1 / 0.9045; container-type: inline-size; }
.star-clip {
  position: absolute; inset: 0; width: 100%; height: 100%;
  clip-path: polygon(50% 0%, 64.69% 32.91%, 97.55% 38.2%, 73.78% 63.83%, 79.39% 100%, 50% 82.92%, 20.61% 100%, 26.22% 63.83%, 2.45% 38.2%, 35.31% 32.91%);
}
.star-inner { inset: 5.5%; width: auto; height: auto; background: radial-gradient(circle at 50% 50%, #2e2e33 0%, #121214 55%, #050506 100%); }
.star-facets { position: absolute; inset: 5.5%; width: 89%; height: 89%; pointer-events: none; }
.star-text {
  position: absolute; left: 17%; right: 17%; top: 38%; bottom: 20%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.4cqw; text-align: center;
}
.star-lead { margin: 0; font-family: Lora, serif; font-style: italic; font-size: 5.2cqw; font-weight: 500; line-height: 1.25; color: #f0f0f2; }
.star-date {
  margin: 0; font-family: Lora, serif; font-style: italic; font-weight: 400; font-size: 9cqw; line-height: 1; letter-spacing: .02em;
  background: linear-gradient(100deg, #9a9aa0, #ffffff 40%, #a4a4aa 60%, #f0f0f2);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cover { touch-action: none; cursor: grab; transition: opacity .9s ease; }
.star-fx { pointer-events: none; }
.revealed .cover { opacity: 0; pointer-events: none; }

.hint { min-height: 16px; margin-top: -6px; font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: #9c9ca3; }
.revealed .hint span { display: none; }

/* ---------- after reveal (locked until the star is scratched) ---------- */
.after {
  display: flex; flex-direction: column; align-items: center; gap: clamp(12px, 3vw, 22px);
  width: 100%; margin-top: -8px; transition: opacity .9s ease; opacity: .12; pointer-events: none;
}
.revealed .after { opacity: 1; pointer-events: auto; }
.name {
  width: 100%; box-sizing: border-box; text-align: center; font-family: 'Pinyon Script', cursive; font-style: normal;
  font-size: clamp(60px, 17vw, 100px); line-height: 1.15; padding: 0 .3em 0 .2em; margin-top: -12px;
  background: linear-gradient(100deg, #8a8a90 0%, #ffffff 35%, #a0a0a6 55%, #f2f2f4 75%, #7e7e84 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.cal { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; }
.cal-btn {
  appearance: none; border: 0; cursor: pointer; min-height: 56px; padding: 0 34px; border-radius: 999px;
  display: flex; align-items: center; gap: 12px;
  font-family: Lora, serif; font-style: italic; font-weight: 700; font-size: 15px; letter-spacing: .08em; text-transform: uppercase;
  color: #0b0b0c; background: linear-gradient(110deg, #a8a8ae 0%, #f7f7f9 30%, #bdbdc2 55%, #ffffff 75%, #9a9aa0 100%);
  box-shadow: 0 0 0 1px rgba(255,255,255,.35) inset, 0 10px 30px rgba(0,0,0,.5), 0 0 28px rgba(255,255,255,.15);
  transition: transform .2s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.cal-btn:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(255,255,255,.5) inset, 0 14px 34px rgba(0,0,0,.55), 0 0 40px rgba(255,255,255,.3); }
.cal-btn:active { transform: translateY(0) scale(.98); }
.cal-icon { font-size: 16px; }
.cal-menu {
  display: flex; flex-direction: column; gap: 8px; width: min(100%, 340px); padding: 10px; box-sizing: border-box; border-radius: 20px;
  background: rgba(24,24,27,.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.14); box-shadow: 0 20px 50px rgba(0,0,0,.6);
}
.cal-menu[hidden] { display: none; }
.cal-item {
  appearance: none; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  min-height: 48px; padding: 0 18px; border-radius: 12px; text-decoration: none; text-align: left;
  color: #ececef; font-family: Lora, serif; font-style: italic; font-size: 15px; font-weight: 600; background: rgba(255,255,255,.04);
}
.cal-item:hover { background: rgba(255,255,255,.1); color: #ffffff; }
.cal-arrow { color: #8d8d94; }
