/* One graduation scrapbook template; all decorative SVG geometry is sourced. */
.letter-cover{position:relative;overflow:visible}.letter-cover>img:first-child{object-fit:cover}.sample-photo-label{position:absolute;top:16px;left:16px;background:#faf6eddf;color:#492c30;font:10px/1.5 var(--body);padding:4px 8px;z-index:1}.sample-photo-label[hidden]{display:none}.letter-cover .cover-graduation-sticker{position:absolute;right:-18px;bottom:38px;width:118px;height:118px;object-fit:contain;background:#fff9ed;padding:15px;border-radius:48% 43% 47% 40%;transform:rotate(11deg);filter:drop-shadow(0 5px 3px #341a242d);z-index:2}.letter-graduation-sticker{display:block;margin:0 auto 28px;transform:rotate(-9deg);opacity:.85}.letter-inner .signature{position:relative;display:table}.letter-inner .signature:after{content:'';display:block;width:120px;height:24px;margin:0 auto;background:var(--wine);mask:url('assets/scrapbook/doodle-line.svg') center/100% 100% no-repeat}
.scrapbook-gallery{--scrapbook-wine:#801b32;position:relative;isolation:isolate;max-width:none;margin:70px 0 0;padding:100px 36px 70px;background:var(--scrapbook-wine);color:#faf0dc;overflow:clip;background-image:linear-gradient(#801b32f5,#801b32f5),url('assets/public/original-ivory-paper.png');background-size:auto,700px}.scrapbook-gallery:before,.scrapbook-gallery:after{content:'';position:absolute;left:-1%;right:-1%;height:24px;background:#f4eddf;z-index:2;pointer-events:none;clip-path:polygon(0 0,100% 0,100% 55%,95% 64%,88% 42%,81% 60%,75% 49%,68% 67%,61% 40%,55% 57%,47% 41%,40% 68%,31% 45%,22% 61%,14% 42%,7% 62%,0 50%)}.scrapbook-gallery:before{top:-1px}.scrapbook-gallery:after{bottom:-1px;transform:rotate(180deg)}.scrapbook-gallery .keepsake-heading{position:relative;z-index:1;text-align:center;max-width:780px;margin:0 auto 10px}.scrapbook-gallery .small-note{font-size:13px;letter-spacing:.02em;color:#e8cbbb}.scrapbook-gallery h2{font:500 clamp(56px,6.5vw,92px)/.93 var(--display);letter-spacing:-.035em}.scrapbook-gallery h2 em{font-weight:400}.gallery-underline{display:block;width:140px;height:34px;object-fit:fill;margin:8px auto 0;filter:brightness(0) invert(93%) sepia(12%) saturate(381%)}.scrapbook-gallery .gallery-rail{max-width:1180px;margin:24px auto 0;padding:38px 22px 50px;gap:34px;scroll-padding-inline:22px;align-items:center}.scrapbook-gallery .gallery-open{flex:0 0 260px;position:relative;color:#492c30;transform:rotate(-5deg)}.scrapbook-gallery .gallery-open[hidden]{display:none}.scrapbook-gallery .gallery-open:nth-child(2n){transform:rotate(5deg);margin-top:42px}.scrapbook-gallery .gallery-open:nth-child(3n){transform:rotate(-3deg)}.scrapbook-gallery .gallery-open figure{padding:12px 12px 24px;background:#fffaf0;box-shadow:4px 14px 25px #32061550;border:1px solid #eddfc7}.scrapbook-gallery .gallery-open img{display:block;width:100%;height:280px;object-fit:contain;background:#eee7da}.scrapbook-gallery .gallery-open figcaption{font:italic 26px/1.1 var(--display);padding:20px 4px 0;min-height:60px;display:flex;align-items:center;justify-content:center;overflow-wrap:anywhere}.scrapbook-gallery .gallery-open:before{content:'';position:absolute;left:calc(50% - 33px);top:-10px;width:66px;height:22px;background:#cfad8eaa;box-shadow:0 1px 2px #38141d1c;transform:rotate(3deg);z-index:1}.scrapbook-gallery .rail-navigation{max-width:1100px;margin:auto;color:#e7d0bb}.scrapbook-gallery .rail-arrow{border-color:#edd7bf66;color:#f7ecdc;background:transparent}.scrapbook-gallery .rail-arrow:hover{background:#f7ecdc16}.scrapbook-gallery .gallery-credit{max-width:340px;font-size:10px;color:#e7d0bb;text-align:center}.scrapbook-afterword{font:italic 28px/1.2 var(--display);text-align:center;margin:30px 0 0;position:relative;z-index:1}.scrapbook-doodles{position:absolute;inset:0;pointer-events:none;z-index:0}.doodle{position:absolute;object-fit:contain;filter:brightness(0) invert(93%) sepia(12%) saturate(381%);opacity:.86}.star-one{width:58px;height:58px;top:90px;left:max(4%,calc(50% - 510px));transform:rotate(-18deg)}.star-two{width:42px;height:42px;bottom:90px;right:8%;transform:rotate(16deg)}.loop-one{width:100px;height:125px;right:8%;top:138px;transform:rotate(26deg)}.arrow-one{width:115px;height:110px;left:9%;bottom:70px;transform:rotate(143deg)}.scrapbook-gallery .gallery-open:hover{filter:brightness(1.025)}.wishes{padding-top:95px}.wishes h2{position:relative}.wishes h2:after{content:'';position:absolute;right:5%;top:-24px;width:50px;height:50px;background:var(--wine);mask:url('assets/scrapbook/doodle-star.svg') center/contain no-repeat;transform:rotate(12deg)}
@media(max-width:700px){.letter-cover .cover-graduation-sticker{width:87px;height:87px;right:-7px;bottom:30px;padding:12px}.scrapbook-gallery{padding:75px 0 55px;margin-top:40px}.scrapbook-gallery .keepsake-heading{padding:0 30px}.scrapbook-gallery h2{font-size:63px;line-height:.96}.scrapbook-gallery .small-note{font-size:11px}.scrapbook-gallery .gallery-rail{padding:34px 34px 42px;gap:26px;scroll-padding-left:34px;margin-top:12px}.scrapbook-gallery .gallery-open{flex-basis:240px}.scrapbook-gallery .gallery-open img{height:260px}.scrapbook-gallery .gallery-open:nth-child(2n){margin-top:24px}.scrapbook-gallery .rail-navigation{padding:0 24px}.scrapbook-afterword{max-width:230px;margin:30px auto 0;font-size:26px}.star-one{width:35px;height:35px;left:7%;top:48px}.loop-one{width:60px;height:80px;right:4%;top:150px;opacity:.65}.arrow-one{left:3%;width:75px;height:90px;bottom:80px}.star-two{right:7%;bottom:47px;width:30px;height:30px}.wishes h2:after{right:-3%;width:35px;height:35px;top:-30px}}
@media(prefers-reduced-motion:reduce){.scrapbook-gallery *{scroll-behavior:auto!important;transition:none!important}}
.cover-personal-caption{position:absolute;bottom:12px;left:18px;max-width:calc(100% - 135px);color:#fff8e8;background:#341a2480;padding:4px 9px;font:italic 20px/1.3 var(--display);text-shadow:0 1px 3px #0004;z-index:2}.cover-personal-caption[hidden]{display:none}.gallery-open figcaption[hidden]{display:none}
.diploma-one{width:86px;height:88px;right:5%;bottom:120px;transform:rotate(13deg);opacity:.68}@media(max-width:700px){.diploma-one{width:48px;height:52px;right:4%;bottom:125px;opacity:.55}}
/* Keep uploaded landscape/portrait proportions within a naturally sized frame. */
.scrapbook-gallery .gallery-open img{height:auto;max-height:430px;object-fit:contain;background:transparent}.scrapbook-gallery .gallery-open.is-wide{flex-basis:320px}.scrapbook-gallery .gallery-rail.has-single{justify-content:center}@media(max-width:700px){.scrapbook-gallery .gallery-open img{height:auto;max-height:390px}.scrapbook-gallery .gallery-open.is-wide{flex-basis:280px}.music-toggle{width:44px;height:44px;padding:5px;border-radius:50%;justify-content:center}.music-toggle .record{flex-shrink:0}.music-toggle #music-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}}
/* Sourced antique engravings; native SVG filters preserve every original line. */
.letter-cover .cover-graduation-sticker{width:102px;height:114px;right:-10px;bottom:36px;padding:9px;background:#fff7e6;border-radius:0;clip-path:polygon(10% 0,95% 4%,100% 96%,0 100%);filter:drop-shadow(0 4px 4px #341a2433)}
.letter-graduation-sticker{width:130px;height:auto;transform:rotate(-5deg);opacity:.9}
.wishes h2:after{display:none}
.engraving-anchors{position:absolute;inset:0;pointer-events:none}
.sticker-anchor{position:absolute;display:block;pointer-events:none}
.anchor-quill{left:max(4%,calc(50% - 600px));top:75px;width:174px;height:114px}
.anchor-bow{right:max(5%,calc(50% - 570px));top:102px;width:112px;height:122px}
.anchor-wreath{right:8%;bottom:85px;width:145px;height:88px}
.sticker-layer{position:absolute;left:0;top:0;width:100%;height:0;overflow-x:clip;overflow-y:visible;pointer-events:none;z-index:25}
.movable-sticker{position:absolute;left:0;top:0;display:block;padding:6px;border:0;border-radius:8px;background:transparent;min-width:44px;min-height:44px;touch-action:none;cursor:grab;pointer-events:auto;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent;transform-origin:center;contain:layout style}
.movable-sticker img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none;user-select:none;-webkit-user-drag:none;transform:rotate(var(--turn,-8deg));transition:transform .18s ease,filter .18s ease}
.quill-sticker{width:174px;height:114px;--turn:-12deg}.bow-sticker{width:112px;height:122px;--turn:13deg}.wreath-sticker{width:145px;height:88px;--turn:7deg}
.movable-sticker.on-wine img{filter:brightness(0) invert(.93) sepia(.16) saturate(.7)}
.movable-sticker:hover img{transform:rotate(calc(var(--turn) + 3deg)) scale(1.04)}
.movable-sticker.is-dragging{cursor:grabbing;z-index:2}.movable-sticker.is-dragging img{transform:rotate(calc(var(--turn) - 5deg)) scale(1.08);filter:drop-shadow(0 7px 4px #25131b33)}
.movable-sticker.is-dragging.on-wine img{filter:brightness(0) invert(.93) sepia(.16) saturate(.7) drop-shadow(0 7px 4px #25131b33)}
.movable-sticker[aria-pressed=true],.movable-sticker:focus-visible{outline:2px dashed #8d5d49;outline-offset:5px;background:#fff9e723}
.sticker-tools{position:relative;z-index:1;text-align:center;margin-top:26px;font-size:10px;color:#ead3bd}.sticker-tools p{margin:0 0 2px}.sticker-tools button{min-height:44px;padding:8px 14px;background:transparent;border:0;color:inherit;font:inherit;text-decoration:underline;text-underline-offset:4px;cursor:pointer}.sticker-tools button:focus-visible{outline:2px solid currentColor;outline-offset:2px}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important}
@media(max-width:700px){.letter-cover .cover-graduation-sticker{width:73px;height:80px;right:-5px;padding:7px}.letter-graduation-sticker{width:110px}.anchor-quill{left:3%;top:37px;width:75px;height:56px}.anchor-bow{right:3%;top:260px;width:65px;height:75px}.anchor-wreath{right:3%;bottom:124px;width:74px;height:51px}.quill-sticker{width:75px;height:56px}.bow-sticker{width:65px;height:75px}.wreath-sticker{width:74px;height:51px}.sticker-tools{font-size:9px;margin-top:24px}.scrapbook-afterword{margin-top:35px}}
@media(prefers-reduced-motion:reduce){.movable-sticker img{transition:none!important}.movable-sticker:hover img,.movable-sticker.is-dragging img{transform:rotate(var(--turn))}}
@media print{.sticker-layer,.sticker-tools{display:none!important}}
/* Annotated feedback: uncut photography and one shared burgundy paper stock. */
:root{--envelope-paper:#4d192d;--envelope-front:linear-gradient(15deg,#49162b,#5e2135);--envelope-texture:url('assets/public/original-ivory-paper.png');--envelope-grain-size:760px}
.envelope-back{background:var(--envelope-paper)}
.pocket-left{background:linear-gradient(35deg,#592035,#431326)}.pocket-right{background:linear-gradient(150deg,#562033,#381022)}.pocket-bottom{background:var(--envelope-front)}
.flap-front{background:linear-gradient(150deg,#63273a,#421427)}.flap-inside{background:#6c3543}.envelope-rear{background-color:var(--envelope-paper);background-image:var(--envelope-texture)}
.envelope-back:after,.pocket-left:after,.pocket-right:after,.pocket-bottom:after,.flap-front:after,.flap-inside:after,.gallery-paper:after{background:var(--envelope-texture) center/var(--envelope-grain-size) auto;mix-blend-mode:soft-light;opacity:.9}
.scrapbook-gallery{background:var(--envelope-paper)}.gallery-paper{position:absolute;inset:0;z-index:-1;background:var(--envelope-front);pointer-events:none}.gallery-paper:after{content:'';position:absolute;inset:0}
.letter-cover{height:auto;min-height:0;background:transparent;display:grid;place-items:center}
.letter-cover>img:first-child{display:block;width:auto;max-width:100%;height:auto;max-height:min(720px,72svh);object-fit:contain;object-position:center;filter:grayscale(.75) sepia(.12)}
.letter-cover .cover-graduation-sticker{padding:0;background:transparent;border-radius:0;clip-path:none;object-fit:contain;filter:drop-shadow(1px 1px .5px #fff1d2) drop-shadow(0 3px 1px #43132699) drop-shadow(0 9px 5px #2e0a2499);transform:rotate(11deg) translateZ(2px)}
.closing-engraving{display:block;width:110px;height:auto;margin:0 auto 30px;transform:rotate(-6deg);filter:drop-shadow(0 3px 2px #541e3026)}
.sticker-tools #reset-stickers{width:44px;height:44px;min-height:44px;padding:5px;border-radius:50%;text-decoration:none;font:24px/1 var(--body);color:#ead3bd}
@media(max-width:700px){.letter-cover{height:auto}.letter-cover .cover-graduation-sticker{padding:0}.closing-engraving{width:90px}}
.gallery-paper:after{background-size:cover;background-repeat:no-repeat}
/* Tactile side keepsakes frame the desktop hero envelope and clear during opening. */
.hero-keepsakes{--side-space:calc((100% - var(--env-w))/2);position:absolute;inset:0;pointer-events:none;z-index:4;overflow:hidden}
.hero-flank{position:absolute;top:8%;bottom:8%;width:clamp(148px,calc(var(--side-space) - 68px),214px);display:flex;flex-direction:column;justify-content:center;align-items:center;gap:clamp(16px,2.8vh,28px)}
.hero-flank-left{left:clamp(24px,calc((var(--side-space) - clamp(148px,calc(var(--side-space) - 68px),214px))*.52),132px)}
.hero-flank-right{right:clamp(24px,calc((var(--side-space) - clamp(148px,calc(var(--side-space) - 68px),214px))*.52),132px)}
.hero-polaroid{width:100%;margin:0;padding:10px 10px 15px;background:#fffaf0;border:1px solid #e2d3bc;box-shadow:0 14px 28px #3818221c,0 2px 6px #38182212;position:relative}
.hero-polaroid:before{content:'';position:absolute;left:calc(50% - 28px);top:-9px;width:56px;height:18px;background:#d3b493b8;box-shadow:0 1px 2px #38141d1a;transform:rotate(-3deg);z-index:1}
.polaroid-left{transform:rotate(-5.5deg)}.polaroid-right{transform:rotate(5deg)}.polaroid-right:before{transform:rotate(3.5deg)}
.hero-polaroid img{display:block;width:100%;height:clamp(145px,21svh,205px);object-fit:cover;object-position:center 24%;background:#ebe2d3;filter:sepia(.1) contrast(.98)}
.hero-polaroid figcaption{font:italic clamp(16px,1.3vw,20px)/1.15 var(--display);color:var(--ink);text-align:center;padding:10px 4px 0}
.hero-engraving{text-align:center;color:var(--faded)}
.hero-quill img{display:block;width:clamp(108px,9.2vw,146px);height:auto;margin:0 auto 7px;transform:rotate(-10deg);opacity:.88}
.hero-quill span{display:inline-block;font:9.5px/1.4 var(--body);letter-spacing:.13em;text-transform:uppercase;color:#6e524d;border-top:1px solid #b8a38d80;border-bottom:1px solid #b8a38d80;padding:3px 9px}
.hero-quill b{font-weight:500}
.hero-bow-group .hero-bow{display:block;width:clamp(78px,6.8vw,102px);height:auto;margin:0 auto 6px;transform:rotate(11deg);opacity:.88}
.hero-bow-group p{font:italic clamp(16px,1.25vw,19px)/1.18 var(--display);color:#694c49;margin:0}
body.static-letter .hero-keepsakes,body[data-hide-flanks="true"] .hero-keepsakes{display:none}
@media(max-width:960px){.hero-keepsakes{display:none}}
@media(max-height:720px) and (min-width:961px){.hero-flank{top:6%;bottom:6%;width:clamp(132px,calc(var(--side-space) - 64px),172px);gap:12px}.hero-polaroid{padding:7px 7px 11px}.hero-polaroid img{height:clamp(105px,18svh,135px)}.hero-quill img{width:96px}.hero-bow-group .hero-bow{width:70px}}
/* Theme palettes: Burgundy (default), Emerald Academy, Espresso Archive. */
body[data-theme="emerald"]{--wine:#1d4232;--envelope-paper:#1d4232;--envelope-front:linear-gradient(15deg,#183829,#26533f)}
body[data-theme="emerald"] .pocket-left{background:linear-gradient(35deg,#25523e,#173528)}
body[data-theme="emerald"] .pocket-right{background:linear-gradient(150deg,#224b39,#132c21)}
body[data-theme="emerald"] .flap-front{background:linear-gradient(150deg,#2a5c46,#18382a)}
body[data-theme="emerald"] .flap-inside{background:#32634d}
body[data-theme="espresso"]{--wine:#43291f;--envelope-paper:#43291f;--envelope-front:linear-gradient(15deg,#382118,#543428)}
body[data-theme="espresso"] .pocket-left{background:linear-gradient(35deg,#4f3125,#341e16)}
body[data-theme="espresso"] .pocket-right{background:linear-gradient(150deg,#4a2e22,#2c1912)}
body[data-theme="espresso"] .flap-front{background:linear-gradient(150deg,#59382b,#382118)}
body[data-theme="espresso"] .flap-inside{background:#634235}
/* Interactive keepsake toys: 4-Year Thermal Receipt & Gold Foil Scratch-Off Card. */
.keepsake-toys-section{max-width:1120px;margin:0 auto;padding:88px 28px 10px;overflow-x:clip}
.keepsake-toys-section[hidden]{display:none}
.keepsake-toys-section .keepsake-heading{text-align:center;margin:0 auto 42px}
.keepsake-toys-section .small-note{font-size:12px;color:var(--faded);margin:0 0 6px}
.keepsake-toys-section h2{font:500 clamp(44px,5.4vw,76px)/.95 var(--display);letter-spacing:-.03em;margin:0;color:var(--ink)}
.keepsake-toys-section h2 em{font-weight:400}
.keepsake-toys-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:36px;align-items:center;max-width:980px;margin:0 auto}
.keepsake-toys-grid.single-toy{grid-template-columns:minmax(0,460px);justify-content:center}
.keepsake-receipt-card[hidden],.keepsake-scratch-card[hidden]{display:none}
.receipt-paper{position:relative;max-width:410px;width:100%;margin:0 auto;padding:28px 24px 26px;background:#fffdf8;color:#271e1a;font:12px/1.55 "Courier New",Courier,monospace;box-shadow:0 18px 40px #2e161d1c,0 2px 6px #2e161d12;border-left:1px solid #eadfcd;border-right:1px solid #eadfcd;transform:rotate(-1.2deg)}
.receipt-paper:before,.receipt-paper:after{content:'';position:absolute;left:0;right:0;height:10px;background:radial-gradient(circle,transparent 4px,#fffdf8 4.5px) 0 0/12px 10px repeat-x}
.receipt-paper:before{top:-6px}.receipt-paper:after{bottom:-6px;transform:rotate(180deg)}
.receipt-top{text-align:center;border-bottom:1px dashed #b9a690;padding-bottom:12px;margin-bottom:14px}
.receipt-title{font-weight:700;font-size:13px;letter-spacing:.08em;margin:0 0 4px;color:var(--wine)}
.receipt-meta{margin:2px 0;font-size:11px;color:#6c584c}
.receipt-lines{margin:0;padding:0}
.receipt-line{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin:7px 0}
.receipt-line dt{flex:1;min-width:0;overflow-wrap:anywhere}
.receipt-line dd{margin:0;font-weight:700;white-space:nowrap;color:var(--wine)}
.receipt-total-row{display:flex;justify-content:space-between;align-items:center;gap:10px;border-top:1px dashed #b9a690;border-bottom:1px dashed #b9a690;padding:9px 0;margin:14px 0 16px;font-weight:700;font-size:12.5px}
.receipt-barcode{height:34px;margin:0 auto 8px;max-width:250px;background:repeating-linear-gradient(90deg,#261b18 0 2px,transparent 2px 5px,#261b18 5px 6px,transparent 6px 9px,#261b18 9px 13px,transparent 13px 16px);opacity:.85}
.receipt-thanks{text-align:center;font-size:10px;letter-spacing:.12em;color:#7a6558;margin:0}
.scratch-card-frame{max-width:440px;width:100%;margin:0 auto;padding:24px 22px 26px;background:#fffaf0;border:1px solid #e4d5be;box-shadow:0 18px 38px #2e161d18;transform:rotate(1deg)}
.scratch-card-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:4px}
.scratch-reset-btn{font-size:11px;min-height:32px;padding:2px 6px}
.scratch-instruction{margin:0 0 14px;font-size:12px;color:var(--faded)}
.scratch-stage{position:relative;width:100%;height:168px;border-radius:10px;overflow:hidden;background:var(--envelope-paper);color:#fff8ea;display:flex;align-items:center;justify-content:center;text-align:center;padding:18px;box-shadow:inset 0 2px 10px #00000045}
.scratch-secret-reveal{max-width:92%;pointer-events:none}
.scratch-eyebrow{display:block;font:10px/1.3 var(--body);letter-spacing:.16em;text-transform:uppercase;opacity:.76;margin-bottom:6px}
.scratch-secret-reveal p{margin:0;font:italic clamp(22px,2.4vw,29px)/1.18 var(--display);color:#fff8ea;overflow-wrap:anywhere}
.scratch-foil-canvas{position:absolute;inset:0;width:100%;height:100%;cursor:grab;touch-action:none}
.scratch-foil-canvas:active{cursor:grabbing}
/* Yearbook hand-signature pad in wish dialog & rendered signature on wish cards. */
.wish-signature-field{margin:14px 0 6px}
.wish-signature-field[hidden]{display:none}
.wish-sig-header{display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin-bottom:6px}
.wish-sig-header label{margin:0}
.wish-sig-pad-wrap{border:1px dashed #bfa98e;background:#fffdf8;border-radius:8px;overflow:hidden}
#wish-sig-canvas{display:block;width:100%;height:110px;touch-action:none;cursor:crosshair}
.wish-signature-img{display:block;max-width:155px;max-height:54px;width:auto;height:auto;margin:8px auto 4px;object-fit:contain;opacity:.9;pointer-events:none}
@media(max-width:820px){.keepsake-toys-grid{grid-template-columns:1fr;gap:28px}.keepsake-toys-section{padding:64px 18px 0}.receipt-paper,.scratch-card-frame{transform:none;padding:20px 16px}}
