@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500&display=swap');
:root{--navy:#142337;--deep:#0c1827;--gold:#d8ad65;--cream:#fcf8f0;--ink:#26303a;--line:#dfd8cf}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--cream);color:var(--ink);font:16px/1.7 'DM Sans',Arial,sans-serif}a{color:inherit}.skip{position:absolute;left:-200vw}.skip:focus{left:10px;top:10px;z-index:99;background:white;padding:8px}.top{height:82px;display:flex;justify-content:space-between;align-items:center;padding:0 max(6vw,20px);background:var(--deep);color:#fff}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;font-size:17px;font-weight:700}.monogram{border:1px solid var(--gold);color:var(--gold);width:40px;height:40px;display:grid;place-items:center;font:700 15px Georgia,serif;letter-spacing:1px}.top nav{display:flex;gap:30px}.top nav a{text-decoration:none;font-size:14px;color:#e0dfdc}.top nav a:hover{color:var(--gold)}.hero{min-height:680px;background:radial-gradient(circle at 75% 55%,#314760 0%,#132338 44%,#0a1726 100%);color:#fff;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(250px,.75fr);gap:7vw;align-items:center;padding:80px max(8vw,25px)}.hero-copy{max-width:660px}.kicker,.smallcaps{color:#b38749;letter-spacing:.2em;font-size:12px;font-weight:700}.hero .kicker{color:var(--gold)}h1,h2,h3{font-family:'Playfair Display',Georgia,serif;font-weight:500;line-height:1.2}h1{font-size:clamp(42px,5vw,76px);letter-spacing:-.025em;margin:24px 0}h1 em{color:#e0bd7a;font-weight:500}.lead{font-size:18px;line-height:1.9;color:#dbe2ec;max-width:520px}.actions{display:flex;flex-wrap:wrap;gap:14px;margin:32px 0}.btn{display:inline-flex;align-items:center;justify-content:center;gap:12px;text-decoration:none;padding:13px 24px;border-radius:4px;font-size:14px;font-weight:700;transition:transform .2s}.btn:hover{transform:translateY(-2px)}.gold{background:var(--gold);color:#142337}.line{border:1px solid #7b8796;color:#fff}.quote{margin-top:42px;font:italic 22px Georgia,serif;color:#dec08e}.cover-frame{max-width:390px;margin:auto;transform:rotate(2deg);filter:drop-shadow(18px 24px 24px #030b1588)}.cover-frame img{width:100%;height:auto;display:block;border:4px solid #ead4a2;box-shadow:0 0 0 1px #574a39}.section{padding:90px max(8vw,25px)}.story{display:grid;grid-template-columns:1.1fr .9fr;gap:12%;align-items:center}.story h2,.book-section h2{font-size:clamp(35px,4vw,55px);margin:14px 0 24px}.story>div:first-child{max-width:650px}.story p{color:#5a626a}.story-card{background:#eae1d4;padding:52px 42px;min-height:260px;border-left:3px solid #bb9454}.story-card p{font:italic 28px/1.5 Georgia,serif;color:#343a43}.signature{font-size:13px;color:#7f6c55}.book-section{background:#f0eae1}.book-heading{display:flex;justify-content:space-between;align-items:end;gap:20px}.book-heading h2{margin-bottom:5px}.subtitle{margin-top:4px;color:#746b63}.outline-dark{border:1px solid #536071;white-space:nowrap}.book-explain{max-width:820px;color:#615e5b;margin:25px 0}.reader{border:1px solid #cfc8be;background:white;box-shadow:0 20px 60px #27354417;border-radius:9px;overflow:hidden}.reader-toolbar,.reader-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 18px;background:#172739;color:white}.toolbar-left,.toolbar-right{display:flex;align-items:center;gap:12px}.tool,.page-btn{font:600 13px 'DM Sans',Arial,sans-serif;cursor:pointer;background:#fff2;color:#fff;border:1px solid #ffffff40;padding:8px 13px;border-radius:4px}.tool:hover,.page-btn:hover:not(:disabled){background:#ffffff33}.tool:disabled,.page-btn:disabled{opacity:.35;cursor:not-allowed}.primary-tool{background:#d8ad65;color:#18263a;border-color:#d8ad65}.book-status{font-size:12px;color:#cfdae5}.reader-stage{position:relative;height:min(72vh,720px);min-height:440px;background:#fbfaf7}.reader-placeholder{height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:30px}.reader-placeholder img{height:190px;width:auto;box-shadow:4px 8px 18px #0003}.reader-placeholder h3{font-size:27px;margin:18px 0 0}.reader-placeholder p{color:#757575;font-size:14px}.reader-placeholder.error p{max-width:550px;color:#934343}#viewer{height:100%;width:100%}.reader-footer{background:#23344a}.reader-footer #progress{font-size:12px;text-align:center;color:#e0e6ee}.reader-help{margin:0;padding:12px 18px;font-size:12px;color:#736e68;background:#fff}.farewell{text-align:center;padding:82px 20px;background:#132338;color:#e4be7c}.farewell p{font:italic clamp(28px,4vw,48px) Georgia,serif;margin:0 0 12px}.farewell span{color:#c2cbd6;font-size:13px}footer{display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px;background:#091522;color:#aeb8c6;padding:25px max(8vw,25px);font-size:12px}@media(max-width:780px){.top{height:70px}.top nav{gap:12px}.top nav a{font-size:12px}.hero{grid-template-columns:1fr;padding-top:62px;gap:40px}.cover-frame{max-width:270px}.quote{margin-top:22px}.story{grid-template-columns:1fr;gap:30px}.section{padding-top:65px;padding-bottom:65px}.book-heading{align-items:start;flex-direction:column}.reader-toolbar{padding:10px;flex-wrap:wrap}.reader-stage{height:65vh;min-height:400px}.book-status{font-size:11px}.toolbar-left{flex:1}.reader-footer{padding:9px}.page-btn{padding:10px}.story-card{padding:30px}.story-card p{font-size:23px}}@media(max-width:400px){.brand span:last-child{font-size:14px}.top nav a:first-child{display:none}.book-status{max-width:110px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}}
/* Version 4: ensure hidden opening screen cannot cover the loaded book */
[hidden], .reader-placeholder[hidden], .photo-fallback[hidden] {display:none !important}
#viewer{position:relative;display:block;min-height:100%;z-index:1}
.reader-placeholder{position:absolute;inset:0;z-index:2;background:#fbfaf7}
.story-photo{max-width:470px;margin:auto;text-align:center}
.story-photo img{width:100%;max-height:530px;object-fit:contain;object-position:center;border-radius:10px;box-shadow:0 14px 42px #1020342d;background:#e9e2d6}
.story-photo .photo-caption{font:italic 17px Georgia,serif;color:#7c694e;margin:16px auto 0}
.photo-fallback{padding:42px 24px;background:#eae1d4;border-radius:8px}
.chapter-select{color:#fff;background:#253b54;border:1px solid #ffffff55;border-radius:4px;padding:8px;max-width:210px;font:600 13px Arial,sans-serif}
.chapter-select option{color:#18263a;background:#fff}
@media(max-width:780px){.chapter-select{max-width:132px}.toolbar-right{width:100%;justify-content:flex-end}.reader-stage{height:68vh}}

/* V5 family biography and page-view presentation */
.hero{background:radial-gradient(ellipse at 76% 43%,#3b526c 0%,#142438 46%,#08121f 100%)}
.hero-copy h1{max-width:810px}.story{background:linear-gradient(125deg,#fffcf6,#eae3d8)}
.reader-stage{height:min(76vh,800px);min-height:480px;background:#efe6d7}
.reader{box-shadow:0 24px 70px #17253530;border-radius:12px}
#viewer{background:#fdfaf4}
.reader-footer{min-height:58px}
.memories{background:#faf6ee;display:flex;justify-content:center;text-align:center}
.memories-inner{max-width:760px}.memories h2{font-size:clamp(32px,4vw,56px)}
.memories-inner>p:not(.kicker){font-size:17px;color:#59616b}
.memories-note{font-size:13px!important;color:#786d60!important;border-top:1px solid #d8cfbf;padding-top:22px;margin-top:32px}
.reader:fullscreen{display:flex;flex-direction:column;border:0;border-radius:0;height:100vh;background:#fbf7f0}
.reader:fullscreen .reader-stage{flex:1;min-height:0;height:auto}
.reader:fullscreen .reader-help{display:none}
.reader:fullscreen .reader-footer{min-height:54px}
.reader:fullscreen .reader-toolbar{flex-shrink:0}
@media (max-width:780px){.top nav a[href="#memories"]{display:none}.reader-stage{height:67vh;min-height:390px}.toolbar-right{flex-wrap:wrap;gap:6px}.memories{padding:75px 22px}}

/* Moderated family photographs */
.memories-inner{max-width:1120px;width:100%}.gallery-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:23px;margin:34px auto 50px;text-align:left}.gallery-grid figure{margin:0;background:white;border:1px solid #e5dccf;border-radius:10px;overflow:hidden;box-shadow:0 8px 22px #14233713}.gallery-grid img{width:100%;height:250px;object-fit:cover;display:block}.gallery-grid figcaption{padding:15px 17px;font-size:14px;line-height:1.5;color:#384254}.gallery-grid figcaption strong{display:block;margin-bottom:5px;color:#172739}.gallery-empty{grid-column:1/-1}.share-card{max-width:680px;margin:45px auto 0;text-align:left;background:white;border:1px solid #e4d9c6;border-radius:13px;padding:clamp(20px,4vw,42px);box-shadow:0 12px 38px #17273915}.share-card h3{font-size:31px;margin:0 0 10px}.share-card>p{color:#5b646d}.upload-form{display:grid;gap:18px;margin-top:22px}.upload-form label:not(.consent){display:grid;gap:7px;font-size:14px;font-weight:700}.upload-form input:not([type=checkbox]),.upload-form textarea{border:1px solid #c4bdaf;background:#fffefb;border-radius:5px;padding:12px;font:inherit;width:100%;min-width:0}.upload-form input:focus,.upload-form textarea:focus{outline:2px solid #d8ad65}.upload-form .consent{display:flex;align-items:flex-start;gap:10px;text-align:left;font-size:13px;line-height:1.5}.consent input{margin-top:4px}.upload-note{font-size:12px!important;color:#746f68!important;margin:0}.upload-form button{cursor:pointer;border:0;justify-self:start}.honeypot{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}#submission-message{margin:0;font-size:14px!important}.share-card .success{color:#166039}.share-card .error{color:#923633}

/* V7: family photo album. No cropped photos. */
.gallery-grid{display:block;columns:3 240px;column-gap:20px;text-align:left;margin:34px auto 50px}
.gallery-grid figure{display:inline-block;width:100%;break-inside:avoid;page-break-inside:avoid;vertical-align:top;margin:0 0 20px;background:#fff;border:1px solid #e5dccf;border-radius:12px;overflow:hidden;box-shadow:0 8px 26px #14233716;transition:transform .18s ease,box-shadow .18s ease}
.gallery-grid figure:hover{transform:translateY(-3px);box-shadow:0 14px 38px #14233722}
.gallery-grid .photo-view{display:block;width:100%;padding:0;border:0;background:#eee7dd;cursor:zoom-in}
.gallery-grid .photo-view:focus-visible{outline:3px solid #b68a43;outline-offset:-3px}
.gallery-grid img{display:block;width:100%;height:auto;max-height:none;object-fit:contain;background:#eee7dd}
.gallery-grid figcaption{padding:16px 18px;font-size:14px;line-height:1.55;overflow-wrap:anywhere}
.gallery-grid figcaption strong{font-size:14px}
.gallery-grid .gallery-empty{column-span:all;text-align:center}
.photo-lightbox[hidden]{display:none!important}
.photo-lightbox{position:fixed;inset:0;z-index:9999;background:rgba(9,17,28,.97);display:flex;flex-direction:column;color:#fff;padding:12px clamp(12px,3vw,38px) 20px}
.lightbox-top{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:42px;color:#d4dce4;font-size:13px}
.lightbox-top button{background:#ffffff1c;border:1px solid #ffffff55;border-radius:6px;color:#fff;font:600 14px system-ui;padding:10px 16px;cursor:pointer}
.lightbox-content{display:grid;grid-template-columns:52px minmax(0,1fr) 52px;align-items:center;gap:10px;flex:1;min-height:0;max-width:1300px;width:100%;margin:auto}
.lightbox-content figure{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;min-height:0;height:100%;margin:0}
.lightbox-content img{display:block;max-width:100%;max-height:calc(100dvh - 190px);width:auto;height:auto;object-fit:contain;border-radius:4px;box-shadow:0 12px 48px #0007}
.lightbox-content figcaption{width:100%;max-width:780px;text-align:center;padding:14px 0 0;line-height:1.45;color:#d8d8d8;font-size:14px;overflow-wrap:anywhere}
.lightbox-content figcaption strong{display:block;color:#fff;margin-bottom:3px}
.lightbox-content figcaption span{display:block;max-height:3.2em;overflow:auto}
.lightbox-arrow{border:1px solid #ffffff55;background:#ffffff18;border-radius:50%;color:#fff;font-size:32px;width:48px;height:48px;cursor:pointer}
.lightbox-arrow:disabled{opacity:.22;cursor:default}
body.photo-lightbox-open{overflow:hidden}
@media(max-width:680px){.gallery-grid{columns:2 145px;column-gap:12px}.gallery-grid figure{margin-bottom:12px}.gallery-grid figcaption{padding:11px 12px;font-size:12px}.lightbox-content{grid-template-columns:34px minmax(0,1fr) 34px;gap:4px}.lightbox-arrow{width:34px;height:42px;border-radius:6px;font-size:25px}.lightbox-content img{max-height:calc(100dvh - 210px)}.photo-lightbox{padding:10px 7px 16px}}
@media(max-width:380px){.gallery-grid{columns:1}}

/* V8: gallery discovery and compact photo sharing CTA */
.share-invitation{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:45px auto 0;background:#fff;border:1px solid #e5d8c2;border-radius:14px;padding:25px 30px;text-align:left;box-shadow:0 9px 28px #182b3a0d}
.share-invitation h3{font:normal 30px/1.2 Georgia,serif;margin:0 0 8px;color:#192b39}.share-invitation p{margin:0;color:#5b646d;font-size:15px}.share-invitation .btn{flex-shrink:0;text-decoration:none}
.album-filters{display:flex;flex-wrap:wrap;justify-content:center;gap:14px;align-items:end;margin-top:32px}.album-filters label{display:grid;gap:6px;text-align:left;color:#425161;font-size:13px;font-weight:700}.album-filters select,.album-filters button,.upload-form select{font:inherit;border:1px solid #c5b9a5;border-radius:7px;background:#fff;padding:10px 13px;color:#1c2d3e;min-width:155px}.album-filters button{cursor:pointer;min-width:auto}.album-count{margin:14px 0 0!important;font-size:13px!important;color:#69727c!important}
.gallery-grid figure[hidden]{display:none!important}
.share-page{max-width:1050px;margin:0 auto;padding:65px 24px 90px}.share-page-intro{text-align:center;max-width:760px;margin:auto}.share-page-intro h1{font:normal clamp(40px,5vw,68px)/1.12 Georgia,serif;color:#192b39;margin:12px 0 18px}.share-page-intro p{color:#51606b;font-size:17px}.share-page .share-card{margin:35px auto;max-width:700px}.upload-form select{width:100%;min-width:0;background:#fffefb}.share-page .share-card h3{font:normal 33px/1.2 Georgia,serif}.share-page .share-card .success,.share-page .share-card .error{padding:12px 15px;border-radius:7px;background:#ecf4ec}.share-page .share-card .error{background:#faece7}
@media(max-width:700px){.share-invitation{flex-direction:column;align-items:flex-start;padding:22px}.share-invitation h3{font-size:25px}.album-filters{justify-content:stretch}.album-filters label{flex:1;min-width:135px}.album-filters select{width:100%;min-width:0}}
