/* Guest-only design system; app assets and owner controls are independent. */
:root[data-theme],:root{--bg:#fdfbf7;--panel:#fffefd;--surface:#f5f1e8;--fg:#101b45;--muted:#596889;--border:#eee9df;--accent:#b78122;--accent-fg:#fff;color-scheme:light}
body{background:var(--bg)!important;color:var(--fg);font-family:system-ui,-apple-system,'Segoe UI',sans-serif;padding-bottom:90px}
body::before{background:linear-gradient(#fffdfbe8,#f7f4ecf5),url('/gallery-leaves.svg') center/cover!important;opacity:1!important;position:fixed!important;pointer-events:none}
.brandbar{height:80px!important;padding:14px 18px!important;background:#fffefbf5!important;border:0!important;gap:10px;max-width:560px}
.brand-symbol,.brand-symbol img{width:37px!important;height:37px!important;object-fit:contain}
.brandbar strong{font:500 25px/1.15 Georgia,serif!important;color:var(--fg)}
.brandbar small{font-size:10px!important;margin-top:4px;color:var(--muted)}
.brandbar button{width:32px!important;height:32px!important;padding:0;border:0!important;background:none!important;flex-shrink:0}
.hero{max-width:560px;height:270px!important;min-height:270px!important;border:0;border-radius:0!important}
.hero-inner{padding:20px 18px 34px!important}.hero h1{font-size:23px!important;line-height:1.4!important}.hero p{font-size:12px!important}
.gallery-sheet{max-width:560px!important;padding:14px 14px 26px!important;border-radius:24px 24px 0 0!important;background:var(--panel)!important;box-shadow:0 8px 24px #4a351308}
.album-summary{padding:0 0 12px!important;gap:12px!important}.album-summary img{width:80px!important;height:70px!important;border-radius:12px!important}
.album-summary strong{font-size:15px!important}.album-summary small{font-size:11px!important}
.album-stats{gap:6px!important;margin:0 0 12px!important}.album-stats>div{background:#faf8f3!important;border:1px solid var(--border)!important;padding:10px 2px!important;border-radius:12px!important}
.album-stats strong{font-size:20px!important}.album-stats small{font-size:9px!important}.album-stats svg{width:23px!important;height:23px!important;color:var(--accent)}
.browse-controls button,.browse-controls select{border:1px solid var(--border)!important;border-radius:10px!important;min-height:42px!important;background:white;color:var(--fg)}
.browse-controls button[aria-pressed=true]{background:linear-gradient(110deg,#d4ad60,#b07a20)!important;color:#fff!important}
.browse-controls select{max-width:62%!important;font-size:12px!important}
#gallery{gap:8px!important;padding:0!important;max-width:560px}.photo{border-radius:12px!important;aspect-ratio:1.5!important;box-shadow:none!important}
.favorite-button{top:6px!important;right:6px!important}.favorite-button svg{width:25px!important;height:25px!important}.favorite-button.liked{color:#d5a148}
.guest-nav{width:min(100%,560px)!important;height:calc(72px + env(safe-area-inset-bottom));padding:8px 4px calc(8px + env(safe-area-inset-bottom))!important;background:#fffefbf5!important;backdrop-filter:blur(14px);border-top:1px solid var(--border)!important;box-shadow:none!important;align-items:center;z-index:110}
.guest-nav button{color:#788295!important;font-size:22px}.guest-nav span{font-size:10px!important;margin-top:4px}.guest-nav button.current{color:var(--accent)!important}
#floating-more{width:62px!important;height:62px!important;bottom:calc(94px + env(safe-area-inset-bottom))!important;right:max(22px,calc((100vw - 560px)/2 + 22px))!important;border:2px solid #c59643!important;background:white!important;border-radius:50%!important;box-shadow:0 6px 18px #6b4d1d22!important;padding:14px!important;z-index:109}
#floating-more img{width:100%!important;height:100%!important;object-fit:contain}
#guest-more{width:min(310px,calc(100vw - 42px))!important;right:max(22px,calc((100vw - 560px)/2 + 22px))!important;bottom:calc(168px + env(safe-area-inset-bottom))!important;padding:8px 16px!important;background:#fff!important;border:1px solid var(--border)!important;border-radius:22px!important;box-shadow:0 12px 36px #49361b25!important;color:var(--fg);z-index:109}
#guest-more button{min-height:58px!important;border:0!important;border-bottom:1px solid var(--border)!important;background:none!important;color:var(--fg)!important;font-size:13px!important;gap:12px!important;padding:12px 0!important}#guest-more button:last-child{border-bottom:0!important}#guest-more button svg{width:25px!important;height:25px!important;color:var(--accent)!important}#guest-more button small{font-size:9px!important;color:var(--muted)!important}
#face-search-dialog[open]{width:min(560px,100%)!important;max-width:560px!important;margin:0 auto!important;left:0!important;right:0!important;top:auto!important;bottom:auto!important;height:auto!important;max-height:none!important;background:var(--bg)!important;border:0!important;border-radius:0!important;padding:0 16px calc(100px + env(safe-area-inset-bottom))!important;box-sizing:border-box;color:var(--fg)}
#face-search-dialog .face-toolbar{margin:0 -16px!important;padding:16px!important;height:76px!important;min-height:76px!important;background:var(--panel)!important;position:sticky;top:0;z-index:4}
.face-toolbar strong{font-size:18px!important}.face-toolbar button{min-width:36px;min-height:36px}
.face-intro{margin:0 -16px!important;padding:40px 16px 26px!important}.face-intro h2{font-size:28px!important}.face-intro p{font-size:13px!important}
.face-upload-card{border-radius:22px!important;padding:16px!important;background:white!important}.face-upload-border{padding:16px!important;border-color:#d6b776!important;border-radius:16px!important}
.face-selfie-row{gap:14px!important}.selfie-avatar{width:86px!important;height:86px!important}.face-selfie-row h3{font-size:19px!important}.face-selfie-row p{font-size:12px!important;color:var(--muted)!important}
.face-pickers label{min-height:46px;border-radius:12px!important;font-size:15px!important}.selfie-file-label,#start-face-search{background:linear-gradient(110deg,#d4ad60,#b07a20)!important;color:white!important}
.face-consent{font-size:11px!important;line-height:1.6!important}.face-private-note{font-size:11px!important}.face-samples strong{font-size:12px!important}.face-results h3{font-size:19px!important}
body[data-screen=face] #gallery{grid-template-columns:repeat(3,minmax(0,1fr))!important}.face-results .photo{aspect-ratio:1!important}
.favorites-heading{padding:12px 4px 24px!important}.favorites-heading h2{font-size:26px!important}.favorites-heading p{font-size:15px!important}.favorites-heading small{font-size:11px!important}
body[data-screen=favorites] .hero{height:235px!important;min-height:235px!important}body[data-screen=favorites] .photo{aspect-ratio:1.5!important}body[data-screen=favorites] .favorite-button{background:white!important;color:var(--accent)!important;border-radius:50%!important}
.tools.downloads-open{background:#faf7ef!important;border:1px solid var(--border)!important;border-radius:16px!important;padding:12px!important;margin:12px 0!important}.tools-actions button{min-height:44px;border-radius:10px!important}
#guest-info{border:1px solid var(--border)!important;border-radius:22px!important;background:white!important;color:var(--fg)!important;max-width:calc(100% - 32px);padding:24px}
.empty-gallery{padding:44px 20px!important;color:var(--muted);line-height:1.7}
#viewer{z-index:200}body:has(#viewer[open]) .guest-nav{display:none!important}
@media(min-width:700px){body{max-width:560px;margin:auto;box-shadow:0 0 50px #42341712}html{background:#ebe7df}.hero{height:300px!important}.gallery-sheet{min-height:60vh}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
.expiry-card{padding:65px 28px;text-align:center;line-height:1.8}.expiry-card>svg{width:100px;height:100px;color:var(--accent)}.expiry-card h1{font-size:27px;line-height:1.5;margin-top:25px}.expiry-card p{color:var(--muted);font-size:14px}.expiry-card small{display:block;margin-top:28px;font-size:11px;color:var(--muted)}
.reference-empty{grid-column:1/-1;background:#fffdfa;border-radius:20px;padding:35px 20px!important;text-align:center;line-height:1.8;min-height:240px;box-sizing:border-box}.empty-illustration{width:120px;height:100px;margin:15px auto;color:#c7a66b}.empty-illustration svg{width:100%;height:100%}.reference-empty h3{font-size:22px;color:var(--fg);margin:16px 0 8px}.reference-empty p{font-size:13px;color:var(--muted);margin-bottom:20px}.reference-empty button{padding:12px 28px;border:1px solid #ba8831;border-radius:12px;background:linear-gradient(110deg,#d4ad60,#b07a20);color:#fff;font:inherit;font-size:14px;min-height:46px}
.favorites-heading{position:relative;background:url('/gallery-leaves.svg') center/cover no-repeat}.favorites-heading svg{color:var(--accent);width:30px;height:30px;vertical-align:middle;margin-right:8px}.tools.downloads-open .tools-inner{display:block}.tools.downloads-open .tools-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:15px}.tools.downloads-open .tools-copy strong{font-size:18px}.tools.downloads-open .tools-copy small{display:block;margin-top:7px}.tools.downloads-open .tools-actions button{font-size:12px;padding:12px;min-height:46px}.tools.downloads-open .tools-actions button[hidden]{display:none}.tools.downloads-open #download-selected-zip{background:linear-gradient(110deg,#d4ad60,#b07a20);color:#fff;border:1px solid #bd8b32}.face-results .reference-empty{min-height:230px}.face-upload-border{background:#fff}.face-pickers label{font-weight:600}#guest-info-text{white-space:pre-line;line-height:1.9;font-size:14px}#guest-info h2{font-size:22px;color:var(--fg)}
/* The public album uses the same approved visual contract, with public data only. */
.brandbar{height:70px!important}.brandbar strong{font-size:23px!important}.brandbar small{display:none!important}.brand-symbol{overflow:hidden;position:relative}.brand-symbol img{width:46px!important;height:46px!important;max-width:none!important;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}
.album-summary{display:none!important}.album-stats{grid-template-columns:74px repeat(3,minmax(0,1fr))!important;gap:3px!important;border:1px solid var(--border)!important;border-radius:15px!important;background:#fff!important;padding:10px!important;margin:0 0 14px!important;align-items:center!important;min-height:95px!important}.album-stats>img{width:74px!important;height:74px!important;border-radius:9px!important;object-fit:cover!important;grid-column:1!important;grid-row:1!important}.album-stats>div{background:none!important;border:0!important;padding:5px 2px!important;min-height:0!important}.album-stats>div:has(#stat-captured),.album-stats>div:has(#stat-uploaded),.album-stats>div:has(#stat-pending){display:none!important}.album-stats>div:has(#stat-total){grid-column:2!important;grid-row:1!important}.album-stats>div:has(#stat-hearts){grid-column:3!important;grid-row:1!important}.album-stats>div:has(#stat-views){grid-column:4!important;grid-row:1!important}.album-stats small{font-size:9px!important}.album-stats strong{font-size:18px!important}.album-stats svg{width:22px!important;height:22px!important}.guest-nav{height:66px!important}.guest-nav span{font-size:10px!important}.guest-nav svg{width:24px!important;height:24px!important}.brandbar #guest-profile{border-radius:50%!important;background:#f3eddf!important}.face-upload-border{border-radius:15px!important}.favorites-heading h2{font-size:24px!important}.favorites-heading p{font-size:13px!important}.favorites-heading small{font-size:10px!important}#gallery{gap:6px!important}.photo{border-radius:11px!important}.floating-menu-logo{padding:14px!important}#photo-sort{font-size:11px!important}body[data-screen=favorites] #gallery{margin-top:8px!important}
.brandbar>div{min-width:0!important;flex:1!important}.brandbar>div strong,.brandbar>div small{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;display:block!important}.brandbar>button,.brandbar>.brand-symbol{flex-shrink:0!important}
.brandbar::before{left:5px!important}.brandbar::after{right:5px!important}
/* Composed covers retain the photographer's full selected frame at any viewport width. */
html[data-composed-cover="true"] body .hero{height:auto!important;min-height:0!important;aspect-ratio:5 / 3!important}

/* Photo viewer shares the existing gallery palette and retains its blurred photo backdrop. */
#viewer{--viewer-gold:var(--accent);box-sizing:border-box;width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;padding:0;border:0;border-radius:0;overflow:hidden;background:var(--bg);color:var(--fg)}
#viewer[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto;isolation:isolate}
#viewer::backdrop{background:var(--bg)}
#viewer #viewer-background{position:absolute;inset:-35px;width:calc(100% + 70px);height:calc(100% + 70px);max-width:none;object-fit:cover;filter:blur(30px) brightness(1.03);z-index:-2;pointer-events:none}
#viewer .viewer-shade{position:absolute;inset:0;background:linear-gradient(180deg,#fdfbf7ed,#fdfbf7b8 45%,#fdfbf7ed);z-index:-1;pointer-events:none}
#viewer .viewer-header{position:relative;display:flex;align-items:flex-start;justify-content:center;padding:calc(22px + env(safe-area-inset-top)) 64px 10px;min-height:96px;box-sizing:border-box}
#viewer .viewer-heading{position:static;transform:none;display:flex;flex-direction:column;gap:5px;text-align:center;max-width:100%;color:var(--fg)}
#viewer #viewer-brand{font-family:Georgia,serif;font-weight:400;font-size:28px;color:var(--viewer-gold);line-height:1.1}
#viewer #viewer-album{font-size:12px;line-height:1.5;overflow-wrap:anywhere}
#viewer #photo-position{font-size:12px;color:var(--muted)}
#viewer #close,#viewer #viewer-top-favorite{position:absolute;top:calc(23px + env(safe-area-inset-top));width:40px;height:40px;min-height:0;padding:0;border:1px solid var(--border);border-radius:50%;background:#fffefbe6;color:var(--fg);display:grid;place-items:center}
#viewer #close{left:18px;font-size:28px;line-height:1}#viewer #viewer-top-favorite{right:18px;color:var(--viewer-gold)}
#viewer svg{width:23px;height:23px;flex-shrink:0}#viewer .liked svg{fill:var(--viewer-gold);stroke:var(--viewer-gold)}
#viewer .viewer-stage{position:relative;min-height:0;display:flex;align-items:center;justify-content:center;padding:12px 18px}
#viewer #large{position:static;display:block;width:100%;height:100%;max-width:1100px;max-height:100%;object-fit:contain;border-radius:8px;touch-action:pan-y pinch-zoom}
#viewer .viewer-arrow{top:50%;transform:translateY(-50%);width:36px;height:36px;min-height:0;border:1px solid #fff9;border-radius:50%;padding:0;background:#fffefbe6;color:var(--fg);font-size:29px;line-height:1;display:grid;place-items:center}
#viewer .viewer-arrow.previous{left:25px}#viewer .viewer-arrow.next{right:25px}#viewer .viewer-arrow:disabled{opacity:.25;cursor:default}
#viewer .viewer-footer{position:relative;margin:0;padding:10px 18px calc(18px + env(safe-area-inset-bottom));background:none}
#viewer .viewer-actions{position:static;display:flex;justify-content:space-around;align-items:center;gap:9px;padding:12px 10px;border:1px solid var(--border);border-radius:22px;background:#fffefbe8;backdrop-filter:blur(15px);max-width:520px;margin:0 auto 14px}
#viewer .viewer-actions button,#viewer .viewer-actions a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-width:44px;min-height:51px;padding:0 5px;border:0;background:none;color:var(--fg);border-radius:14px;text-decoration:none;font-size:14px}
#viewer .viewer-actions small{font-size:10px;white-space:nowrap;line-height:1.3}#viewer .viewer-actions #download{flex:1;max-width:140px;flex-direction:row;gap:6px;min-height:46px;padding:0 10px;background:linear-gradient(120deg,#d5ad62,var(--accent));color:var(--accent-fg);box-shadow:0 3px 12px #0003}#viewer #download small{font-size:12px;font-weight:600}#viewer [hidden]{display:none!important}
#viewer #viewer-thumbnails{position:static;display:flex;justify-content:center;gap:7px;height:57px;max-width:520px;margin:auto;overflow-x:auto;padding:3px;box-sizing:border-box}
#viewer #viewer-thumbnails button{box-sizing:border-box;flex:0 0 64px;width:64px;height:48px;min-height:0;padding:0;border:2px solid transparent;border-radius:6px;background:var(--surface);overflow:hidden}
#viewer #viewer-thumbnails img{width:100%;height:100%;object-fit:cover;display:block}#viewer #viewer-thumbnails button.current{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}
#viewer button:focus-visible,#viewer a:focus-visible{outline:2px solid var(--viewer-gold);outline-offset:3px}
@media(orientation:landscape) and (max-height:550px){#viewer .viewer-header{min-height:65px;padding-top:10px}#viewer #viewer-brand{font-size:20px}#viewer #viewer-album{font-size:10px}#viewer #close,#viewer #viewer-top-favorite{top:12px}#viewer .viewer-footer{padding-top:2px;padding-bottom:6px}#viewer .viewer-actions{padding:4px;margin-bottom:5px}#viewer #viewer-thumbnails{height:39px}#viewer #viewer-thumbnails button{height:32px}#viewer .viewer-stage{padding-top:2px;padding-bottom:2px}}
.brandbar{min-height:88px!important;height:auto!important;padding-top:10px!important;padding-bottom:10px!important;box-sizing:border-box}.brandbar .brand-symbol.custom-brand-logo{width:var(--customer-logo-size)!important;height:var(--customer-logo-size)!important;flex:0 0 var(--customer-logo-size);overflow:visible;background:none;border-radius:0}.brandbar .brand-symbol.custom-brand-logo img{width:100%!important;height:100%!important;position:static!important;transform:none!important;object-fit:contain!important;max-width:100%!important}#brand-app-credit{display:block;font:10px/1.4 sans-serif;color:#8a7250;letter-spacing:.3px}.brandbar>div{min-width:0}.brandbar strong{display:block;overflow-wrap:anywhere}
.brandbar #photographer-name{display:inline!important}.brandbar #brand-app-credit{display:inline!important;margin-left:6px;white-space:nowrap}

.brandbar #brand-app-credit{font-size:5px!important}
