/* Approved final-page layout; all font URLs are locally hosted OFL subsets. */
@font-face{font-family:'WH5 Alex Brush';src:url('assets/fonts/alex-brush.woff2') format('woff2');font-display:swap;font-weight:400}
@font-face{font-family:'WH5 Cormorant';src:url('assets/fonts/cormorant.woff2') format('woff2');font-display:swap;font-weight:400}
@font-face{font-family:'WH5 Cormorant';src:url('assets/fonts/cormorant-600.woff2') format('woff2');font-display:swap;font-weight:600}
@font-face{font-family:'WH5 WenKai';src:url('assets/fonts/wenkai.woff2') format('woff2');font-display:swap;font-weight:400}
/* All visual changes are scoped to the approved four scenes. */
#scene1 .ending-title{top:27%;left:24%;right:24%;color:#483b34}
#scene1 .ending-script{font-family:'WH5 Alex Brush','Times New Roman',serif;font-size:calc(var(--canvas-width,390px)*.052);font-weight:400;line-height:1.4;letter-spacing:0;margin:0;min-height:1.4em;color:#58383e;font-synthesis:none;white-space:nowrap}
#scene1 .ending-serif{font-family:'WH5 Cormorant',Georgia,serif;font-size:calc(var(--canvas-width,390px)*.025);letter-spacing:.06em;line-height:1.5;margin:6px 0 8px;min-height:1.5em;white-space:nowrap}
#scene1 .ending-union{font-size:calc(var(--canvas-width,390px)*.048);white-space:nowrap}
#scene1 .ending-date{font-size:calc(var(--canvas-width,390px)*.031);margin-top:6px}
#sceneLetter .ornament-rose{width:56px;height:43px;right:3px;top:28px}
#sceneLetter .ornament-lemon{width:56px;height:52px;left:0;bottom:8px}
#sceneLetter .ornament-glasses{width:52px;height:52px;right:1px;bottom:8px}
#sceneLetter .leaf{width:24px;height:24px}
#sceneLetter .leaf.a{left:-4px}#sceneLetter .leaf.b{right:-4px}
#sceneLetter .banquet-table{position:absolute;z-index:1;width:105%;height:auto;right:-23%;bottom:-8%;margin:0;transform:rotate(18deg);opacity:.30;filter:saturate(1.15) contrast(1.03);object-fit:contain;pointer-events:none;-webkit-mask-image:linear-gradient(transparent,black 38%);mask-image:linear-gradient(transparent,black 38%)}
#sceneLetter .letter-scroll{padding-bottom:8px}
#sceneLetter .letter{top:36px}
#sceneLetter .mini-rule{margin:7px auto 9px}
#sceneLetter .message{line-height:1.55}
#sceneLetter .message p{margin-bottom:7px}
#sceneLetter .message p:first-child{line-height:1.55;margin-bottom:9px}
#sceneLetter .message p:last-child{margin-bottom:0}
#scene2 .invite-scroll{position:absolute;inset:0 0 max(54px,calc(2.75rem + 2px));overflow:auto;overscroll-behavior:contain;scrollbar-width:none;-webkit-overflow-scrolling:touch;touch-action:pan-y pinch-zoom;text-align:center;padding:24px 8% 6px;z-index:10}
#scene2 .invite-scroll::-webkit-scrollbar{display:none}
#scene2 .s2-title{font-family:'WH5 Cormorant',Georgia,serif;font-size:max(1.375rem,calc(var(--canvas-width,390px)*.058));line-height:1.12;letter-spacing:.015em;margin:0 0 4px;font-weight:600;min-height:2.24em;color:#58383e;font-synthesis:none}
#scene2 .s2-sub{font-family:'WH5 Cormorant','Times New Roman',serif;font-size:max(.75rem,calc(var(--canvas-width,390px)*.031));letter-spacing:.08em;line-height:1.3;color:#27344c;margin:0 auto 4px;min-height:2.6em;max-width:95%}
#scene2 .photo-wrap{width:53%;aspect-ratio:1;margin:0 auto 4px;position:relative}
/* 53% of the 84%-wide inner column is 44.52% of the scene width. */
#scene2 .photo-wrap:after{display:none}
#scene2 .portrait-clip{position:absolute;inset:0;--portrait-x:-10%;--portrait-y:-8%;--portrait-scale:1.12;-webkit-mask:url('assets/heart-mask.svg') center/100% 100% no-repeat;mask:url('assets/heart-mask.svg') center/100% 100% no-repeat;overflow:hidden}
#scene2 .heart-photo{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 26%;transform:translate(var(--portrait-x),var(--portrait-y)) scale(var(--portrait-scale));transform-origin:center}
#scene2 .heart-edge{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
#scene2 .s2-names{font-family:'WH5 Alex Brush','Times New Roman',serif;font-size:max(1.5rem,calc(var(--canvas-width,390px)*.077));font-weight:400;line-height:1.25;letter-spacing:0;margin:2px 0 4px;min-height:1.25em;color:#58383e;font-synthesis:none}
#scene2 .s2-rule{margin:2px auto 6px;width:30px}
#scene2 .s2-meta{font-family:'WH5 Cormorant',Georgia,'Noto Serif SC','Songti SC',serif;font-size:max(.875rem,calc(var(--canvas-width,390px)*.035));letter-spacing:0;line-height:1.65;overflow-wrap:anywhere;margin:0 auto 4px;max-width:100%}
#scene2 .s2-meta strong{font-weight:600}
#scene2 .dress-label{font-family:'WH5 Cormorant',Georgia,serif;font-size:.75rem;line-height:1.4;letter-spacing:.06em;margin:4px 0}
#scene2 .dress-section{opacity:0}
#scene2 .dress-open{display:block;width:49%;max-width:170px;margin:0 auto;background:transparent;border:0;padding:0;color:#756b61;cursor:zoom-in}
#scene2 .dress-open img{display:block;width:100%;height:auto;object-fit:contain}
#scene2 .dress-open span{display:block;font-size:.75rem;line-height:1.5;padding:2px 0 0}
#scene2 .continue{bottom:0;height:max(52px,2.75rem);left:0;right:0;width:100%;transform:none!important;background:linear-gradient(transparent,#f8f3e9 25%);font-size:.6875rem;padding:10px 5px 4px;color:#807367}
#scene2 .continue:after{content:'⌃'}
body.thanks-reading{background:var(--paper) url('assets/bg_paper.png') center/cover no-repeat}
#sceneThanks .thanks-scroll{position:absolute;inset:0;overflow:auto;overscroll-behavior:contain;text-align:center;padding:32px 9% 22px;display:flex;flex-direction:column;align-items:center;scrollbar-width:none;touch-action:pan-y pinch-zoom}
#sceneThanks .thanks-emblem{display:block;width:100%;height:auto;object-fit:contain;margin:22px auto 0;flex-shrink:0}
#sceneThanks .thanks-copy{font-family:'WH5 WenKai','STKaiti','KaiTi',serif;font-size:max(1.375rem,calc(var(--canvas-width,390px)*.061));line-height:1.85;letter-spacing:.04em;color:#564943;margin:auto 0 0;padding:30px 0 0;flex-shrink:0;max-width:100%}
#sceneThanks .thanks-copy p{margin:0}
#sceneThanks .thanks-rule{width:30%;height:1px;background:#a98668;margin:20px auto;flex-shrink:0}
#sceneThanks .thanks-names{font-family:'WH5 Alex Brush','Times New Roman',serif;color:#58383e;font-size:2rem;font-weight:400;letter-spacing:0;line-height:1.6;margin-bottom:auto;font-synthesis:none}
#sceneThanks .hotel-tips{font-size:.8125rem;line-height:1.9;text-align:center;color:#5c544b;overflow-wrap:anywhere;margin:45px 0 20px;flex-shrink:0;width:100%}
#sceneThanks .thanks-date{font-family:'WH5 Cormorant',Georgia,serif;font-size:.75rem;letter-spacing:.15em;color:#a58b70;flex-shrink:0}
#app .music-toggle{position:absolute;z-index:310;right:12px;top:12px;border:0;border-radius:999px;background:rgba(248,244,236,.87);color:#665a51;padding:7px 10px;font-size:11px;max-width:65%;line-height:1.4;cursor:pointer}
#dressDialog{padding:0;border:1px solid #b5a08e;border-radius:8px;color:#40362e;background:#f7f2e8;width:min(94vw,900px);height:min(92dvh,900px);max-height:92vh;overflow:hidden;display:flex;flex-direction:column}
#dressDialog::backdrop{background:rgba(40,33,26,.65)}
#dressDialog .dress-toolbar{display:flex;align-items:center;gap:8px;padding:10px 12px;min-height:58px;flex-shrink:0;background:#f7f2e8}
#dressDialog .dress-toolbar h2{margin:0 auto 0 0;font-family:'WH5 Cormorant',Georgia,serif;font-size:clamp(18px,1.25rem,24px);min-width:0}
#dressDialog button{border:1px solid #b5a08e;border-radius:999px;background:transparent;color:inherit;padding:7px 10px;cursor:pointer;font-size:clamp(14px,.875rem,20px);white-space:nowrap;flex-shrink:0}
#dressDialog .dress-inspect{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;touch-action:pan-x pan-y pinch-zoom}
#dressDialog img{display:block;width:100%;height:auto;max-width:none;margin:0 auto}
#dressDialog.zoomed img{width:max(100%,1122px)}
#dressDialog:not([open]){display:none}
/* Legacy-WebView fallback keeps the same modal semantics and close/back handling. */
#dressDialog.dialog-fallback[open]{display:flex;position:fixed;z-index:1000;inset:4vh 3vw;margin:auto;box-shadow:0 0 0 100vmax rgba(40,33,26,.65)}
#app.dress-viewing>.scene,#app.dress-viewing>.debug,#app.dress-viewing>.music-toggle{pointer-events:none}
#app.is-final-debug .debug{top:44px}
body.is-debug #app #sceneLetter .letter{top:var(--debug-clearance,210px)}
body.is-debug #scene2 .invite-scroll{padding-top:var(--debug-clearance,210px)}
body.is-debug #sceneThanks .thanks-scroll{padding-top:var(--debug-clearance,210px)}
@media(max-height:580px){#sceneThanks .thanks-scroll{padding-top:20px}#sceneThanks .thanks-copy{padding-top:24px}#sceneThanks .hotel-tips{margin-top:28px}#sceneLetter .ornament-rose{width:50px;height:38px;top:22px}}
@media(prefers-reduced-motion:reduce){#scene2 .continue:after{animation:none}}
#sceneLetter .letter-asset-status{position:absolute;z-index:20;left:12%;right:12%;bottom:52px;background:#f7f2e8;border:1px solid #b5a08e;color:#975d62;padding:5px;font-size:11px}
#sceneThanks .thanks-asset-status{flex-shrink:0;border:1px solid #b5a08e;background:#f7f2e8;color:#975d62;padding:5px;font-size:11px}
/* R3: raster paint only; existing line boxes, animation, text and fallback stay. */
.script-raster{position:relative}
.script-raster .script-image{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none;opacity:0}
.script-loaded .script-original{opacity:0}
.script-loaded .script-image{opacity:1}
