body{padding-bottom:env(safe-area-inset-bottom)}.guest{max-width:640px;margin:auto;padding:20px 16px 32px}.setup-panel{margin-top:22px}.setup-panel h1{font-size:clamp(2rem,7vw,3.2rem);letter-spacing:-.045em;line-height:1.06;margin:.3em 0}.setup-panel p{line-height:1.55}.mode{display:grid;grid-template-columns:1fr 1fr;gap:8px}.mode button{padding:12px 10px}.mode button.active{background:#8BAE98;color:#193E35}.source-panel{margin-top:22px}.source-panel h2{font-size:1.2rem}.source-panel>button,.search-instead{width:100%}.search-instead{margin-top:16px}button:disabled{opacity:.45;cursor:default}button:focus-visible,input:focus-visible{outline:3px solid #8BAE98;outline-offset:3px}
.slideshow-message{max-width:min(760px,calc(100vw - 32px));margin:0 auto 8px;text-align:center;font-size:clamp(.82rem,2.2vw,1rem);line-height:1.35;color:#f4faf7;text-shadow:0 2px 12px #000;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.slideshow-message:empty,.grid-layout .slideshow-message{display:none}
body.watching{overflow:hidden;background:#101D19;padding:0}.player{position:fixed;inset:0;height:100vh;height:100dvh;background:#101D19;color:#fff;isolation:isolate;overflow:hidden}.photo-stage,.slide,.player-veil{position:absolute;inset:0;width:100%;height:100%}.slide{object-fit:contain;opacity:0;transition:opacity .65s ease;background:#101D19}.slide.visible{opacity:1}.player-veil{z-index:1;background:linear-gradient(180deg,#03101bca,transparent 24%,transparent 52%,#03101bef);pointer-events:none}.player-header{position:absolute;inset:0 0 auto;z-index:4;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:max(14px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) 12px max(14px,env(safe-area-inset-left))}.player .glass{color:#fff;background:#193E35bd;border:1px solid #ffffff38;backdrop-filter:blur(10px);padding:10px 14px;min-height:44px;font-size:.9rem}.player-brand{display:flex;align-items:center;gap:7px;font-weight:750;font-size:1rem}.player-brand img{width:30px;height:30px}.empty-state{position:absolute;z-index:2;inset:21% 24px auto;text-align:center;margin:auto;max-width:430px}.empty-state>img{width:60px;opacity:.8}.empty-state h1{font-size:clamp(1.55rem,6vw,2.4rem);letter-spacing:-.035em;line-height:1.15;margin:18px 0 10px}.empty-state p{color:#c4d5df;font-size:.97rem;line-height:1.6;margin:0}.player-footer{position:absolute;inset:auto 0 0;z-index:4;padding:14px max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}.player-message{font-size:.9rem;line-height:1.4;max-width:100%;margin:0 0 10px;text-shadow:0 2px 10px #000;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:1.25em}.playback{display:flex;align-items:center;justify-content:space-between;gap:10px}.playback>span{font-size:.8rem;color:#d5e4ed;font-variant-numeric:tabular-nums}.playback-buttons{display:flex;gap:6px}.playback-buttons .glass{min-width:44px;padding:8px 12px}.playback-buttons button:first-child,.playback-buttons button:last-child{font-size:1.6rem;line-height:1}.camera-pip{position:absolute;right:max(16px,env(safe-area-inset-right));bottom:calc(122px + env(safe-area-inset-bottom));width:clamp(120px,34vw,220px);aspect-ratio:3/4;max-height:32vh;border:2px solid #e0faf2bd;border-radius:18px;overflow:hidden;z-index:3;background:#193E35;box-shadow:0 8px 30px #0008;transition:width .2s,max-height .2s}.camera-pip video{width:100%;height:100%;object-fit:cover;transform:scaleX(-1)}.camera-pip.rear video{transform:none}.guide{position:absolute;inset:17% 15% 21%;border:2px solid #d8fff0ce;border-radius:44%;pointer-events:none}.pip-top{position:absolute;inset:5px 5px auto;display:flex;align-items:center;justify-content:space-between;gap:3px}.pip-top>span{font-size:.62rem;background:#101D1999;border-radius:6px;padding:4px 5px}.player .pip-top button{min-height:36px;min-width:36px;padding:2px 7px;font-size:1.2rem}.pip-expand{position:absolute;bottom:5px;right:5px;background:#101D19a8;color:#fff;font-size:.65rem;padding:6px 8px;border-radius:8px;min-height:30px}
.search-dialog{width:min(92vw,520px);border:0;border-radius:26px;padding:24px;color:var(--ink);background:var(--cream);box-shadow:0 22px 70px #0005}.search-dialog::backdrop{background:#101D19b0;backdrop-filter:blur(8px)}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.dialog-heading h2{margin:0;font-size:1.4rem}.dialog-heading button{min-width:44px;min-height:44px;padding:8px}.search-dialog input{font-size:16px}.search-dialog form>button,.search-dialog>button{width:100%}.search-dialog>button{margin-top:12px}.search-dialog[open]{max-height:85vh;overflow:auto}.search-dialog.fallback{position:fixed;inset:10vh 0 auto;z-index:10;margin:auto}.search-dialog.fallback:not([open]){display:none}
@media(orientation:landscape) and (max-height:560px){.player-header{padding-top:10px}.camera-pip{width:130px;max-height:42vh;bottom:104px}.empty-state{inset:24% 180px auto 32px;text-align:left;max-width:460px}.empty-state>img{display:none}.empty-state h1{margin-top:0}.player-footer{padding-top:6px;padding-bottom:10px}.player-message{max-width:70%;margin-bottom:4px}.player .glass{min-height:38px;padding:7px 12px}}
@media(min-width:800px){.camera-pip{width:220px;aspect-ratio:4/3}.player-footer{padding:24px 28px}.empty-state{inset:28% 25% auto}.player-brand{font-size:1.25rem}.player-header{padding:20px 28px}}
@media(prefers-reduced-motion:reduce){.slide,.camera-pip{transition:none}}

/* The preview has its own movable area, above the always-visible controls. */
.camera-pip{width:clamp(150px,36vw,220px);max-height:min(32vh,var(--pip-space,32vh));touch-action:none;user-select:none;cursor:grab;transition:none}
.camera-pip:active{cursor:grabbing}.camera-pip:focus-visible{outline:3px solid #8BAE98;outline-offset:3px}
.pip-top>span{line-height:1.35}.pip-top small{font-size:.58rem;opacity:.85}.pip-bottom{position:absolute;bottom:5px;left:5px;right:5px;display:flex;justify-content:space-between;gap:4px}.pip-bottom .pip-expand{position:static;min-height:36px;flex:1;padding:6px;font-size:.7rem}

.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.search-dialog #mic.listening{background:#b33f31;color:white}.search-dialog #mic.listening::before{content:'●';margin-right:8px}.playback>span{max-width:45%}
@media(orientation:landscape) and (max-height:560px){.camera-pip{width:150px;max-height:min(42vh,var(--pip-space,42vh))}}

/* Contain image stacking below the controls and camera preview. */
.photo-stage{isolation:isolate;z-index:0}

.capture-countdown{position:absolute;right:6px;bottom:max(21%,46px);width:24px;height:28px;display:grid;place-items:center;pointer-events:none;z-index:3;font-size:20px;line-height:1;font-weight:600;font-variant-numeric:tabular-nums;color:white;text-shadow:0 1px 3px #000;border-radius:6px;background:rgba(7,18,28,.45)}
.capture-countdown.hidden{display:none}

/* One input for typing and voice, with camera shortcuts on the same page. */
.memory-search{display:flex;align-items:center;gap:2px;border:1px solid #b6c5bc;background:#fff;border-radius:16px;padding:5px;margin-top:24px}.memory-search input{flex:1;min-width:0;width:auto;border:0;background:transparent;margin:0;font-size:16px;padding:12px 8px}.memory-search .search-icon{flex:0 0 44px;min-height:44px;width:44px;padding:10px;border:0;background:transparent;color:#193e35;border-radius:11px}.search-icon svg,.camera-shortcut svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.memory-search .search-icon.listening{background:#b33f31;color:#fff}.memory-search .search-icon.listening svg{fill:currentColor;stroke:none}.search-example{font-size:.86rem;color:#607268}.camera-shortcut{display:flex;gap:12px;align-items:center;justify-content:center;width:100%;margin-top:24px;min-height:54px}.memory-links{display:flex;gap:24px;justify-content:center;padding:18px 0}.memory-links a{color:#193e35;font-weight:650}.room-camera{border-top:1px solid #cad6cf;margin-top:12px;padding-top:18px}.room-camera summary{cursor:pointer;color:#52695d;font-size:.95rem}.room-camera .source-panel{display:grid;gap:12px}.room-camera select{width:100%;font-size:16px}.setup-panel #message:empty,#searchMessage:empty{display:none}.player-search-actions{display:flex;gap:7px}.search-dialog .memory-search{margin-top:8px}.search-dialog input{max-width:100%;box-sizing:border-box}#saveStoryDialog label{display:block;margin:12px 0 6px}#saveStoryDialog input{width:100%;font-size:16px}#savedStoryLink{display:block;padding:12px 0;font-weight:700}#savedStoryLink[hidden],#saveStory[hidden]{display:none}.setup-panel{padding:24px}.search-dialog #mic.listening::before{content:none}
@media(max-width:400px){.player-header{gap:5px}.player-brand .brand-wordmark{display:none}.player .glass{padding:9px 10px}.guest{padding:16px 12px}.setup-panel{padding:20px}.memory-links{gap:20px}}

.player-brand img.brand-wordmark{width:105px;height:auto}.empty-state>img{width:230px;height:auto;opacity:1}.player{background:var(--fb-night)}

/* Fotobrain 2.0: controls and grid share the same selection. */
#frozenFrame{width:100%;height:100%;object-fit:cover;transform:scaleX(-1)}.rear #frozenFrame{transform:none}.freeze-frame{position:absolute;bottom:48px;left:6px;right:6px;min-height:44px;padding:6px;font-size:.75rem;background:#f5f3eb;color:#193e35}.pip-bottom .pip-expand,.player .pip-top button{min-height:44px}.camera-pip{min-height:195px}.camera-pip .guide{inset:14% 12% 26%;border-radius:50%}
.results-grid{position:absolute;inset:76px 0 225px;overflow:auto;z-index:2;padding:8px 12px;background:#101d19}.results-grid.hidden{display:none}#gridPhotos{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.result-thumb{padding:0;border:0;background:#22382f;aspect-ratio:1;overflow:hidden;border-radius:8px}.result-thumb img{width:100%;height:100%;object-fit:cover}#gridCount{font-size:.85rem;color:#d5e4ed}#morePhotos{margin:14px auto;display:block}#morePhotos[hidden]{display:none}.grid-layout .photo-stage,.grid-layout .empty-state{visibility:hidden}.grid-layout .camera-pip{visibility:hidden}
.selection-actions{display:flex;align-items:center;gap:7px;margin-bottom:8px}.selection-actions button{white-space:nowrap}#photoEvent{font-size:.75rem;color:#c5d7cf;margin:0 0 7px;min-height:1em}.viewer-menu{position:relative;margin-left:auto}.viewer-menu summary{list-style:none;cursor:pointer;min-width:44px;text-align:center}.viewer-menu>div{position:absolute;bottom:52px;right:0;background:#f5f3eb;color:#193e35;min-width:240px;padding:12px;border-radius:12px;box-shadow:0 4px 30px #0006}.viewer-menu button{display:block;width:100%;margin-bottom:8px;min-height:44px}.viewer-menu label{display:flex;gap:10px;align-items:center;min-height:44px}.viewer-menu input{width:20px;height:20px;margin:0}#eventActions{display:flex;gap:8px;margin-top:16px}#eventActions[hidden]{display:none}#eventActions button{flex:1}#eventChoices{display:grid;gap:10px}#selectionControls[hidden],#backToPersonal[hidden]{display:none}
@media(min-width:700px){#gridPhotos{grid-template-columns:repeat(5,minmax(0,1fr))}}@media(orientation:landscape) and (max-height:560px){.results-grid{inset:65px 0 165px}.player-footer{padding-top:4px}.camera-pip{min-height:0}.selection-actions{margin-bottom:4px}.freeze-frame{bottom:45px}.player-header .brand-wordmark{display:none}}

#uploadForm>label{display:block;margin:15px 0}#uploadForm input{width:100%;font-size:16px;margin-top:7px}#uploadForm .upload-check{display:flex;align-items:center;gap:10px}#uploadForm .upload-check input{width:22px;height:22px;margin:0}#uploadErrors{color:#8b3028}#submissionList p{border-top:1px solid #ccd9d0;padding-top:10px;font-size:.9rem}

.grid-layout .playback,.grid-layout #savePhoto{display:none}.grid-layout .results-grid{bottom:165px}

/* Information above the photo; all viewer actions within thumb reach below. */
.player-header{display:block;padding:14px max(16px,env(safe-area-inset-right)) 12px max(16px,env(safe-area-inset-left));padding-top:max(14px,env(safe-area-inset-top));background:linear-gradient(#071b18dd,#071b1877,transparent);pointer-events:none}
.player-topline{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.player-header .brand-wordmark{display:block}.player-brand{min-width:0}.player-brand img{width:25px;height:25px}.player-brand img.brand-wordmark{width:96px}
#photoCount{font-size:.8rem;color:#d5e4ed;font-variant-numeric:tabular-nums;white-space:nowrap}
#photoEvent{font-size:.8rem;line-height:1.35;margin:0 0 4px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.player-header #cameraMessage{display:-webkit-box;max-width:none;margin:0;font-size:.8rem;color:#d5e4ed;min-height:1.4em}
.player-footer{padding:10px max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));background:linear-gradient(transparent,#071b18db)}
.thumb-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px}.thumb-actions .viewer-menu{margin:0}
.player .icon-action{display:flex;align-items:center;justify-content:center;width:50px;height:50px;min-width:50px;min-height:50px;padding:12px;border-radius:16px;box-sizing:border-box}
.icon-action svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.player .camera-action{background:#d5e9d9;color:#123e32;border-color:#d5e9d9}.player .camera-action[aria-expanded=true]{box-shadow:0 0 0 2px #b2d1bb}
.viewer-menu>div{right:-60px;bottom:62px;min-width:0;width:min(300px,calc(100vw - 24px));box-sizing:border-box;max-height:calc(100dvh - 150px);overflow:auto}
.viewer-menu summary::-webkit-details-marker{display:none}.viewer-menu .playback{display:flex;gap:8px;border-top:1px solid #cad6cf;padding-top:10px;margin-top:10px}.viewer-menu .playback button{width:auto;flex:1;margin:0;min-height:44px}.viewer-menu .playback button:first-child,.viewer-menu .playback button:last-child{font-size:1.5rem}
.grid-layout #savePhoto{display:flex;visibility:hidden}.results-grid,.grid-layout .results-grid{inset:132px 0 82px}.grid-layout .camera-action{visibility:visible}
.camera-pip{width:clamp(175px,46vw,220px);min-height:0;max-height:min(38vh,var(--pip-space,38vh));aspect-ratio:3/4}.pip-top small{display:none}.freeze-frame{bottom:53px}.pip-bottom .pip-expand{min-height:44px}
@media(max-width:360px){.thumb-actions{gap:8px}.player .icon-action{width:48px;height:48px;min-width:48px;min-height:48px}.viewer-menu>div{right:-56px}.player-brand img.brand-wordmark{width:86px}}
@media(orientation:landscape) and (max-height:560px){.player-header{padding-top:10px}.player-topline{margin-bottom:5px}.player-header #cameraMessage{font-size:.75rem}.results-grid,.grid-layout .results-grid{inset:110px 0 80px}.camera-pip{width:220px;aspect-ratio:4/3;max-height:var(--pip-space,50vh)}.camera-pip .guide{inset:18% 10% 18%;border-radius:50%}.empty-state{inset:28% 240px auto 24px}.viewer-menu>div{max-height:calc(100dvh - 100px)}}

/* Direct layout choice and a larger camera-search target. */
#roomCamera[hidden],#viewSwitcher[hidden]{display:none}
.view-switcher{pointer-events:auto;display:flex;width:max-content;max-width:100%;gap:4px;margin:12px auto 0;padding:4px;border:1px solid #ffffff30;border-radius:16px;background:#102c25eb;backdrop-filter:blur(12px)}
.view-switcher button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;width:132px;padding:8px 12px;background:transparent;color:#d6e8dd;border:0;border-radius:11px;font-size:.85rem}
.view-switcher button[aria-pressed=true]{background:#d5e9d9;color:#123e32}.view-switcher svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round}
.player .camera-action{width:64px;height:64px;min-width:64px;min-height:64px;padding:12px;border-radius:21px}.camera-action .camera-search-icon{width:34px;height:34px;stroke-width:1.8}.camera-search-icon .search-badge{fill:#d5e9d9}
.viewer-menu>div{right:-74px}.results-grid,.grid-layout .results-grid{inset:185px 0 96px}
@media(max-width:360px){.thumb-actions{gap:8px}.player .camera-action{width:60px;height:60px;min-width:60px;min-height:60px}.viewer-menu>div{right:-68px}}
@media(orientation:landscape) and (max-height:560px){.view-switcher{position:absolute;right:max(16px,env(safe-area-inset-right));top:40px;margin:0}.player-header #cameraMessage,#photoEvent{max-width:calc(100% - 300px)}.player-header{min-height:110px;box-sizing:border-box}.results-grid,.grid-layout .results-grid{inset:110px 0 96px}}
.welcome-message{font-size:1rem;font-weight:650;line-height:1.3;margin:0 0 6px;color:#e0f3e6;overflow-wrap:anywhere}.welcome-message[hidden]{display:none}
.results-grid,.grid-layout .results-grid{top:var(--viewer-header-bottom,185px)}
@media(orientation:landscape) and (max-height:560px){.welcome-message{max-width:calc(100% - 300px)}}

/* Compact photo context, with navigation and viewing actions separated below. */
.player-header{padding:8px max(14px,env(safe-area-inset-right)) 6px max(14px,env(safe-area-inset-left));padding-top:max(8px,env(safe-area-inset-top))}
.player-topline{margin-bottom:4px}.player-brand img{width:22px;height:22px}.player-brand img.brand-wordmark{width:88px}
.welcome-message{font-size:.88rem;line-height:1.25;margin-bottom:2px}#photoEvent{font-size:.74rem;margin-bottom:0;line-height:1.3}
.player-header #cameraMessage{font-size:.74rem;min-height:0;margin:3px 0 0}.player-header #cameraMessage:empty,#gridCount[hidden]{display:none}
.player-context{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px}.photo-context{min-width:0;min-height:36px;display:flex;flex-direction:column;justify-content:center}
.player-context #photoEvent,.player-context .welcome-message,.player-header #cameraMessage{max-width:none}
.view-switcher{position:static;justify-self:end;margin:0;padding:2px;gap:2px;border-radius:11px}.view-switcher button{width:auto;min-height:30px;padding:4px 6px;gap:4px;border-radius:8px;font-size:.7rem;line-height:1.2;white-space:nowrap}.view-switcher svg{width:13px;height:13px}
.player-footer{padding:6px max(12px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
.thumb-actions{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px}.viewer-navigation{display:flex;justify-self:start;align-items:center;gap:8px}
.viewer-primary-actions{position:relative;display:flex;justify-self:end;align-items:center;gap:8px}.viewer-primary-actions .viewer-menu{position:static}
.player .icon-action{width:44px;height:44px;min-width:44px;min-height:44px;padding:10px;border-radius:14px}
.player .camera-action{width:64px;height:64px;min-width:64px;min-height:64px;padding:12px;border-radius:21px}
.viewer-primary-actions .viewer-menu>div{right:0;bottom:calc(100% + 8px)}
.thumb-actions>.playback{display:flex;justify-content:center;gap:0;padding:2px;border:1px solid #ffffff30;border-radius:16px;background:#193e35bd;backdrop-filter:blur(10px);justify-self:center}
.thumb-actions>.playback .glass{min-width:44px;min-height:44px;padding:4px 8px;border:0;background:transparent;border-radius:12px;margin:0}.thumb-actions>.playback #pause{min-width:44px;font-size:1.15rem}.thumb-actions>.playback #previous,.thumb-actions>.playback #next{font-size:1.6rem;line-height:1}
.grid-layout .thumb-actions>.playback{display:none}.grid-layout .thumb-actions{grid-template-columns:1fr auto}.grid-layout #savePhoto{display:none}
@media(max-width:559px){.thumb-actions{grid-template-columns:1fr auto 1fr;row-gap:0}.viewer-navigation,.viewer-primary-actions,.thumb-actions>.playback{grid-row:1}.player .camera-action{width:60px;height:60px;min-width:60px;min-height:60px}}
.player-header{min-height:0}
@media(max-width:360px){.view-switcher svg{display:block}}

#setupUpload[hidden],#addPhotos[hidden]{display:none}

/* v2.1: photos retain their own tones; controls no longer shade the image. */
.player-veil{display:none}.player-header,.player-footer{background:none}
.player-header{text-shadow:0 1px 3px #000,0 0 5px #000}.photo-stage{cursor:zoom-in;touch-action:pan-y}.stage-nav{position:absolute;z-index:2;top:42%;width:46px;height:70px;padding:0;border:1px solid #ffffff38;background:#10231d73;color:#fff;font-size:2.2rem;line-height:1;backdrop-filter:blur(4px)}.stage-previous{left:10px;border-radius:24px 8px 8px 24px}.stage-next{right:10px;border-radius:8px 24px 24px 8px}
.player-header,.player-footer{pointer-events:none}.player-header :is(button,a,input,label,summary),.player-footer :is(button,a,input,label,summary){pointer-events:auto}.stage-nav:active{background:#d6eee2;color:#193e35}.photo-loading{position:absolute;z-index:2;left:50%;top:54%;transform:translateX(-50%);margin:0;padding:7px 12px;border-radius:20px;background:#10231dc9;color:#fff;font-size:.82rem;pointer-events:none}.photo-loading[hidden]{display:none}
.event-heading{display:flex;align-items:center;gap:16px;margin:12px 0 24px}.event-heading h1{font-size:1.7rem;margin:0}
.event-tabs{display:flex;gap:6px;border-bottom:1px solid #cad6cf;padding-bottom:10px}.event-tabs button{flex:1;background:transparent;color:#193e35;border:1px solid #b6c5bc;border-radius:12px}.event-tabs button[aria-selected=true]{background:#193e35;color:white}
#eventCards{display:grid;gap:12px}#eventCards h2{font-size:1rem;margin:12px 0 0}.event-card{width:100%;text-align:left;justify-content:flex-start;border:1px solid #d2dcd5;background:#fff;color:#193e35;border-radius:16px;padding:14px;gap:12px;min-height:74px}.event-card img{width:56px;height:56px;object-fit:cover;border-radius:10px}.event-card span{flex:1}.event-card small{white-space:nowrap;color:#52695d}#eventStatus:empty,.event-recognition:empty{display:none}.photo-library-button{width:100%;margin-top:10px}
.player:not(.grid-layout) .player-topline{padding-right:50px}.stage-close{position:absolute;z-index:2;right:max(12px,env(safe-area-inset-right));top:max(12px,env(safe-area-inset-top));width:44px;height:44px;padding:0;border-radius:50%;background:#111b1880;color:white;font-size:30px;border:1px solid #ffffff40}.stage-close[hidden]{display:none}.chrome-hidden :is(.player-header,.player-footer,.stage-nav,.stage-close,.camera-pip){visibility:hidden}
#shareFallback[hidden]{display:none}.grid-layout #sharePhoto{display:none}
@media(max-width:559px){.viewer-primary-actions,.viewer-navigation{gap:4px}.player .icon-action{width:44px;min-width:44px;padding:8px}.player .camera-action{width:52px;min-width:52px;height:52px;min-height:52px;padding:10px}}

@media(max-width:360px){.viewer-primary-actions,.viewer-navigation{gap:2px}.thumb-actions{column-gap:4px}}
.event-card{display:flex;align-items:center}
.event-card .event-card-label{flex:1 1 180px;min-width:0;font-weight:650}
.event-card .event-card-counts{flex:0 1 auto;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:5px}
.event-card .event-count{display:inline-block;white-space:nowrap;padding:5px 8px;border-radius:999px;font-size:.72rem;font-weight:700;font-variant-numeric:tabular-nums}
.event-count.own,.event-count.all{background:#e1eee7;color:#1e5944}
.event-count.family,.event-count.ai{background:#eee7d7;color:#64481d}
#familySummary{font-size:.75rem;font-weight:650;line-height:1.25;color:#ecf6ea;margin:1px 0}
#familySummary[hidden]{display:none}
.viewer-switches{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap}
.family-switcher{display:flex;gap:2px;padding:2px;border:1px solid #ffffff30;border-radius:11px;background:#102c25eb;backdrop-filter:blur(12px)}
#familySwitcher[hidden]{display:none}
.family-switcher button{min-height:30px;padding:4px 7px;border:0;border-radius:8px;background:transparent;color:#d6e8dd;font-size:.7rem;line-height:1.2;white-space:nowrap}
.family-switcher button[aria-pressed=true]{background:#d5e9d9;color:#123e32;font-weight:700}
.family-switcher button:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:690px){.player-context{grid-template-columns:minmax(0,1fr) auto}.viewer-switches{justify-content:flex-end;min-width:0}}
@media(orientation:landscape) and (max-height:560px){.player-header{min-height:0}.results-grid,.grid-layout .results-grid{inset:104px 0 96px}}
@media(max-width:440px){.event-card{flex-wrap:wrap}.event-card .event-card-label{flex-basis:calc(100% - 70px)}.event-card .event-card-counts{flex-basis:100%;justify-content:flex-start;margin-left:68px}}
.event-recognition-line{display:flex;align-items:center;gap:8px}.event-recognition-line .event-recognition{margin:0}.event-recognition-line #editRecognition{min-width:44px;min-height:44px;padding:6px 10px;background:transparent;color:#193e35;border:1px solid #b6c5bc}

.member-actions{display:flex;justify-content:flex-end;gap:10px;margin:12px 0}.member-actions button{background:transparent;border:1px solid #b6c5bc;color:#193e35;padding:8px 12px;min-height:44px}.search-dialog label{display:block;margin:14px 0 6px}.search-dialog select,.search-dialog textarea{width:100%;box-sizing:border-box;font-size:16px;padding:10px}.search-dialog a{display:block;padding:12px 0;color:#193e35;font-weight:650}#memberDetails[hidden],#memberLinkForm[hidden],#memberLogin[hidden],#feedbackForm[hidden]{display:none}
/* Account visibility must win over shared button and navigation display styles. */
:is([data-signout],[data-host-link],[data-circle-link])[hidden]{display:none!important}
.site-links{display:flex;align-items:center;gap:8px 16px;flex-wrap:wrap;margin:12px 0}.site-links a,.site-links button{font:inherit;font-size:.85rem;font-weight:650;color:#193e35;text-decoration:none}.site-links button{border:0;background:transparent;padding:0;cursor:pointer}.site-links a:hover,.site-links button:hover{text-decoration:underline}.viewer-menu a{display:block;color:#193e35;text-decoration:none;padding:10px 2px;font-weight:650}.viewer-menu a:hover{text-decoration:underline}.viewer-menu [data-signout][hidden]{display:none}
.photo-rating{display:flex;align-items:center;justify-content:center;gap:8px;margin:0 auto 8px;color:#fff;font-size:.78rem}.photo-rating[hidden]{display:none}.photo-rating #ratingStars{display:flex;gap:2px}.photo-rating button{border:0;background:transparent;color:#9aafa6;font-size:1.5rem;line-height:1;min-width:32px;min-height:38px;padding:2px}.photo-rating button.chosen{color:#ffd66e}.photo-rating #ratingStatus{min-width:88px;color:#d5e4dd}
.trusted-gallery #start,.trusted-gallery #cameraBox,.trusted-gallery #pipHelp,.trusted-gallery .camera-action,.trusted-gallery .site-links a[href*="auto_camera"],.trusted-gallery #eventBack,.trusted-gallery #setupView .permission-guide{display:none!important}.trusted-gallery #eventEmpty[hidden]{display:none}.trusted-gallery .grid-layout .results-grid{bottom:76px}
/* Photo decorations stay on each thumbnail and share one visibility control. */
.result-tile{position:relative;min-width:0;aspect-ratio:1;border-radius:8px;overflow:hidden;background:#22382f}
.result-tile .result-thumb{display:block;width:100%;height:100%;border-radius:0}
.tile-decorations{position:absolute;inset:auto 0 0;display:flex;align-items:center;gap:1px;padding:3px 4px;background:linear-gradient(transparent,rgba(5,20,16,.94) 25%);z-index:1}
.tile-stars{display:flex;flex:1;min-width:0;justify-content:space-around}
.tile-stars button,.tile-comment{border:0;background:transparent;color:#c8d4ce;line-height:1;padding:4px 1px;cursor:pointer;text-shadow:0 1px 3px #000}
.tile-stars button{font-size:clamp(.85rem,1.45vw,1.5rem);min-width:0;flex:1}
.tile-stars button.chosen,.tile-comment.has-comment,.photo-rating #photoComment.has-comment{color:#ffd66e}
.tile-comment{font-size:clamp(1rem,1.7vw,1.6rem);min-width:25px}
.decorations-hidden .tile-decorations{display:none}
#toggleDecorations{white-space:nowrap}
#toggleDecorations[aria-pressed="true"]{color:#ffd66e}
#toggleDecorations{gap:3px;min-width:38px;margin-left:8px;position:relative}#toggleDecorations::before{content:"";position:absolute;left:-5px;top:5px;bottom:5px;border-left:1px solid #ffffff4d}#toggleDecorations span{font-size:1rem;line-height:1}#toggleDecorations svg{width:14px;height:14px}
.photo-rating #photoComment{font-size:1.5rem}
.comment-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:12px}
#photoCommentText{width:100%;box-sizing:border-box}
@media(max-width:420px){.tile-decorations{padding:2px 1px}.tile-stars button{font-size:.75rem}.tile-comment{min-width:24px;font-size:1rem}}
.tile-comment svg,.photo-rating #photoComment svg{width:1.25em;height:1.25em;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.grid-layout .photo-rating{display:none}
/* Gallery search and subdued controls; the thumbnail keeps its full square size. */
.gallery-search{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:2px 0 10px;padding:8px;border:1px solid #ffffff29;border-radius:10px;background:#18342b;color:#e4eee7;font-size:.8rem}
.gallery-search label{font-weight:650}.gallery-search input,.gallery-search select{min-height:34px;min-width:110px;border:1px solid #a7bbb1;border-radius:7px;padding:5px 7px;background:#f5f8f5;color:#173a30;font:inherit;font-size:16px}
.gallery-search input{flex:1;max-width:240px}.gallery-search button{min-height:34px;border:1px solid #a7bbb1;border-radius:7px;padding:5px 9px;background:#d9e9dc;color:#173a30;font:inherit;font-weight:700}
#gallerySearchStatus{margin:0 0 7px;color:#d2dfd7;font-size:.82rem}#gallerySearchStatus:empty{display:none}
.player-brand{color:inherit;text-decoration:none}.player-brand:focus-visible{outline:2px solid #d5e9d9;outline-offset:4px;border-radius:3px}
.view-switcher #showGrid,.view-switcher #showSlideshow{width:34px;min-width:34px;height:32px;min-height:32px;padding:5px}.view-switcher #showGrid svg,.view-switcher #showSlideshow svg{width:18px;height:18px}
.view-switcher #showSlideshow svg{fill:currentColor;stroke:none}
.photo-stage{touch-action:none}.photo-stage.zoomed{cursor:grab}.photo-stage.zoomed:active{cursor:grabbing}.slide{transform-origin:center center;will-change:transform}
.grid-layout .results-grid{bottom:76px}.grid-layout .player-header{padding-bottom:3px}.grid-layout .player-topline{margin-bottom:2px}.grid-layout .photo-context{min-height:32px}
.tile-decorations{background:linear-gradient(transparent,rgba(5,20,16,.55) 35%)}
.tile-stars button{color:#aab8b2;font-size:clamp(.78rem,1.2vw,1.2rem);text-shadow:0 1px 2px #17251f99}
.tile-stars button.chosen,.tile-comment.has-comment,.photo-rating #photoComment.has-comment{color:#e8bd61}
.tile-comment{color:#c5d2cc;opacity:.8}
@media(max-width:420px){.gallery-search{gap:5px}.gallery-search label{font-size:.7rem}.gallery-search input{min-width:105px;max-width:100%}.gallery-search select{min-width:92px}.tile-stars button{font-size:.72rem}}
#toggleDecorations[aria-pressed="true"]{background:#f0dfaa;color:#493719}
#toggleDecorations[aria-pressed="false"]{background:transparent;color:#d6e8dd}
.gallery-search{gap:4px;flex-wrap:nowrap;margin:0 0 5px;padding:4px 5px;border-radius:8px}
.gallery-search input,.gallery-search select,.gallery-search button{min-height:30px}
.gallery-search input{min-width:0;max-width:none;flex:1}
.gallery-search select{min-width:76px;max-width:98px;padding:3px 4px}
.gallery-search button{min-width:30px;padding:3px 6px;line-height:1;font-size:1.25rem}
.gallery-search button svg{display:block;width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2}
.gallery-search .visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:420px){.gallery-search input{min-width:0}.gallery-search select{min-width:66px;width:66px}.gallery-search button{min-width:29px;padding:3px}}

/* The three gallery control rows scroll with the photo grid. */
#familySwitcher[hidden]{display:none}
.family-switcher select{pointer-events:auto;min-width:0;max-width:100%;height:32px;padding:2px 16px 2px 5px;border:0;border-radius:8px;background:#102c25;color:#d6e8dd;font:inherit;font-size:.7rem;font-weight:650}
.family-switcher select:disabled{opacity:.45}
.family-switcher select:has(option:checked:not([value=""])){background:#d5e9d9;color:#123e32}
.results-grid #gallerySearch{display:flex;pointer-events:auto}
.grid-layout .player-header #cameraMessage,.grid-layout #familySummary{display:none}
@media(max-width:690px) and (orientation:portrait){
  .grid-layout .player-header{padding-bottom:5px}
  .grid-layout .player-topline,.grid-layout .photo-context,.grid-layout .viewer-switches,.grid-layout #gallerySearch{box-sizing:border-box;min-height:40px;margin:0}
  .grid-layout .player-topline{margin-bottom:2px}
  .grid-layout .player-context{display:flex;flex-direction:column;align-items:stretch;gap:2px}
  .grid-layout .photo-context{width:100%;display:grid;grid-template-columns:max-content minmax(0,1fr);gap:6px;align-items:center}
  .grid-layout .photo-context .welcome-message,.grid-layout .photo-context #photoEvent{min-width:0;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;line-height:1.3}
  .grid-layout .photo-context .welcome-message[hidden]{display:none}
  .grid-layout .photo-context #photoEvent{text-align:right}
  .grid-layout .viewer-switches{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px;align-items:center;justify-content:stretch}
  .grid-layout .family-switcher{display:grid;grid-template-columns:auto auto minmax(0,1fr);align-items:center;gap:1px;width:100%;min-width:0;box-sizing:border-box}
  .grid-layout .family-switcher button{min-height:32px;padding:4px 5px}
  .grid-layout .view-switcher{justify-self:end;min-width:0;margin:0}
  .grid-layout #gallerySearch{align-self:stretch;padding:4px 5px}
}
@media(max-width:360px) and (orientation:portrait){
  .grid-layout .view-switcher #showGrid,.grid-layout .view-switcher #showSlideshow{min-width:30px;width:30px;padding:4px}
  .grid-layout .family-switcher select{font-size:.65rem}
}

/* The slideshow gives the photo the full stage; grid controls stay in the grid. */
.slideshow-layout .player-header{display:none}
.grid-layout .player-header{background:#101d19}
.grid-layout .player-topline{margin-bottom:0}
.grid-layout .results-grid{top:max(64px,var(--viewer-header-bottom,64px));-webkit-overflow-scrolling:touch}
.stage-grid{display:none;position:absolute;z-index:5;top:max(12px,env(safe-area-inset-top));right:max(66px,calc(env(safe-area-inset-right) + 66px));width:44px;height:44px;min-width:44px;min-height:44px;padding:10px;border:1px solid #ffffff40;border-radius:50%;background:#111b1880;color:#fff;backdrop-filter:blur(6px)}
.slideshow-layout .stage-grid{display:grid;place-items:center}
.stage-grid svg{display:block;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8}
.chrome-hidden .stage-grid{visibility:hidden}
/* Caption placement stays unchanged; explicitly enabled reviews work in landscape. */
@media(orientation:landscape){
  .slideshow-layout #slideshowCaption{display:none}
}
.photo-rating{flex-wrap:wrap}
@media(max-width:420px){.photo-rating #ratingLabel{display:none}.photo-rating{gap:4px}}
.slideshow-caption{display:flex;align-items:center;justify-content:center;gap:3px;max-width:min(800px,calc(100vw - 24px));margin:0 auto 8px}
.slideshow-caption[hidden],.grid-layout .slideshow-caption{display:none}
.slideshow-caption .slideshow-message{max-width:none;min-width:0;margin:0}
#toggleQuirkyMessage{flex:none;display:grid;place-items:center;width:36px;height:36px;min-width:36px;min-height:36px;padding:8px;border:1px solid #ffffff55;border-radius:50%;background:#10231dbb;color:#edf8ef;backdrop-filter:blur(5px);cursor:pointer}
#toggleQuirkyMessage[hidden]{display:none}
#toggleQuirkyMessage[aria-pressed="true"]{background:#d5e9d9;color:#173a30}
#toggleQuirkyMessage svg{display:block;width:17px;height:17px;fill:currentColor}

/* Capture status is non-modal: camera and navigation controls remain available. */
.capture-progress{position:fixed;z-index:50;top:max(76px,calc(env(safe-area-inset-top) + 60px));left:50%;transform:translateX(-50%);width:min(360px,calc(100% - 32px));box-sizing:border-box;padding:18px 20px;border:1px solid #aecbbb;border-radius:18px;background:#fffdf5;color:#193e35;box-shadow:0 12px 40px #0005;text-align:center}
.capture-progress[hidden]{display:none}
.capture-progress.finding-page{inset:0;transform:none;width:100%;min-height:100dvh;border:0;border-radius:0;background:#0d201b;color:#f4f7ef;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:calc(32px + env(safe-area-inset-top)) 28px calc(32px + env(safe-area-inset-bottom));gap:28px}
.capture-progress.finding-page[hidden]{display:none}
.capture-progress.finding-page strong{display:block;font-size:clamp(1.6rem,5vw,2.25rem)}
.capture-progress.finding-page p{max-width:30rem;color:#c0d3ca}
.finding-page .capture-spinner{display:block;margin:0 auto 28px;border-color:#b7cfc055;border-top-color:#cde8d8}
.finding-page button{border-color:#cde8d8;background:transparent;color:#f4f7ef}
@media(prefers-reduced-motion:reduce){.finding-page .capture-spinner{animation:none}}
.capture-progress strong{font-size:1.15rem}
.capture-progress p{margin:8px 0 14px;line-height:1.4}
.capture-progress button{min-height:44px;padding:8px 18px;border:1px solid #193e35;border-radius:24px;background:#193e35;color:#fff;font:inherit}
.capture-spinner{display:inline-block;width:18px;height:18px;margin-right:9px;vertical-align:middle;border:3px solid #ceddd4;border-top-color:#193e35;border-radius:50%;animation:capture-spin 1s linear infinite}
@keyframes capture-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.capture-spinner{animation:none}}
@media(max-height:480px){.capture-progress{top:max(68px,env(safe-area-inset-top));left:auto;right:12px;transform:none;width:min(330px,calc(100% - 220px));padding:10px 14px}.capture-progress p{margin:5px 0 8px}}

/* 2.7.3 chooser: one header, one context line, one list. */
#eventView{max-width:680px;padding-top:max(20px,env(safe-area-inset-top));padding-bottom:max(28px,env(safe-area-inset-bottom))}
#eventView .event-heading{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:12px;margin:0 0 8px}
#eventView .event-heading h1{font-size:clamp(1.4rem,5.5vw,1.8rem);letter-spacing:-.6px}
#eventView .event-icon{display:flex;align-items:center;justify-content:center;width:44px;min-width:44px;height:44px;min-height:44px;padding:0;border:1px solid #cbd5ce;border-radius:50%;background:transparent;color:#193e35;font-size:28px;line-height:1;cursor:pointer}
#eventView .event-actions-menu{position:relative;margin:0;z-index:10}
#eventView .event-actions-menu summary{list-style:none}#eventView .event-actions-menu summary::-webkit-details-marker{display:none}
#eventView .event-actions-menu nav{position:absolute;right:0;top:52px;display:flex;flex-direction:column;min-width:190px;padding:8px;background:#fffdf6;border:1px solid #d2dcd5;border-radius:14px;box-shadow:0 10px 35px #193e3526}
#eventView .event-actions-menu nav :is(a,button){display:flex;align-items:center;min-height:44px;padding:9px 12px;margin:0;border:0;border-radius:8px;background:transparent;color:#193e35;text-decoration:none;text-align:left;font:inherit;font-size:.9rem;font-weight:500}
#eventView .event-actions-menu nav [hidden]{display:none}
#eventView .event-actions-menu nav :is(a,button):hover{background:#edf1e8}
#eventView .event-recognition-line{justify-content:space-between;gap:6px;margin:0 0 8px;padding:4px 8px 4px 14px;min-height:52px;border-radius:14px;background:#efe3c8;font-size:.95rem}
#eventView .event-recognition{color:#193e35;font-weight:600;line-height:1.35;min-width:0;overflow-wrap:anywhere}
#eventView #editRecognition{display:flex;align-items:center;justify-content:center;flex:0 0 44px;min-width:44px;min-height:44px;padding:6px;border:0;border-radius:10px;font-size:.8rem;background:transparent}
#eventView #editRecognition[hidden]{display:none}
#eventView #editRecognition svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#eventView .event-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;margin:0 0 12px;border:1px solid #d7ddd1;border-radius:14px;background:#eaeedf}
#eventView .event-tabs button{min-height:44px;border:0;border-radius:10px;background:transparent;color:#506459;font-size:.9rem;padding:9px 6px}
#eventView .event-tabs [aria-selected="true"]{background:#193e35;color:#fffdf5;box-shadow:0 2px 5px #193e351a}
#eventStatus{margin:0 0 12px;font-size:.85rem;color:#52695d}
#eventView :is(button,a,summary):focus-visible{outline:3px solid #4b7866;outline-offset:3px}
