.photo-mural-dialog{border:1px solid #dcc9c7;border-radius:20px;background:#faf8f5;color:#352a2e;width:min(1100px,calc(100% - 24px));max-height:94vh;padding:28px 34px;overflow:auto;box-shadow:0 20px 90px #291c2566}.photo-mural-dialog::backdrop{background:#26171cdb}.photo-mural-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;clear:both}.photo-mural-heading h2{margin:8px 0 22px}.photo-fullscreen,.photo-controls button{border:1px solid #d0aeb7;border-radius:25px;background:#fff;color:#803e4c;padding:9px 16px;cursor:pointer;font:inherit;font-size:14px}.photo-stage{position:relative;display:grid;place-items:center;min-height:260px;height:min(57vh,650px);background:#221b1e;border-radius:14px;overflow:hidden}.photo-stage p{color:#fff;max-width:380px;padding:30px;text-align:center;font-size:18px}.photo-stage img{width:100%;height:100%;object-fit:contain;position:absolute;inset:0}.photo-enter{animation:photo-arrive .9s ease both}@keyframes photo-arrive{from{opacity:0;transform:scale(1.035)}to{opacity:1;transform:scale(1)}}.photo-controls{display:flex;gap:14px;justify-content:center;align-items:center;margin:15px 0 20px}.photo-controls button{min-width:44px;min-height:44px}.photo-position{font-size:14px;min-width:50px;text-align:center}.photo-send-toggle{display:flex;margin:0 auto 15px;letter-spacing:.5px}.photo-upload-panel{border-top:1px solid #e4dad7;margin-top:24px;padding-top:14px}.photo-upload-panel h3{font-weight:400;color:#803e4c;font-size:26px;margin-bottom:10px}.photo-upload-panel p{font-size:15px;line-height:1.6}.photo-qr-wrap{display:flex;align-items:center;gap:25px;padding:20px;background:#f1e6e5;border-radius:14px;margin:20px 0}.photo-qr{flex:none;background:#fff;padding:10px;min-width:170px;min-height:170px}.photo-upload-url{overflow-wrap:anywhere;color:#803e4c;font-size:14px}.photo-upload-form{max-width:100%}.photo-upload-form input[name=sender]{margin:8px 0}.photo-upload-actions{display:flex;gap:12px;flex-wrap:wrap}.photo-file-label{display:inline-flex;align-items:center;position:relative;overflow:hidden;border:1px solid #803e4c;border-radius:30px;padding:13px 20px;background:#803e4c;color:#fff;cursor:pointer}.photo-file-label input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}.photo-file-label:focus-within{outline:3px solid #caa7b1;outline-offset:3px}.photo-consent{display:flex;gap:10px;align-items:flex-start;line-height:1.5}.photo-consent input{width:20px;height:20px;flex:none;margin-top:2px;accent-color:#803e4c}.photo-upload-status{padding:12px;background:#f1e6e5;border-radius:10px;white-space:pre-line}.photo-upload-status:empty{display:none}.photo-trap{position:absolute;left:-9999px;width:1px!important;height:1px}.photo-mural-dialog:fullscreen,.photo-mural-dialog.photo-expanded{width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;inset:0;border-radius:0}.photo-mural-dialog:fullscreen .photo-stage,.photo-expanded .photo-stage{height:calc(100dvh - 240px)}@media(max-width:600px){.photo-mural-dialog{padding:20px 16px}.photo-mural-heading{align-items:flex-start;gap:10px}.photo-mural-heading h2{font-size:30px}.photo-fullscreen{font-size:12px;padding:9px 12px;white-space:nowrap}.photo-stage{height:48vh}.photo-qr-wrap{flex-direction:column;text-align:center}.photo-upload-actions{flex-direction:column}.photo-file-label{justify-content:center;margin:5px 0}}@media(prefers-reduced-motion:reduce){.photo-enter{animation:none}}

/* Balanced slideshow toolbar */
.photo-toolbar{display:flex;align-items:center;justify-content:center;gap:28px;padding:20px 0 8px;flex-wrap:wrap}.photo-toolbar .photo-controls{margin:0;gap:10px}.photo-toolbar .photo-send-toggle{margin:0;min-height:46px;padding:11px 26px;font-size:15px}.photo-controls .photo-position{order:4;min-width:0;margin-left:4px;color:#79646c;font-variant-numeric:tabular-nums}.photo-position:empty{display:none}.photo-controls .photo-previous,.photo-controls .photo-next{width:44px;padding:0;font-size:23px;line-height:1}.photo-controls .photo-pause{min-width:96px}.photo-controls button{height:46px;display:inline-flex;align-items:center;justify-content:center}@media(max-width:600px){.photo-toolbar{flex-direction:column;gap:14px;padding-top:16px}.photo-toolbar .photo-send-toggle{min-width:180px}.photo-controls .photo-position{font-size:12px}}

.photo-selected-list{display:grid;gap:10px;margin:16px 0}.photo-selected-item{display:flex;align-items:center;gap:12px;padding:10px;border:1px solid #dcc9c7;border-radius:12px;background:#fff}.photo-selected-item img{width:64px;height:64px;object-fit:cover;border-radius:8px}.photo-selected-item span{flex:1;overflow-wrap:anywhere;font-size:14px;min-width:0}.photo-selected-item button{border:1px solid #c7a4ae;background:#fff;color:#803e4c;border-radius:20px;padding:8px 12px;cursor:pointer}.photo-upload-submit{margin-top:15px;letter-spacing:.3px}.photo-upload-submit:disabled{opacity:.65;cursor:wait}

.photo-exit-fullscreen{display:none}.photo-mural-dialog.photo-expanded,.photo-mural-dialog:fullscreen{position:fixed;inset:0;padding:0;border:0;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;overflow:hidden;background:#171214}.photo-expanded>.eyebrow,.photo-expanded>.calendar-close,.photo-expanded>.photo-mural-heading,.photo-expanded>.photo-upload-panel,.photo-mural-dialog:fullscreen>.eyebrow,.photo-mural-dialog:fullscreen>.calendar-close,.photo-mural-dialog:fullscreen>.photo-mural-heading,.photo-mural-dialog:fullscreen>.photo-upload-panel{display:none!important}.photo-mural-dialog.photo-expanded .photo-stage,.photo-mural-dialog:fullscreen .photo-stage{position:absolute;inset:0;width:100%;height:100%;border-radius:0}.photo-expanded .photo-toolbar,.photo-mural-dialog:fullscreen .photo-toolbar{display:none}.photo-expanded .photo-send-toggle,.photo-mural-dialog:fullscreen .photo-send-toggle{display:none}.photo-expanded .photo-controls,.photo-mural-dialog:fullscreen .photo-controls{background:#faf8f5e6;padding:8px 12px;border-radius:40px}.photo-expanded .photo-exit-fullscreen,.photo-mural-dialog:fullscreen .photo-exit-fullscreen{display:grid;place-items:center;position:absolute;top:max(10px,env(safe-area-inset-top));right:max(10px,env(safe-area-inset-right));z-index:5;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:transparent;color:#803e4c;cursor:pointer;font:400 25px/1 Arial,sans-serif}.photo-exit-fullscreen::before{content:"";position:absolute;inset:6px;border:1px solid #d0aeb799;border-radius:50%;background:#faf8f5e6;box-shadow:0 1px 5px #291c251a}.photo-exit-fullscreen span{position:relative}.photo-exit-fullscreen:hover::before{background:#fff;border-color:#803e4c}.photo-exit-fullscreen:focus-visible{outline:2px solid #faf8f5;outline-offset:2px;box-shadow:0 0 0 5px #803e4c}

.photo-status-sending,.photo-status-sent{display:flex;align-items:center;gap:12px;min-height:56px}.photo-status-sending::before{content:"";flex:0 0 22px;width:22px;height:22px;border:3px solid #d8bfc5;border-top-color:#803e4c;border-radius:50%;animation:photo-send-spin .8s linear infinite}.photo-status-sent{background:#eef5ed;color:#375a3b;border:1px solid #bfd1bc;animation:photo-send-success .4s ease-out}.photo-status-sent::before{content:"✓";display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border-radius:50%;background:#557c54;color:#fff;font:bold 21px Arial,sans-serif}@keyframes photo-send-spin{to{transform:rotate(360deg)}}@keyframes photo-send-success{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.photo-status-sending::before,.photo-status-sent{animation:none}}


/* A cloth-bound wedding album, with a full photograph on every paper leaf. */
.photo-stage{background:radial-gradient(ellipse at 50% 30%,#efe5db,#d9c8bc);padding:24px 28px 28px;box-sizing:border-box;perspective:1800px;isolation:isolate;overflow:hidden}
.photo-stage>p{color:#74505a;z-index:4}
.photo-book{position:relative;width:100%;height:100%;max-width:960px;min-height:0;background:#803e4c;border-radius:8px 13px 13px 8px;padding:10px 12px 13px 30px;box-sizing:border-box;box-shadow:0 16px 26px #492e3933,0 3px 5px #492e3933;perspective:1800px}
.photo-book[hidden]{display:none}
.photo-book:before{content:'';position:absolute;inset:14px 7px 6px 26px;border-radius:2px 7px 7px 2px;background:repeating-linear-gradient(0deg,#dfd3c1 0px,#dfd3c1 1px,#fffcf4 1px,#fffcf4 3px);box-shadow:1px 2px 2px #321d2933}
.photo-book-spine{position:absolute;inset:0 auto 0 0;width:23px;border-radius:7px 0 0 7px;background:linear-gradient(90deg,#542635,#9c5769 40%,#713346 90%);border-right:1px solid #c49b8477}
.photo-book-spine:after{content:'';position:absolute;inset:18px 7px;border-left:1px solid #d1ad8980;border-right:1px solid #d1ad8940}
.photo-book-page{position:absolute;inset:10px 12px 13px 30px;border-radius:2px 5px 5px 2px;background:linear-gradient(90deg,#e6ddcf,#fffaf1 4%,#fffdf8 70%,#f5eddf);box-shadow:inset 8px 0 12px -9px #4c2939;transform-origin:left center;backface-visibility:hidden;overflow:hidden}
.photo-stage .photo-book-page img{position:absolute;inset:18px 22px 42px;width:calc(100% - 44px);height:calc(100% - 60px);object-fit:contain;object-position:center;image-orientation:from-image;filter:none;animation:none;transform:none}
.photo-book-caption{position:absolute;bottom:14px;left:22px;right:22px;text-align:center;color:#96715e;font:italic 13px Georgia,serif;letter-spacing:.08em}
.photo-book-page:after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,#412c2400 55%,#412c2400);opacity:0}
.photo-turn-sheet{z-index:2;pointer-events:none;animation:album-turn 3s cubic-bezier(.35,.04,.22,1) both;box-shadow:12px 5px 25px #38212c44}
.photo-turn-sheet:after{animation:album-shade 3s ease both}
.photo-page-reveal{animation:album-reveal 3s ease both}
@keyframes album-turn{0%{transform:rotateY(0deg) skewY(0deg)}28%{transform:rotateY(-24deg) skewY(-1deg)}65%{transform:rotateY(-80deg) skewY(-2deg)}100%{transform:rotateY(-178deg) skewY(0deg)}}
@keyframes album-shade{0%{opacity:0}40%{opacity:.6;background:linear-gradient(90deg,transparent,#573c3040 60%,#573c3090)}75%{opacity:.9}100%{opacity:0}}
@keyframes album-reveal{0%,20%{filter:brightness(.78)}100%{filter:brightness(1)}}
.photo-mural-dialog.photo-expanded .photo-stage,.photo-mural-dialog:fullscreen .photo-stage{padding:22px 32px 24px;background:radial-gradient(ellipse at center,#42313a,#191317)}
.photo-expanded .photo-book,.photo-mural-dialog:fullscreen .photo-book{max-width:1400px}
@media(max-width:600px){.photo-stage{height:55vh;min-height:290px;padding:16px 12px 20px}.photo-book{padding-left:22px}.photo-book-spine{width:16px}.photo-book-spine:after{inset:16px 5px}.photo-book-page{left:22px;right:9px}.photo-stage .photo-book-page img{inset:12px 10px 34px;width:calc(100% - 20px);height:calc(100% - 46px)}.photo-book-caption{bottom:10px;font-size:10px;letter-spacing:.03em}.photo-mural-dialog.photo-expanded .photo-stage,.photo-mural-dialog:fullscreen .photo-stage{padding:18px 10px 18px}}
@media(orientation:landscape) and (max-height:500px){.photo-mural-dialog.photo-expanded .photo-stage,.photo-mural-dialog:fullscreen .photo-stage{padding:10px 16px 12px}}
@media(prefers-reduced-motion:reduce){.photo-turn-sheet{display:none}.photo-page-reveal{animation:none}}

/* Flexible leaf: curved strips reveal the ivory back of the sheet. */
.photo-book-page.photo-turn-sheet{background:transparent;overflow:visible;animation:none;box-shadow:none;backface-visibility:visible;pointer-events:none}.photo-turn-sheet:after{display:none}.photo-turn-sheet>canvas{position:absolute;left:-100%;top:-15%;width:200%;height:130%;max-width:none}.photo-page-reveal{animation:none}

/* Upload rejection: a clear error icon without continuous flashing. */
.photo-status-error{display:flex;align-items:flex-start;gap:14px;padding:16px;border:1px solid #c88d98;background:#fff0f1;color:#872e43;overflow-wrap:anywhere;line-height:1.6}.photo-status-error::before{content:'×';display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border-radius:50%;background:#963e53;color:#fff;font:700 28px/1 Arial,sans-serif;animation:photo-error-attention .85s ease-in-out 3}.photo-status-error:empty{display:none}@keyframes photo-error-attention{0%,100%{transform:scale(1) rotate(0);box-shadow:0 0 0 0 #963e5333}35%{transform:scale(1.14) rotate(-9deg);box-shadow:0 0 0 7px #963e5300}65%{transform:scale(1.08) rotate(9deg)}}@media(prefers-reduced-motion:reduce){.photo-status-error::before{animation:none}}

.photo-tapes{position:absolute;pointer-events:none;z-index:1}.photo-tapes i{position:absolute;width:clamp(28px,7.5cqw,48px);height:clamp(9.5px,2.55cqw,16.32px);background:linear-gradient(110deg,#803e4ccc,#98576bcc,#803e4ccc);border:1px solid #ffe1df47;box-sizing:border-box;box-shadow:0 1px 2px #3c152333;transform:translate(-50%,-50%) rotate(-45deg)}.photo-book-page{container-type:inline-size}.photo-tapes i:nth-child(1){left:0;top:0}.photo-tapes i:nth-child(2){left:100%;top:0;transform:translate(-50%,-50%) rotate(45deg)}.photo-tapes i:nth-child(3){left:0;top:100%;transform:translate(-50%,-50%) rotate(45deg)}.photo-tapes i:nth-child(4){left:100%;top:100%}

/* Keep the floating close control separate from the album heading on phones. */
@media(max-width:600px){dialog.photo-mural-dialog[open]>button.calendar-close{margin:0 0 12px 12px;top:0}.photo-mural-dialog>.eyebrow{min-height:44px;display:flex;align-items:center;margin:0 60px 12px 0;line-height:1.6}.photo-mural-dialog .photo-mural-heading{clear:both;flex-direction:column;align-items:flex-start;gap:12px;margin-bottom:18px}.photo-mural-dialog .photo-mural-heading h2{margin:0;font-size:30px}.photo-mural-dialog .photo-fullscreen{align-self:flex-start;min-height:44px;padding:10px 18px;font-size:14px;margin:0}}

/* TV: a two-sided paper leaf, animated as one GPU transform. */
body.photo-tv-view>:not(.photo-mural-dialog){visibility:hidden}body.photo-tv-view>:not(.photo-mural-dialog) *{animation-play-state:paused!important}
body.photo-tv-view .photo-book{perspective:2200px;perspective-origin:0% 50%}
.photo-book-page.photo-turn-sheet.photo-tv-turn{background:none;border-radius:0;box-shadow:none;overflow:visible;contain:none;container-type:normal;transform-style:preserve-3d;backface-visibility:visible;transform-origin:0% 50%;animation:photo-tv-natural-turn 3s cubic-bezier(.45,.04,.25,1) both;will-change:transform}
.photo-tv-turn:after{display:none}
.photo-book-page.photo-tv-front,.photo-tv-back{position:absolute;inset:0;border-radius:2px 5px 5px 2px;backface-visibility:hidden;-webkit-backface-visibility:hidden;box-shadow:3px 4px 9px #3b232626}
.photo-book-page.photo-tv-front{transform:translateZ(.3px);background:#fffaf1}
.photo-tv-back{transform:rotateY(180deg) translateZ(.3px);background:linear-gradient(90deg,#e1d2bd 0%,#f5ead9 3%,#fffaf1 12%,#fffdf7 85%,#eadbc5 100%);border:1px solid #e7dac5;box-sizing:border-box}
.photo-tv-front:after{display:block;content:'';position:absolute;inset:0;background:linear-gradient(90deg,transparent 65%,#69473535 97%,#fff7e2aa);animation:photo-tv-paper-light 3s ease both;pointer-events:none}
@keyframes photo-tv-natural-turn{0%{transform:rotateY(0deg)}100%{transform:rotateY(-179.5deg)}}
@keyframes photo-tv-paper-light{0%,100%{opacity:0}45%,65%{opacity:.65}}
@media(prefers-reduced-motion:reduce){.photo-book-page.photo-tv-turn{display:none;animation:none}.photo-tv-front:after{animation:none}}

/* Keep the photo in the same composited face as the paper on TV engines. */
.photo-book-page.photo-tv-front{container-type:normal;contain:none;isolation:auto;transform-style:flat}.photo-tv-front img{backface-visibility:visible;-webkit-backface-visibility:visible}.photo-book-page.photo-tv-front .photo-tapes i{width:40px;height:14px}

/* Sender and date remain attached to the paper, below the photograph. */
.photo-stage .photo-book-page img{bottom:66px;height:calc(100% - 84px)}.photo-book-caption{bottom:12px;left:16px;right:16px;display:flex;flex-direction:column;gap:5px;letter-spacing:.02em;line-height:1.3}.photo-credit-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:500 14px Georgia,serif;color:#803e4c}.photo-credit-date{font:italic 12px Georgia,serif;color:#876c5c}.photo-credit-date:empty{display:none}@media(max-width:600px){.photo-stage .photo-book-page img{bottom:62px;height:calc(100% - 74px)}.photo-book-caption{bottom:10px;left:10px;right:10px}.photo-credit-name{font-size:12px}.photo-credit-date{font-size:11px}}

/* Videos share the album leaf and keep portrait/landscape framing intact. */
.photo-stage .photo-book-page video.mural-video{position:absolute;inset:18px 22px 66px;width:calc(100% - 44px);height:calc(100% - 84px);object-fit:contain;object-position:center;border:0;background:transparent;animation:photo-arrive .5s ease both}
.photo-stage .photo-book-page video[hidden],.photo-stage .photo-book-page img[hidden]{display:none!important}
@media(max-width:600px){.photo-stage .photo-book-page video.mural-video{inset:12px 10px 62px;width:calc(100% - 20px);height:calc(100% - 74px)}.photo-credit-date{letter-spacing:0;font-size:10px}}
@media(prefers-reduced-motion:reduce){.photo-stage .photo-book-page video.mural-video{animation:none}}

.photo-mural-dialog.photo-upload-mode>.photo-stage,.photo-mural-dialog.photo-upload-mode>.photo-toolbar,.photo-mural-dialog.photo-upload-mode>.photo-mural-heading,.photo-mural-dialog.photo-upload-mode>.eyebrow{display:none}
.photo-upload-mode>.photo-upload-panel{border:0;padding:0;margin:0}
.photo-upload-return{display:inline-flex;align-items:center;min-height:44px;border:1px solid #d2b3bc;border-radius:25px;background:transparent;color:#803e4c;font:14px Georgia,serif;padding:8px 18px;margin:0 65px 18px 0;cursor:pointer}
.photo-upload-return:hover{background:#f0e2e4}

/* Static video frame attached to the turning TV leaf, never a cloned player. */
.photo-tv-front canvas.photo-video-still{position:absolute;inset:18px 22px 66px;width:calc(100% - 44px);height:calc(100% - 84px);object-fit:contain;max-width:none;backface-visibility:visible;-webkit-backface-visibility:visible}
@media(max-width:600px){.photo-tv-front canvas.photo-video-still{inset:12px 10px 62px;width:calc(100% - 20px);height:calc(100% - 74px)}}

/* Loading never adds a grid row or displaces the album. It is used only before the first item. */
.photo-stage>p{position:absolute;inset:0;max-width:none;margin:0;display:grid;place-items:center;box-sizing:border-box}
.photo-stage>p[hidden]{display:none}
.photo-stage .photo-book-page video.mural-video-preload{opacity:0;pointer-events:none;animation:none}

/* Keep video-to-paper handoff visually identical and retain its decoder through the turn. */
.photo-stage .photo-book-page video.mural-video-retired{opacity:0;pointer-events:none;animation:none}
.photo-book-page.photo-tv-front.photo-video-page{background:linear-gradient(90deg,#e6ddcf,#fffaf1 4%,#fffdf8 70%,#f5eddf);box-shadow:inset 8px 0 12px -9px #4c2939}
