.bd-site {
  --rose:#8d304c; --ink:#4e2630; --cream:#fffbf0; --blush:#f7e1e1;
  --hand:"Segoe Print","Bradley Hand","Comic Sans MS",cursive;
  position:relative; min-height:100svh; isolation:isolate; color:var(--ink);
  background:radial-gradient(ellipse at 50% 28%,#fff9f0 10%,#f8e3e2 75%);
  font: 1rem/1.6 Georgia,serif; overflow:clip;
}
.bd-site::before {content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;opacity:.22;background-image:radial-gradient(#986e65 0.55px,transparent .8px);background-size:5px 7px}
.bd-border {position:absolute;inset:13px;border:1px solid #d5a2a5;border-radius:20px;pointer-events:none;z-index:-1}
.bd-header {padding:24px 12px 0;text-align:center;color:var(--rose);font:italic 1rem Georgia,serif}
.bd-header span {margin:0 .7em}
.bd-site h1,.bd-site h2,.bd-site h3 {margin:0;line-height:1.12;color:var(--ink);font-weight:normal;text-wrap:balance}
.bd-site h1 {font-size:clamp(2.65rem,6vw,5.5rem);letter-spacing:-.052em}
.bd-site h2 {font-size:clamp(2rem,4.6vw,3.6rem);letter-spacing:-.043em}
.bd-site h3 {font-size:clamp(1.3rem,3vw,2rem)}
.bd-site p {white-space:pre-wrap;overflow-wrap:anywhere}
.bd-stage {position:relative;min-height:calc(100svh - 55px);display:grid;place-content:center;justify-items:center;text-align:center;gap:24px;padding:38px 25px 60px}
.bd-intro h1 {font-style:italic}
.bd-action {display:inline-flex;align-items:center;justify-content:center;padding:11px 23px;min-height:46px;background:var(--rose);border:1px solid var(--rose);border-radius:999px;color:#fff8ed;font:inherit;cursor:pointer;box-shadow:0 4px 10px #73223a20;transition:background .2s,transform .25s}
.bd-action:hover {background:#70223b}
.bd-action:disabled {visibility:hidden}
.bd-secondary {background:var(--cream);color:var(--rose)}
.bd-secondary:hover {background:#fbe7e8}
.bd-site :is(a,button,input):focus-visible {outline:2px solid #66334a;outline-offset:5px}
.bd-open {animation:bd-fade 2.3s both}
.bd-spark {position:absolute;pointer-events:none;color:#a85267;font-size:clamp(1.4rem,4vw,3rem);line-height:1.8;animation:bd-float 4s ease-in-out infinite}
.bd-spark-left {top:35%;left:12%;transform:rotate(-18deg)}
.bd-spark-right {top:31%;right:12%;transform:rotate(12deg);animation-delay:-2s}
.bd-print-scene {width:min(75vw,350px);height:245px;position:relative}
.bd-printer-back {position:absolute;top:14px;left:14%;width:72%;height:96px;background:#e6a9b4;border:2px solid #b77786;border-radius:34px 34px 10px 10px;box-shadow:inset 0 7px #fff3ed69}
.bd-printer-face {position:absolute;top:53px;left:0;width:100%;height:94px;border:2px solid #a65b70;border-radius:22px;background:#efbdc5;box-shadow:inset 0 -10px #d99ba9,inset 0 6px #fff6f063,0 11px 16px #86435920;text-align:left;padding:10px 18px;color:var(--rose)}
.bd-printer-face i {display:inline-block;width:6px;height:6px;border-radius:100%;background:#9b5265;margin-right:5px}
.bd-printer-face i:nth-child(2) {background:#fff3e2}
.bd-printer-face div {position:absolute;bottom:9px;left:9%;width:82%;height:12px;border-radius:8px;background:#754352}
.bd-printer-face>span {position:absolute;top:10px;right:17px}
.bd-print-window {position:absolute;z-index:1;top:134px;left:12%;width:76%;overflow:hidden;padding:0 2px 14px}
.bd-print-window .bd-envelope {animation:bd-print 1.6s cubic-bezier(.22,.65,.38,1) both}
.bd-envelope {position:relative;isolation:isolate;width:100%;aspect-ratio:2.2;background:#f9edda;border:1px solid #d1ae92;border-radius:5px;box-shadow:0 6px 10px #75425226;display:grid;place-items:center}
.bd-envelope::before {content:"";position:absolute;inset:0;background:#e5c8ad;clip-path:polygon(0 0,100% 0,50% 65%);z-index:-1;transform-origin:top}
.bd-envelope::after {content:"";position:absolute;inset:0;background:#fff4df;clip-path:polygon(0 100%, 0 6%, 50% 67%, 100% 6%, 100% 100%);z-index:-2}
.bd-seal {position:absolute;top:41%;left:50%;translate:-50% 0;display:grid;place-items:center;width:33px;height:32px;border-radius:46% 52% 44% 49%;background:#a23c57;color:#ffe9df;box-shadow:inset 0 0 0 3px #bd6372,0 3px 4px #85405154;font:1rem Georgia,serif}
.bd-address {position:absolute;left:7%;bottom:6%;font:italic .85rem Georgia,serif}
.bd-paper {position:relative;background:var(--cream);border:1px solid #e2b9b6;border-radius:4px;padding:clamp(24px,6vw,61px);box-shadow:0 16px 55px #78405322;text-align:center}
.bd-paper h1 {margin-bottom:.5em}
.bd-ornament {display:block;color:var(--rose);font-size:2rem;margin-bottom:.4em}
.bd-question-scene {position:relative;padding-bottom:55px}
.bd-question-envelope {position:absolute;bottom:0;left:12%;width:76%;transform:rotate(-5deg)}
.bd-question-envelope .bd-envelope::before {animation:bd-flap .52s both}
.bd-question {transform-origin:bottom center;animation:bd-slide .85s .18s both}
.bd-answers {display:flex;justify-content:center;gap:10px}
.bd-dodged {transform:translateX(25px) rotate(5deg)}
.bd-welcome {grid-template-columns:minmax(0,480px) minmax(150px,280px);align-items:center;text-align:left;gap:clamp(24px,5vw,65px)}
.bd-welcome .bd-polaroid {width:100%;transform:rotate(6deg);margin-top:10px}
.bd-date {color:var(--rose);font-size:.82rem;letter-spacing:.06em}
.bd-polaroid {background:#fffdf8;border:1px solid #f1e2d7;padding:10px 10px 17px;box-shadow:0 8px 21px #66313a25;position:relative;text-align:center;width:100%}
.bd-polaroid::after {content:"♡";position:absolute;bottom:4px;right:9px;font-size:1.05rem;color:#ab4b63}
.bd-tape {position:absolute;z-index:1;top:-9px;left:calc(50% - 25px);height:19px;width:50px;background:#e4b3a0a6;transform:rotate(-11deg);clip-path:polygon(4% 0,100% 0,95% 32%,100% 69%,95% 100%,0 100%,5% 63%,0 28%)}
.bd-photo {aspect-ratio:1;display:grid;align-content:center;justify-items:center;gap:4px;background:repeating-linear-gradient(135deg,#f7e7e6,#f7e7e6 9px,#f4e2e1 9px,#f4e2e1 10px);color:#855264;font-size:.78rem;overflow:hidden}
.bd-photo span {font-size:2rem;color:#9a5368}
.bd-photo img {width:100%;height:100%;object-fit:cover;align-self:stretch}
.bd-caption,.bd-signature,.bd-letter-button>span {font-family:var(--hand);font-style:italic}
.bd-caption {padding-top:8px;overflow-wrap:anywhere}
.bd-polaroid small {color:#845566}
.bd-book {max-width:1050px;margin:auto;padding:20px clamp(28px,6vw,72px) 45px}
.bd-nav {display:flex;flex-wrap:wrap;justify-content:center;gap:8px 22px;padding:14px 4px;border-block:1px solid #dcb2b6}
.bd-nav a {color:var(--rose);text-underline-offset:4px}
.bd-chapter {position:relative;padding:58px 0;text-align:center;border-bottom:1px dashed #d8aab0}
.bd-chapter :is(h1,h2) {margin-bottom:30px;font-style:italic}
.bd-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:32px 24px}
.bd-photo-button,.bd-letter-button,.bd-note {background:none;border:0;color:inherit;padding:0;cursor:pointer;font:inherit}
.bd-photo-button {transform:rotate(-3deg);transition:transform .2s}
.bd-photo-button:nth-child(3n+2) {transform:rotate(4deg)}
.bd-photo-button:nth-child(3n) {transform:rotate(-1deg)}
.bd-photo-button:hover,.bd-photo-button:focus-visible {transform:translateY(-5px);z-index:1}
.bd-letter-button {display:grid;justify-items:center;gap:10px;align-content:start}
.bd-letter-button .bd-envelope {max-width:280px;transition:transform .25s}
.bd-letter-button:hover .bd-envelope,.bd-letter-button:focus-visible .bd-envelope {transform:translateY(-4px) rotate(-3deg)}
.bd-reasons {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.bd-note {min-height:114px;perspective:450px}
.bd-note-inner {position:relative;display:grid;min-height:100%;transform-style:preserve-3d;transition:transform .45s}
.bd-note-inner>span {grid-area:1/1;display:grid;place-items:center;backface-visibility:hidden;padding:10px;background:#f5cbd1;box-shadow:0 4px 9px #73384a22;border:1px solid #dca2ae;color:#803349;font-size:2rem;border-radius:4px}
.bd-note:nth-child(even) .bd-note-inner>span {background:#fff0dc}
.bd-note-inner>span+span {transform:rotateY(180deg);font-size:.93rem;overflow-wrap:anywhere}
.bd-flipped .bd-note-inner {transform:rotateY(180deg)}
.bd-timeline {list-style:none;border-left:2px dotted #bd7689;margin:0 auto;padding:0 0 0 23px;max-width:640px;text-align:left}
.bd-timeline li {position:relative;display:grid;grid-template-columns:1fr minmax(100px,165px);align-items:center;gap:18px;padding:18px 0}
.bd-timeline li::before {content:"♥";position:absolute;left:-31px;top:44%;line-height:1;color:var(--rose);background:#f8e7e4}
.bd-timeline .bd-polaroid {transform:rotate(4deg)}
.bd-timeline li:nth-child(even) .bd-polaroid {transform:rotate(-4deg)}
.bd-cake {width:min(240px,90%);margin:50px auto 22px}
.bd-candles {display:flex;justify-content:center;gap:26px}
.bd-candles>div {width:10px;height:36px;position:relative;background:repeating-linear-gradient(135deg,#a84461,#a84461 5px,#fff1dc 5px,#fff1dc 9px);border-radius:3px 3px 0 0}
.bd-candles i {position:absolute;width:13px;height:19px;bottom:calc(100% + 4px);left:-1px;background:#d68142;border-radius:80% 30% 64% 55%;box-shadow:0 0 14px #e2a456;animation:bd-flicker .75s alternate infinite}
.bd-cake-layer {height:87px;border-radius:23px 23px 9px 9px;background:#df9bad;border-top:22px solid #fff3df;border-bottom:12px solid #c97a92;display:grid;place-content:center;color:#803349;letter-spacing:5px}
.bd-cake-plate {height:12px;margin:0 -10px;background:#fdf4e4;border:1px solid #d7aeb1;border-radius:0 0 50% 50%}
.bd-wish {color:var(--rose);font-style:italic}
.bd-finale {border-bottom:0;display:grid;justify-items:center;gap:15px}
.bd-finale .bd-letter-button {width:min(290px,100%);margin-bottom:10px}
.bd-dialog {position:fixed;inset:0;margin:auto;width:min(92vw,540px);max-height:88dvh;overflow:auto;padding:0;border:1px solid #d4a3a7;border-radius:8px;color:var(--ink);background:var(--cream);box-shadow:0 22px 80px #53243550}
.bd-dialog::backdrop {background:#40192870}
.bd-dialog-inner {position:relative;text-align:center;padding:32px;animation:bd-slide .4s both}
.bd-unfold {transform-origin:top;animation:bd-unfold .55s both}
.bd-dialog-inner .bd-polaroid {max-width:280px;margin:10px auto}
.bd-close {position:absolute;top:7px;right:7px;width:42px;height:42px;border:0;background:none;font-size:1.7rem;color:var(--rose);cursor:pointer;z-index:1}
.bd-player {position:sticky;bottom:8px;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:10px;width:max-content;max-width:calc(100% - 32px);margin:10px auto;padding:7px 14px;background:var(--cream);border:1px solid #daafb6;border-radius:24px;box-shadow:0 5px 10px #73384a22}
.bd-player label {display:flex;align-items:center;gap:5px}
.bd-player input {width:75px;accent-color:var(--rose)}
.bd-record {display:grid;place-items:center;background:conic-gradient(#4e2630,#a45c72,#4e2630,#a45c72,#4e2630);color:#ffe4dc;width:25px;height:25px;border-radius:50%;font-size:.7rem}
.bd-spinning {animation:bd-spin 2s linear infinite}
.bd-confetti {position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:4}
.bd-confetti span {position:absolute;top:-25px;animation:bd-fall 1.7s ease-out both}
@keyframes bd-print {from {transform:translateY(-110%)} to {transform:translateY(0)}}
@keyframes bd-fade {0%,65% {opacity:0} 100% {opacity:1}}
@keyframes bd-float {50% {translate:0 -9px}}
@keyframes bd-slide {from {transform:translateY(55px) scale(.94);opacity:0} to {transform:none;opacity:1}}
@keyframes bd-flap {to {transform:rotateX(155deg)}}
@keyframes bd-unfold {from {transform:translateY(35px) rotateX(-58deg);opacity:.3} to {transform:none;opacity:1}}
@keyframes bd-flicker {to {transform:scale(.88) rotate(-7deg)}}
@keyframes bd-spin {to {transform:rotate(360deg)}}
@keyframes bd-fall {to {transform:translate(30px,55vh) rotate(290deg);opacity:0}}
@media(max-width:620px) {
  .bd-welcome {grid-template-columns:1fr;text-align:center}
  .bd-welcome .bd-polaroid {max-width:200px}
  .bd-grid,.bd-reasons {grid-template-columns:repeat(2,minmax(0,1fr));gap:23px 13px}
  .bd-timeline li {grid-template-columns:minmax(0,1fr) minmax(75px,105px);gap:10px}
  .bd-spark-left {left:7%}
  .bd-spark-right {right:7%}
  .bd-chapter {padding:39px 0}
}
@media(prefers-reduced-motion:reduce) {
  .bd-site *, .bd-site *::before, .bd-site *::after {animation:none!important;transition:none!important}
  .bd-dodged {transform:none}
}

/* Scrapbook covers and archive pages */
body {margin:0;background:#f8e3e2}
*,*::before,*::after {box-sizing:border-box}
a {color:var(--rose);text-underline-offset:.24em}
.bd-site img {display:block}
.site-nav {position:relative;z-index:5;max-width:1120px;width:calc(100% - 54px);margin:auto;padding:20px 0 16px;border-bottom:1px solid #d5a2a587;display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px 20px;font-size:.9rem}
.site-nav>a {font-style:italic;font-size:1.1rem}
.site-nav a {text-decoration:none}
.site-nav nav {display:flex;gap:clamp(10px,3vw,30px);flex-wrap:wrap}
.home-hero {min-height:65svh}
.home-hero .bd-welcome-copy {padding:15px 0}
.eyebrow {color:var(--rose);font-size:.7rem;letter-spacing:.2em}
.bd-action {text-decoration:none}
#open-intro {animation:bd-fade 2.1s both}
.bd-photo .photo-label {font: .72rem/1.2 Georgia,serif;text-align:center;padding:0 4px}
.bd-photo img {object-fit:cover;min-height:0}
.bd-photo:has(img) {display:block}
.chapter-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.chapter-card {padding:19px 12px 15px;background:#fff8ec;border:1px solid #d7acad;border-radius:4px;text-decoration:none;min-height:175px;box-shadow:0 4px 12px #75425216;display:grid;justify-items:center;align-content:center;gap:10px;transition:transform .24s}
.chapter-card:nth-child(2n) {background:#f7dcdf}
.chapter-card:nth-child(3n) {background:#eee5df}
.chapter-card:hover {transform:translateY(-4px) rotate(-1deg)}
.chapter-card>span {font:italic 1.1rem Georgia,serif}
.chapter-card small {color:var(--ink)}
.cover-art {width:min(128px,95%);height:74px;display:grid;place-items:center}
.cover-art .bd-envelope {width:100%;transform:rotate(-7deg)}
.cover-blue .bd-envelope,.blue-envelope .bd-envelope {background:#dce3e9;border-color:#9cabb9}
.cover-blue .bd-envelope::before,.blue-envelope .bd-envelope::before {background:#adbcca}
.cover-blue .bd-envelope::after,.blue-envelope .bd-envelope::after {background:#dfeaf0}
.cover-lock .bd-envelope::before {background:#bf8c94}
.cover-art .mini-photo {height:69px;aspect-ratio: .88;display:grid;place-items:center;background:#efd0d3;border:6px solid #fffaf1;border-bottom-width:13px;transform:rotate(-9deg);box-shadow:0 4px 9px #53313c45}
.cover-book>div,.cover-date>div,.cover-gift>div {width:55px;height:65px;display:grid;place-items:center;background:#c98a9a;color:#fff8ef;border:2px solid #a06174;border-left-width:8px;border-radius:4px;transform:rotate(8deg);box-shadow:3px 4px 0 #e1b6b8}
.cover-date>div {border-left-width:2px;border-top-width:11px;background:#f7e5cf;color:var(--rose);transform:rotate(-5deg)}
.cover-gift>div {height:50px;width:71px;background:#a74865;border-top:8px solid #e8b6b6}
.section-page {min-height:80vh}
.section-top {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px}
.memory-entry,.archive-envelope,.paper-entry {text-decoration:none}
.archive-envelope {width:100%;color:var(--ink)}
.archive-envelope small {color:var(--rose)}
.paper-entry {display:block;padding:22px 14px;background:var(--cream);border:1px solid #e3bfb7;border-radius:4px;color:var(--ink);overflow-wrap:anywhere;box-shadow:0 5px 14px #73384a15}
.paper-entry .bd-polaroid {margin-bottom:15px}
.filters {display:flex;justify-content:center;gap:12px;margin:0 0 30px;flex-wrap:wrap}
form {margin:16px 0;display:grid;gap:12px;text-align:left}
form>.bd-action {justify-self:start}
label {display:grid;gap:4px}
input,textarea,select {color:var(--ink);font:inherit;min-width:0;max-width:100%;padding:8px 10px;background:#fffaf3;border:1px solid #d4a3ad;border-radius:5px}
textarea {width:100%;min-height:105px;resize:vertical}
input[type=range] {padding:0}
.check {display:flex;align-items:center}
.lock-paper {max-width:490px;width:100%;margin:auto}
.lock-paper .bd-envelope {max-width:210px;margin:0 auto 22px}
.lock-paper h1 {font-size:clamp(2rem,5vw,3.2rem)}
.lock-paper .bd-action {justify-self:center}
.lock-paper form {max-width:290px;margin:18px auto 0}
.unlocking .bd-envelope::before {animation:bd-flap .24s both}
.shake {animation:shake .3s}
@keyframes shake {25%,75%{transform:translateX(-5px)}50%{transform:translateX(5px)}}
.form-status {min-height:1.2em;font-size:.88rem}
.error {color:#8f1a33;margin:0}
.scan {overflow:auto;max-height:50vh;margin:12px 0;background:#f4e4d6}
.scan img {width:100%;max-width:none}
.letter-body {text-align:left}
.zoom-label {display:flex;justify-content:center;align-items:center;gap:10px}
.bd-dialog-inner>.lock-paper {padding:12px;box-shadow:none;border:0}
.gift-box {position:relative;width:152px;height:105px;background:#a34664;border:2px solid #83334d;border-radius:3px;box-shadow:0 9px 16px #74264338;animation:gift 1.9s ease-in-out infinite}
.gift-box i {position:absolute;left:-9%;top:-18px;width:118%;height:26px;background:#c47d91;border:2px solid #83334d;border-radius:4px}
.gift-box span {position:absolute;inset:-20px 42% 0;display:grid;place-items:center;background:#edbdac;color:#8c3451}
@keyframes gift {50%{transform:translateY(-7px) rotate(-4deg)}}
.birthday-start,.birthday-hero {min-height:60svh}
.birthday-hero {animation:bd-slide .7s both}
.notice {padding:20px;text-align:center}
.dashboard {min-height:90vh}
.dashboard h1 {font-size:clamp(2.2rem,5vw,4rem)}
.dashboard details {margin:14px 0;padding:14px clamp(10px,3vw,25px);background:#fff7e9;border:1px solid #dcb3b4;border-radius:5px}
.dashboard details details {background:#fffdf6}
summary {cursor:pointer;color:var(--rose);font-size:1.1rem}
.upload {border-top:1px dashed #c89ca5;padding-top:12px}
.owner-actions {display:flex;flex-wrap:wrap;gap:10px}
.bd-confetti span {color:var(--rose)}
@media(max-width:620px){.chapter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.chapter-card{min-height:141px}.site-nav{width:calc(100% - 46px)}}
.album-links {display:flex;align-items:baseline;justify-content:center;gap:15px;margin:0 0 20px;flex-wrap:wrap}
.bd-site .album-links h2 {font-size:1.15rem;margin:0}

.nav-lock{font:inherit;background:none;color:var(--rose);border:0;padding:0;cursor:pointer}.nav-lock:hover{text-decoration:underline}.lock-paper .bd-seal{box-shadow:inset 0 0 0 3px #bd6372,0 3px 4px #85405154}
