/* A secret entrance, little chapter invitations, and birthday flowers. */
.birthday-locked { overflow: hidden; min-height: 100svh; }
.lock-screen {
  position: fixed; inset: 0; z-index: 170; overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column; align-items: center; padding: 30px 20px;
  background: radial-gradient(ellipse at 8% 15%, #f2d1dd 0, transparent 38%),
    radial-gradient(ellipse at 92% 85%, #f8e9c9 0, transparent 35%), #fff5f7;
  overscroll-behavior: contain;
}
.lock-card {
  position: relative; z-index: 2; flex-shrink: 0; width: min(100%, 530px);
  margin-top: auto; padding: 29px 36px 25px; text-align: center;
  background: #fffdf9f5; border: 1px solid #e8bdcd; border-radius: 22px;
  box-shadow: 0 20px 80px #a45d7c1c, 0 3px 12px #a45d7c08;
}
.lock-card:before { content: ""; position: absolute; inset: 9px; border: 1px dashed #e7c4d0; border-radius: 15px; pointer-events: none; }
.lock-postmark { font-size: 8px; color: var(--rose); }
.lock-seal { width: 52px; height: 60px; margin: 14px auto 10px; color: var(--rose); transform: rotate(-7deg); }
.lock-seal svg { width: 100%; height: 100%; overflow: visible; }
.lock-for { font-size: 29px; line-height: 1.3; color: var(--rose); }
#lockTitle { font: 400 clamp(31px, 3.4vw, 42px)/1.23 var(--serif); letter-spacing: -1.3px; margin: 8px 0 0; }
#lockTitle em { color: var(--rose); }
.lock-intro { font-size: 11px; line-height: 1.8; margin: 14px 0 0; }
.lock-hint { position: relative; padding: 12px 38px; margin: 19px 0 17px; border-radius: 10px; background: #fbedf1; border: 1px solid #f0d4dd; }
.lock-hint .tiny-label { font-size: 7px; letter-spacing: 1.7px; color: var(--rose); }
.lock-hint p { font: 16px/1.45 var(--serif); color: var(--ink); margin-top: 5px; }
.hint-heart { position: absolute; right: 17px; top: 50%; transform: translateY(-50%) rotate(12deg); font-size: 27px; color: #c9829c; }
.unlock-form { text-align: left; }
.password-label { display: block; font-size: 10px; font-weight: 600; margin: 0 0 6px 3px; color: var(--muted); }
.password-field { display: flex; align-items: center; border: 1px solid #d9a7ba; border-radius: 11px; background: #fff; transition: box-shadow .2s; }
.password-field:focus-within { outline: 2px solid var(--rose); outline-offset: 3px; box-shadow: 0 0 0 6px #f8e7ee; }
.password-field input { min-width: 0; width: 100%; height: 51px; padding: 12px 14px; border: 0; outline: 0; border-radius: 11px; font-size: 16px; color: var(--ink); background: transparent; }
.password-field input::placeholder { font-size: 12px; color: #a37b8c; }
.password-field input[aria-invalid=true] { background: #fff4f4; }
.password-field button { align-self: stretch; min-width: 56px; border: 0; background: transparent; border-radius: 0 11px 11px 0; font-size: 10px; font-weight: 600; color: var(--rose); }
.password-error { font-size: 10px; line-height: 1.5; min-height: 22px; padding: 4px 3px 0; color: #a23859; }
.unlock-music { display: flex; justify-content: center; align-items: center; gap: 8px; min-height: 33px; cursor: pointer; font-size: 10px; color: var(--muted); }
.unlock-music input { width: 17px; height: 17px; accent-color: var(--rose); margin: 0; }
.unlock-music input:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }
.unlock-music span span { margin-left: 5px; color: var(--rose); }
.unlock-button { width: 100%; margin-top: 8px; }
.lock-signature { display: block; margin-top: 20px; font-size: 7px; letter-spacing: 1.15px; color: #a57588; }
.lock-footer { position: relative; z-index: 2; font-size: 24px; text-align: center; line-height: 1.3; margin: 18px 0 auto; padding-bottom: 1px; color: #a65f7c; }
.lock-garden { position: fixed; inset: 0; pointer-events: none; }
.lock-garden svg { position: absolute; width: clamp(100px, 16vw, 220px); height: clamp(100px, 16vw, 220px); opacity: .62; }
.lock-sunflower { left: 5%; top: 12%; rotate: -17deg; }
.lock-lotus { right: 5%; bottom: 10%; rotate: 13deg; }
.lock-spark { position: absolute; color: #c587a1; font-family: var(--serif); animation: secret-twinkle 4s ease-in-out infinite; }
.lock-spark-one { left: 21%; bottom: 17%; font-size: 43px; }
.lock-spark-two { right: 19%; top: 12%; font-size: 34px; animation-delay: 1s; }
.lock-spark-three { left: 13%; top: 57%; font-size: 21px; animation-delay: 2s; }
.unlock-success { font-size: 28px; line-height: 1.4; color: var(--rose); padding: 12px 0 4px; }
.lock-screen.unlocking { animation: unlock-world .7s ease-in-out both; pointer-events: none; }
.lock-screen.unlocking .lock-shackle { transform: translateY(-8px) rotate(-12deg); transform-origin: 18px 32px; transition: transform .3s; }
#birthdayTitle:focus, #main > section:focus { outline: none; }

/* Every page in the scrapbook points to the next. */
.section-next { grid-column: 1 / -1; width: min(100%, 440px); margin: 46px auto 0; padding: 0 12px; }
.chapter-link { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 78px; padding: 16px 18px 16px 23px; text-align: left; border: 1px solid #e4c0ce; border-radius: 18px; background: #fffaf8db; color: var(--ink); text-decoration: none; box-shadow: 0 5px 18px #a56e8408; transition: transform .2s, background .2s, box-shadow .2s; }
.chapter-link small { display: block; font-size: 9px; line-height: 1.6; color: var(--muted); margin-bottom: 4px; }
.chapter-link strong { display: block; font-family: var(--serif); font-size: 17px; font-weight: 400; line-height: 1.4; }
.chapter-arrow { display: grid; place-items: center; width: 39px; height: 39px; flex-shrink: 0; border-radius: 50%; color: var(--rose); background: #f8e1e9; font-size: 22px; transition: transform .2s; }
.chapter-link:hover { transform: translateY(-3px); background: #fffdfb; box-shadow: 0 10px 24px #a56e8417; }
.chapter-link:hover .chapter-arrow { transform: translateY(3px); }
.hero > .section-next { align-self: end; margin-top: 5px; }
.record-card.is-playing .vinyl { animation: record-spin 18s linear infinite; }

/* Two little portraits bloom from the birthday flowers. */
.cake-section { grid-template-columns: minmax(0, 1fr); gap: 22px; }
.cake-copy { max-width: 650px; margin-inline: auto; text-align: center; }
.cake-copy > p { max-width: 480px; margin-inline: auto; }
.birthday-countdown > div { justify-content: center; }
.birthday-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, 380px) minmax(0, 1fr); align-items: center; gap: 20px; width: 100%; scroll-margin-top: 40px; }
.birthday-stage .cake-scene { grid-column: 2; grid-row: 1; max-width: 380px; height: 340px; scale: .94; margin: 35px auto 0; }
.birthday-stage .cake-caption { bottom: 12px; }
.birthday-bouquet { position: relative; width: min(100%, 230px); height: 316px; margin: 0 auto; transform: rotate(var(--bouquet-angle)); }
.bouquet-left { grid-column: 1; grid-row: 1; --bouquet-angle: -6deg; --launch-x: 95px; }
.bouquet-right { grid-column: 3; grid-row: 1; --bouquet-angle: 6deg; --launch-x: -95px; }
.birthday-stage.is-celebrating .birthday-bouquet { animation: bouquet-bloom 1.25s cubic-bezier(.18,.75,.3,1) both; }
.birthday-stage.is-celebrating .bouquet-right { animation-delay: .13s; }
.bouquet-photo { position: absolute; z-index: 3; left: 50%; top: 5px; transform: translateX(-50%); width: 154px; height: 196px; padding: 7px 7px 16px; border: 1px solid #e4cdc5; border-radius: 3px; background: var(--white); box-shadow: 0 9px 18px #64394726; }
.bouquet-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; border-radius: 1px; }
.bouquet-paper { position: absolute; z-index: 1; width: 195px; height: 146px; left: 50%; bottom: 30px; transform: translateX(-50%); background: linear-gradient(115deg, #f7e7dc 0 31%, #e6bfce 32% 49%, #f3d8e0 50% 73%, #f9ebe3 74%); clip-path: polygon(0 0, 50% 17%, 100% 0, 67% 100%, 33% 100%); }
.bouquet-stems { position: absolute; z-index: 0; bottom: 48px; left: 50%; width: 90px; height: 160px; transform: translateX(-50%); }
.bouquet-stems i { position: absolute; bottom: 0; left: 50%; width: 3px; height: 160px; background: #93a486; transform-origin: bottom; rotate: -26deg; border-radius: 4px; }
.bouquet-stems i:nth-child(2) { rotate: 24deg; }
.bouquet-stems i:nth-child(3) { rotate: 0deg; height: 155px; }
.bouquet-stems i:before, .bouquet-stems i:after { content: ""; position: absolute; top: 42px; left: 2px; width: 23px; height: 38px; border-radius: 0 90% 0 90%; background: #a8b79a; transform: rotate(20deg); }
.bouquet-stems i:after { left: -23px; top: 83px; transform: rotate(-30deg); background: #859a78; }
.bouquet-flower, .bouquet-lotus { position: absolute; z-index: 4; }
.bloom-one { width: 88px; height: 88px; left: -4px; bottom: 88px; rotate: -12deg; }
.bloom-two { width: 75px; height: 75px; right: -3px; bottom: 99px; rotate: 14deg; }
.bouquet-lotus { width: 103px; height: 82px; left: 50%; bottom: 69px; transform: translateX(-50%); }
.bouquet-bow { position: absolute; z-index: 5; bottom: 49px; left: 50%; transform: translateX(-50%); width: 24px; height: 26px; text-align: center; line-height: 26px; background: #b86e8a; border-radius: 5px; color: #fff3f6; font-family: var(--serif); font-size: 17px; }
.bouquet-bow:before, .bouquet-bow:after { content: ""; position: absolute; z-index: -1; top: -2px; right: 17px; width: 38px; height: 24px; border: 6px solid #d793ae; border-radius: 65% 15% 30% 60%; transform: rotate(13deg); }
.bouquet-bow:after { left: 17px; right: auto; transform: scaleX(-1) rotate(13deg); }
.birthday-bouquet figcaption { position: absolute; bottom: 0; left: -10px; right: -10px; text-align: center; font-size: 25px; line-height: 1.25; color: var(--rose); white-space: nowrap; }
.bouquet-spark { position: absolute; z-index: 4; color: #c5956b; font: 34px/1 var(--serif); }
.spark-one { top: 0; right: 0; }
.spark-two { top: 73px; left: -7px; color: #c787a2; font-size: 22px; }
.birthday-stage.is-celebrating .bouquet-spark { animation: secret-twinkle 3s ease-in-out 2; }
.cake-section > .section-next { margin-top: 12px; }

@keyframes unlock-world { 0%, 48% { opacity: 1; } 100% { opacity: 0; scale: 1.025; } }
@keyframes secret-twinkle { 0%, 100% { opacity: .45; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes record-spin { to { transform: rotate(360deg); } }
@keyframes bouquet-bloom {
  0% { opacity: 0; transform: translate(var(--launch-x), 120px) scale(.3) rotate(0); }
  70% { opacity: 1; transform: translate(0, -12px) scale(1.035) rotate(var(--bouquet-angle)); }
  100% { opacity: 1; transform: translate(0, 0) scale(1) rotate(var(--bouquet-angle)); }
}
@media (max-width: 1020px) and (min-width: 761px) {
  .birthday-stage { grid-template-columns: minmax(0, 1fr) 320px minmax(0, 1fr); gap: 10px; }
  .birthday-stage .cake-scene { scale: .85; }
  .birthday-bouquet { scale: .86; }
}
@media (max-width: 760px) {
  .lock-garden svg { width: 140px; height: 140px; opacity: .4; }
  .lock-sunflower { left: -35px; top: 1%; }
  .lock-lotus { right: -35px; bottom: 1%; }
  .lock-spark-one { left: 5%; bottom: 8%; }
  .lock-spark-two { right: 6%; top: 6%; }
  .lock-spark-three { display: none; }
  .section-next { margin-top: 34px; padding-inline: 0; max-width: 370px; }
  .chapter-link { min-height: 76px; padding: 15px 16px 15px 19px; gap: 13px; border-radius: 15px; }
  .chapter-link strong { font-size: 16px; }
  .chapter-link small { font-size: 9px; }
  .story-section > .section-next, .nish-world > .section-next, .reels-section > .section-next, .wishes-section > .section-next, .letter-section > .section-next { width: calc(100% - 48px); }
  .hero > .section-next { margin: 20px auto 0; align-self: center; }
  .hero { padding-bottom: 45px; }
  .cake-section { gap: 14px; }
  .birthday-stage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 18px; row-gap: 10px; max-width: 470px; margin: 0 auto; scroll-margin-top: 25px; }
  .birthday-stage .cake-scene { grid-column: 1 / -1; grid-row: 1; height: 310px; margin: 22px auto -10px; scale: .86; max-width: 340px; }
  .birthday-stage .cake-caption { bottom: -1px; }
  .bouquet-left { grid-column: 1; grid-row: 2; --launch-x: 65px; }
  .bouquet-right { grid-column: 2; grid-row: 2; --launch-x: -65px; }
  .birthday-bouquet { height: 264px; width: min(100%, 190px); }
  .bouquet-photo { width: 132px; height: 164px; padding: 6px 6px 12px; }
  .bouquet-paper { width: 166px; height: 122px; bottom: 24px; }
  .bouquet-stems { bottom: 40px; height: 125px; }
  .bouquet-stems i { height: 125px; }
  .bouquet-stems i:nth-child(3) { height: 130px; }
  .bloom-one { width: 72px; height: 72px; bottom: 78px; left: -2px; }
  .bloom-two { width: 65px; height: 65px; bottom: 84px; right: -2px; }
  .bouquet-lotus { width: 89px; height: 72px; bottom: 62px; }
  .bouquet-bow { bottom: 43px; }
  .birthday-bouquet figcaption { font-size: 23px; }
  .birthday-stage.is-celebrating { padding-bottom: 12px; }
  .cake-section > .section-next { margin-top: 25px; }
}
@media (max-width: 480px) {
  .lock-screen { padding: 18px 14px; }
  .lock-card { padding: 20px 23px 20px; border-radius: 18px; }
  .lock-card:before { inset: 7px; border-radius: 12px; }
  .lock-seal { width: 41px; height: 48px; margin: 11px auto 8px; }
  .lock-for { font-size: 27px; }
  #lockTitle { font-size: clamp(27px, 7.7vw, 35px); letter-spacing: -1px; margin-top: 6px; }
  .lock-intro { display: none; }
  .lock-hint { margin: 17px 0 14px; padding: 10px 20px; }
  .lock-hint p { font-size: 15px; }
  .hint-heart { right: 10px; font-size: 21px; }
  .lock-footer { font-size: 21px; max-width: 280px; margin-top: 14px; }
  .lock-signature { font-size: 6px; margin-top: 16px; }
  .unlock-music { font-size: 10px; }
  .password-field input::placeholder { font-size: 11px; }
  .chapter-link strong { font-size: 15px; }
  .chapter-link small { font-size: 8px; }
  .chapter-arrow { width: 35px; height: 35px; }
  .birthday-stage { column-gap: 16px; row-gap: 0; }
  .birthday-stage .cake-scene { margin: 10px auto -24px; scale: .8; }
  .birthday-bouquet { height: 235px; max-width: 155px; }
  .bouquet-photo { width: 113px; height: 145px; padding: 5px 5px 12px; }
  .bouquet-paper { width: 140px; height: 110px; }
  .bouquet-stems { height: 110px; }
  .bouquet-stems i { height: 110px; }
  .bouquet-stems i:nth-child(3) { height: 115px; }
  .bloom-one { width: 64px; height: 64px; bottom: 70px; }
  .bloom-two { width: 57px; height: 57px; bottom: 77px; }
  .bouquet-lotus { width: 80px; height: 65px; bottom: 56px; }
  .bouquet-bow { bottom: 37px; scale: .87; }
  .birthday-bouquet figcaption { font-size: 20px; }
  .spark-one { font-size: 26px; right: -4px; }
  .spark-two { top: 55px; left: -3px; font-size: 19px; }
}
/* A little pink magic on taps, clicks, and keyboard activation. */
button.tap-feedback, a.tap-feedback, [role="button"].tap-feedback {
  box-shadow: 0 0 0 4px #cc86a437, 0 5px 19px #a65d801e;
}
.tap-burst { position: fixed; z-index: 220; width: 0; height: 0; pointer-events: none; user-select: none; }
.tap-ring { position: absolute; width: 38px; height: 38px; left: -19px; top: -19px; border: 2px solid #d991af; border-radius: 50%; animation: tap-ripple .6s ease-out both; }
.tap-petal { position: absolute; left: 0; top: 0; font: 18px/1 var(--serif); color: #bc6489; text-shadow: 0 1px 5px #fff9fc; animation: tap-petals .66s cubic-bezier(.17,.7,.3,1) both; }
.tap-petal:nth-child(3) { color: #dca2b7; font-size: 22px; }
.tap-petal:nth-child(4) { color: #bf995b; font-size: 24px; }
.tap-petal:nth-child(6) { font-size: 13px; }
@keyframes tap-ripple {
  0% { opacity: .8; scale: .2; }
  100% { opacity: 0; scale: 2; }
}
@keyframes tap-petals {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.35); }
  15% { opacity: .95; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--tap-x)), calc(-50% + var(--tap-y))) rotate(var(--tap-turn)) scale(1.05); }
}
/* The four favourite things arrive like little scrapbook surprises. */
.favorites-ready .scrap-note {
  opacity: 0;
  translate: 0 26px;
  scale: .92;
}
.favorites-ready .scrap-note.favorite-revealed {
  opacity: 1;
  translate: 0 0;
  scale: 1;
  animation: favorite-card-arrival 1s cubic-bezier(.2,.7,.3,1) both;
}
.favorites-ready .favorite-revealed:after {
  content: "♡";
  position: absolute;
  right: 12px;
  top: 13px;
  color: #bc6489;
  font: 31px/1 var(--serif);
  pointer-events: none;
  animation: favorite-heart 1.3s ease-out both;
}
@keyframes favorite-card-arrival {
  0% { opacity: 0; translate: 0 26px; scale: .92; }
  65% { opacity: 1; translate: 0 -5px; scale: 1.015; }
  100% { opacity: 1; translate: 0 0; scale: 1; }
}
@keyframes favorite-heart {
  0% { opacity: 0; translate: 0 7px; scale: .5; }
  30% { opacity: .9; scale: 1; }
  100% { opacity: 0; translate: 5px -38px; scale: 1.2; }
}
@media (prefers-reduced-motion: reduce) {
  .favorites-ready .scrap-note { opacity: 1; translate: none; scale: 1; animation: none; }
  .favorites-ready .favorite-revealed:after { display: none; }
  .tap-burst { display: none; }
  .chapter-link:hover, .chapter-link:hover .chapter-arrow { transform: none; }
  .lock-screen.unlocking { opacity: 0; }
}
