:root{color-scheme:light;--ink:#080808;--paper:#fff;--muted:#777;--soft:#f5f5f5;--line:#111;--blue:#1685ec;--spring:cubic-bezier(.22,1,.36,1);--swift:cubic-bezier(.2,.8,.2,1)}
*,*::before,*::after{box-sizing:border-box;scrollbar-width:none!important}
*::-webkit-scrollbar{width:0!important;height:0!important;display:none!important}
html{width:100%;max-width:100%;background:#fff;overflow-x:clip;overscroll-behavior-x:none;-webkit-text-size-adjust:100%;}
body{margin:0;max-width:100%;overflow-x:clip;background:#fff;color:var(--ink);font-family:'Telegraf','DM Sans',Arial,sans-serif;-webkit-font-smoothing:antialiased}
button,input,textarea,select{font:inherit;min-width:0}button{cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}button:disabled{opacity:.58;cursor:wait}a,a:visited{color:var(--ink)}img{max-width:100%;display:block}svg{display:block;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}h1,h2,h3,.anton{font-family:Anton,Impact,sans-serif;font-weight:400;letter-spacing:.015em}p{line-height:1.5}[hidden]{display:none!important}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid var(--blue);outline-offset:3px}input,textarea,select{accent-color:var(--blue);font-size:16px!important;max-width:100%}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus{-webkit-text-fill-color:#000!important;box-shadow:0 0 0 1000px #f5f5f5 inset!important;-webkit-box-shadow:0 0 0 1000px #f5f5f5 inset!important}
.solid,.outline{font-size:12px;letter-spacing:.07em;font-weight:700;min-height:47px;padding:12px 15px;border:1.5px solid var(--ink);transition:transform .2s var(--spring),background-color .18s ease,box-shadow .2s ease;color:var(--ink);text-decoration:none}
.solid{background:#000;color:#fff}.outline{background:#fff}.full{width:100%}button:not(:disabled):active{transform:scale(.977)}.solid:not(:disabled):active{background:#222}.outline:not(:disabled):active{background:#f4f4f4}.muted{color:var(--muted)}.tiny{font-size:12px}.status{font-size:12px;color:#555;line-height:1.4;min-height:14px;margin:12px 0}.status:empty{min-height:0;margin:0}
.field{margin:17px 0;min-width:0;max-width:100%}.field label{display:block;margin-bottom:9px;font-size:11px;font-weight:700;letter-spacing:.08em}.field input:not([type=file]):not([type=checkbox]),.field textarea{appearance:none;-webkit-appearance:none;border-radius:0;display:block;width:100%;height:49px;min-width:0;min-height:49px;padding:12px 13px;background:#fff;color:#000;border:1.5px solid #000;box-shadow:none}.field textarea{height:auto;min-height:118px;resize:vertical;line-height:1.5}.field input::placeholder,.field textarea::placeholder{color:#aaa}
.wrap{width:min(100%,980px);margin:0 auto;padding:0 18px}.page{padding-bottom:calc(99px + env(safe-area-inset-bottom))}.header{display:flex;justify-content:space-between;align-items:center;gap:14px;min-width:0;padding:calc(14px + env(safe-area-inset-top)) 0 15px;border-bottom:3px solid #000}.wordmark{width:clamp(155px,38vw,230px);height:auto;flex:none}.iconbtn{flex:none;display:grid;place-items:center;width:44px;height:44px;border:1.5px solid #000;background:#fff;color:var(--blue);transition:background-color .2s,transform .2s var(--spring)}.iconbtn svg{width:23px;height:23px;stroke-width:1.9}
.intro{padding:26px 0 20px;border-bottom:2px solid #000;display:flex;justify-content:space-between;align-items:end;gap:9px}.intro-copy{min-width:0}.intro h1{font-size:clamp(30px,7.2vw,72px);line-height:1.08;margin:10px 0 0;overflow-wrap:anywhere}.eyebrow{font-size:10px;font-weight:700;letter-spacing:.16em}.counter{text-align:right;flex:none;white-space:nowrap;font-size:10px;font-weight:700}.counter b{display:block;font-size:26px;line-height:1.2;font-weight:700}.page-view{min-width:0;max-width:100%}.page-view.view-enter{animation:viewIn .31s var(--spring) both}@keyframes viewIn{from{opacity:.55;transform:translateY(9px)}to{opacity:1;transform:translateY(0)}}
.bar{display:flex;align-items:center;justify-content:space-between;gap:5px;min-width:0;margin:19px 0 17px}.tabs{display:flex;gap:3px;min-width:0;flex-wrap:wrap}.tab{font-size:11px;font-weight:700;letter-spacing:.04em;border:0;background:#fff;padding:10px 11px;white-space:nowrap;color:#000;transition:background-color .2s,color .2s}.tab.active{background:#000;color:#fff}.sort-wrap{position:relative;min-width:0;flex:none}.sort{display:flex;align-items:center;justify-content:center;gap:8px;background:#fff;border:1.4px solid #000;padding:9px 10px;min-height:38px;font-size:11px;font-weight:700;letter-spacing:.04em;color:#000}.sort-arrow{font-size:18px;line-height:1;color:var(--blue)}.sort-menu{position:absolute;top:calc(100% + 6px);right:0;background:#fff;border:1.5px solid #000;z-index:25;min-width:154px;box-shadow:3px 4px 0 #000;transform-origin:top right;animation:dropIn .2s var(--spring) both}@keyframes dropIn{from{opacity:0;transform:translateY(-7px) scale(.97)}to{opacity:1;transform:none}}.sort-menu button{width:100%;display:block;border:0;border-bottom:1px solid #eee;background:#fff;padding:13px 12px;text-align:left;font-weight:700;font-size:11px;letter-spacing:.06em}.sort-menu button:last-child{border:0}.sort-menu button[aria-selected=true]{background:#000;color:#fff}.sort-menu button:active{background:#eee}.custom-hint{display:flex;align-items:center;gap:8px;margin:0 0 17px;color:#777;font-size:10px;letter-spacing:.05em;font-weight:700}.custom-hint svg{width:17px;height:17px;color:var(--blue);flex:none}
.masonry{columns:2;column-gap:12px;min-width:0;min-height:1px;padding:0 2px 20px}.masonry.custom-mode{columns:initial;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:6px;column-gap:12px;row-gap:12px;align-items:start;touch-action:pan-y}
.polaroid{position:relative;display:inline-block;width:100%;vertical-align:top;break-inside:avoid;page-break-inside:avoid;border:1px solid #000;background:#fff;padding:7px 7px 0;margin:0 0 13px;box-shadow:2px 2px 0 #000;perspective:1100px;isolation:isolate;overflow:visible;min-width:0;contain:layout style}.masonry.custom-mode .polaroid{display:block;width:100%;margin:0;align-self:start;user-select:none;-webkit-user-select:none}.polaroid.flip-active{z-index:4}.flip-stage{display:grid;grid-template-areas:'card';width:100%;transform-style:preserve-3d;transition:transform .47s cubic-bezier(.2,.77,.22,1)}.polaroid.is-flipped .flip-stage{transform:rotateY(180deg)}.flip-front,.flip-back{grid-area:card;min-width:0;width:100%;backface-visibility:hidden;-webkit-backface-visibility:hidden}.flip-front{display:block;text-align:left;padding:0;margin:0;background:transparent;border:0;color:#000;cursor:pointer;transform:rotateY(0deg)}.polaroid.is-flipped .flip-front{pointer-events:none}.flip-image{aspect-ratio:auto;min-height:60px;max-width:100%;display:block;width:100%;height:auto;object-fit:cover}.polaroid-foot{padding:10px 2px 15px;min-height:68px}.polaroid-foot strong{display:block;font-size:clamp(11px,2.7vw,15px);line-height:1.22;overflow-wrap:anywhere;font-weight:700}.polaroid-foot .card-location{margin:7px 0 0;font-size:clamp(10px,2.25vw,12px);color:#666;display:flex;gap:3px;align-items:flex-start}.card-location svg{width:12px;height:12px;flex:none;margin-top:2px;color:var(--blue)}.card-location span{min-width:0;overflow-wrap:anywhere}.polaroid-foot .card-story{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;overflow-wrap:anywhere;margin:7px 0 0;line-height:1.4;font-size:clamp(10px,2.25vw,12px)}.card-date{display:block;font-size:clamp(10px,2.15vw,11px);color:#777;margin-top:9px}
.flip-back{transform:rotateY(180deg);background:#fff;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:9px;padding:16px 7px 14px;pointer-events:none;min-height:196px}.polaroid.is-flipped .flip-back{pointer-events:auto}.flip-back-title{font-family:Anton,Impact,sans-serif;font-size:clamp(15px,4vw,26px);text-align:center;overflow-wrap:anywhere;line-height:1.2;margin:0 0 6px}.card-action{display:flex;align-items:center;justify-content:center;gap:7px;padding:10px 5px;min-height:39px;width:100%;background:#fff;border:1px solid #000;font-size:clamp(9px,2vw,11px);font-weight:700;letter-spacing:.02em;color:#000}.card-action svg{width:14px;height:14px;flex:none}.card-action.delete{color:#000}.flip-back .back-link{color:#777;background:transparent;border:0;text-decoration:underline;font-size:10px;font-weight:700;margin-top:5px;padding:6px}.delete-confirm{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:5px;animation:dropIn .2s var(--spring) both}.delete-confirm button{border:1px solid #000;background:#fff;padding:8px 4px;font-size:9px;font-weight:700}.delete-confirm button.yes{background:#000;color:#fff}.delete-confirm .confirm-label{grid-column:1/-1;font-size:10px;text-align:center;color:#666}
.favorite-star{position:absolute;top:13px;right:13px;z-index:6;display:grid;place-items:center;width:33px;height:33px;padding:5px;border:1px solid #000;background:#fff;color:#000;transition:opacity .17s,transform .2s var(--spring),background-color .2s}.favorite-star svg{width:20px;height:20px;stroke-width:1.8;stroke-linejoin:round}.favorite-star svg path{fill:transparent;transition:fill .18s ease}.favorite-star.is-favorite svg path{fill:#000}.favorite-star.star-pop svg{animation:starBounce .3s var(--spring)}@keyframes starBounce{0%{transform:scale(.7)}55%{transform:scale(1.3)}100%{transform:scale(1)}}.polaroid.is-flipped .favorite-star{opacity:0;pointer-events:none}.masonry.custom-mode .polaroid.is-dragging{opacity:.18;box-shadow:none}.drag-ghost{position:fixed!important;z-index:250!important;pointer-events:none!important;isolation:isolate;opacity:.93;will-change:transform;transform-origin:center top;box-shadow:0 18px 32px rgba(0,0,0,.16),3px 3px 0 #000!important;transition:none!important}.drag-ghost .favorite-star{display:none}.masonry.custom-mode.is-reordering .polaroid{cursor:grabbing}.masonry.custom-mode .polaroid:not(.is-dragging){cursor:grab}
.empty{border:2px dashed #aaa;padding:35px 20px;text-align:center;margin:22px 0}.empty h2{font-size:26px;margin:0 0 9px}.empty p{color:#666;font-size:13px}.section-title{font-size:29px;margin:24px 0 14px}.card{border:2px solid #000;padding:17px;margin:17px 0}.card h2{font-size:24px;margin:0 0 9px}.card p{font-size:13px;color:#666}.archivepick{width:100%;text-align:left;background:#fff;color:#000;border:2px solid #000;padding:15px;margin:9px 0;transition:transform .2s var(--spring),background-color .2s}.archivepick.selected{background:#000;color:#fff}.archivepick strong{display:block;font-size:17px}.archivepick small{display:block;margin-top:4px;font-size:11px}.invite-copy-row{margin:15px 0 6px;display:flex;gap:8px;align-items:stretch;min-width:0}.invite-copy-code{flex:1;min-width:0;word-break:break-all;border:1px solid #000;background:var(--soft);display:flex;align-items:center;padding:10px;font-size:14px;font-weight:700;letter-spacing:.08em}.invite-copy-btn{display:grid;place-items:center;flex:none;width:52px;min-height:48px;background:#000;color:#fff;border:1px solid #000}.invite-copy-btn svg{width:20px;height:20px}.footer{border-top:1px solid #000;padding:17px 0;color:#666;font-size:11px;margin-top:22px}
.nav{position:fixed;z-index:30;bottom:0;left:0;right:0;display:flex;justify-content:center;align-items:center;gap:0;padding:5px 10px calc(4px + env(safe-area-inset-bottom));background:#fff;border-top:0;isolation:isolate}.nav::before{content:"";position:absolute;top:-7px;left:0;right:0;border-top:2px solid #000;background:#fff}.nav button{border:0;background:transparent;color:#777;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;width:33.33%;max-width:180px;min-height:48px;padding:2px;font-size:10px;font-weight:700;letter-spacing:.06em;transition:color .2s,transform .22s var(--spring)}.nav button.active{color:#000}.nav svg{width:23px;height:23px}.nav .add-nav{color:#fff}.nav .plus{width:47px;height:47px;border-radius:12px;display:grid;place-items:center;background:#000;transition:transform .25s var(--spring),border-radius .25s var(--spring)}.nav .plus svg{width:26px;height:26px;stroke:#fff}.nav .add-nav:active .plus{transform:scale(.89);border-radius:14px}
.modal{position:fixed;z-index:60;inset:0;overflow:hidden;display:flex;align-items:flex-end;justify-content:center;pointer-events:none}.modal[hidden]{display:none!important}.modal-backdrop{position:absolute;inset:0;background:#fff;opacity:0;transition:opacity .33s ease}.sheet{position:relative;z-index:2;background:#fff;width:100%;max-width:640px;max-height:calc(100dvh - env(safe-area-inset-top));height:calc(100dvh - env(safe-area-inset-top));margin-top:env(safe-area-inset-top);overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;overscroll-behavior-x:none;padding:18px 18px calc(30px + env(safe-area-inset-bottom));border:0;min-width:0;transform:translate3d(0,103%,0);opacity:1;will-change:transform;transition:transform .41s cubic-bezier(.22,1,.36,1)}.modal.is-open{pointer-events:auto}.modal.is-open .sheet{transform:translate3d(0,0,0);opacity:1}.modal.is-open .modal-backdrop{opacity:1}.sheethead{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-bottom:12px;border-bottom:2px solid #000;min-width:0}.sheethead h2{min-width:0;margin:0;font-size:clamp(24px,7vw,34px);overflow-wrap:anywhere}.close{width:41px;height:41px;border:1px solid #000;display:grid;place-items:center;flex:none;background:#fff;color:var(--blue);transition:transform .23s var(--spring)}.close svg{width:22px;height:22px}.sheet-body-enter{animation:sheetContentIn .26s var(--spring) both}@keyframes sheetContentIn{from{opacity:.1;transform:translateY(9px)}to{opacity:1;transform:translateY(0)}}body.modalopen{overflow:hidden}.notice{position:fixed;z-index:300;bottom:calc(100px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:max-content;max-width:90vw;background:#000;color:#fff;padding:12px 17px;font-size:12px;text-align:center;box-shadow:0 3px 12px #0002;animation:toastIn .25s var(--spring) both}@keyframes toastIn{from{opacity:0;transform:translate(-50%,12px)}to{opacity:1;transform:translate(-50%,0)}}
/* Account — classic centered profile layout */
.profile-center{display:flex;flex-direction:column;align-items:center;text-align:center;padding:30px 0 23px}.profile-avatar{width:116px;height:116px;display:grid;place-items:center;background:#f4f4f4;border-radius:50%;border:2px solid #000;overflow:hidden;flex:none}.profile-avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%}.profile-avatar-fallback{font-size:35px;font-family:Anton,Impact,sans-serif;color:#aaa}.profile-user{font-size:27px;margin:17px 0 1px;max-width:100%;overflow-wrap:anywhere}.profile-email{margin:3px 0 16px;color:#777;font-size:12px;max-width:100%;overflow-wrap:anywhere}.profile-edit-btn{min-width:145px;min-height:39px;padding:9px 15px}.profile-section{border-top:2px solid #000;padding-top:17px;margin:16px 0 12px;font-size:25px}.profile-archive{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #000;background:#fff;color:#000;padding:15px;text-align:left;margin:9px 0}.profile-archive small{display:block;color:#777;font-size:11px;margin-top:4px}.profile-archive-arrow{flex:none;color:var(--blue)}.profile-archive-arrow svg{width:19px;height:19px}.profile-editor-photo{display:flex;flex-direction:column;align-items:center;padding:22px 0 7px;gap:10px}.profile-editor-photo .profile-avatar{width:106px;height:106px}.profile-photo-controls{display:flex;gap:9px;flex-wrap:wrap;justify-content:center}.profile-photo-controls button{min-height:39px;padding:9px;font-size:10px}.profile-remove{color:#777!important;background:#fff;border:1px solid #bbb!important}.back-button{border:0;background:transparent;color:var(--blue);padding:12px 0;font-size:11px;font-weight:700}.back-button svg{width:15px;height:15px;display:inline;vertical-align:middle;margin-right:5px}
/* Moment editor */
.date-shell{position:relative;display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;height:49px;min-width:0;border:1.5px solid #000;background:#fff;padding:0 13px;overflow:hidden;font-size:16px}.date-label{flex:1;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.date-shell svg{width:19px;height:19px;flex:none;color:var(--blue)}.date-shell input[type=date]{position:absolute;inset:0;opacity:0;min-width:0;width:100%;height:100%;padding:0;margin:0;border:0;font-size:16px;cursor:pointer}.date-shell:focus-within{outline:2px solid var(--blue);outline-offset:2px}.location-field{position:relative}.location-results{border:1px solid #000;border-top:0;background:#fff;max-height:205px;overflow-y:auto;overscroll-behavior-y:contain}.location-choice{width:100%;display:block;text-align:left;border:0;border-bottom:1px solid #ececec;background:#fff;color:#000;padding:11px 12px;transition:background-color .15s ease}.location-choice:last-child{border-bottom:0}.location-choice strong{display:block;font-size:13px;overflow-wrap:anywhere}.location-choice small{display:block;font-size:11px;color:#777;margin-top:3px;overflow-wrap:anywhere}.location-hint{padding:12px;color:#777;font-size:11px}.location-selected{display:flex;align-items:center;gap:10px;padding:9px 11px;background:#f6f6f6;border:1px solid #e0e0e0;margin:9px 0 0;animation:locationIn .26s var(--spring) both}.location-selected-pin{width:16px;height:16px;flex:none;color:var(--blue)}.location-selected-copy{min-width:0;flex:1;overflow-wrap:anywhere}.location-selected-copy strong{font-size:13px}.location-selected-copy small{display:block;font-size:11px;color:#777;line-height:1.4;margin-top:2px}.location-clear{width:30px;height:30px;border:0;background:transparent;display:grid;place-items:center;color:var(--blue);flex:none}.location-clear svg{width:18px;height:18px}@keyframes locationIn{from{opacity:0;transform:translateY(-6px) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}.location-credit{display:block;margin-top:6px;color:#999;font-size:9px}.location-credit a{color:#777;text-decoration:underline}.location-loading{display:inline-block;position:relative;width:12px;height:12px;margin-left:6px;border:2px solid #ccc;border-top-color:var(--blue);border-radius:50%;animation:spin .6s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.photo-input{position:absolute!important;width:1px!important;height:1px!important;opacity:0;pointer-events:none;clip-path:inset(50%)}.add-photo{width:100%;min-height:51px;border:1.5px solid #000;background:#fff;font-size:12px;font-weight:700;letter-spacing:.06em;display:flex;align-items:center;justify-content:center;gap:9px;color:#000}.add-photo svg{width:17px;height:17px;color:var(--blue)}.photo-preview{position:relative;display:inline-block;width:min(45%,165px);margin-top:13px;border:1px solid #000}.photo-preview img{width:100%;height:auto;max-height:180px;object-fit:cover}.photo-preview .photo-clear{position:absolute;right:-7px;top:-7px;width:27px;height:27px;display:grid;place-items:center;background:#fff;border:1px solid #000;color:var(--blue)}.photo-preview .photo-clear svg{width:15px;height:15px}.editor-note{font-size:11px;color:#777}.legacy-note{border-left:2px solid #999;padding:8px 11px;background:#f7f7f7;color:#777;font-size:11px;margin:13px 0}
/* Authentication — elevated layout */
.authpage{height:100dvh;min-height:0;max-width:100%;overflow:hidden;display:flex;align-items:flex-start;justify-content:center;padding:clamp(52px,10dvh,92px) 20px max(13px,env(safe-area-inset-bottom))}.authbox{width:min(100%,440px);max-height:100%;overflow-y:auto;overscroll-behavior-y:contain}.authlogo{width:min(43%,135px);height:auto;margin:0 auto 24px}.authbox h1{font-size:clamp(28px,7.4vw,40px);margin:0 0 8px}.tagline{font-size:12px;color:#777;margin:0 0 18px}.authbox .field{margin:12px 0}.authbox .field input{height:46px!important;min-height:46px!important}.authswitch{text-align:center;font-size:13px;color:#777;margin:31px 0}.authswitch button{background:none;border:0;color:#000;font-weight:700;text-decoration:underline;padding:7px}.splash{position:fixed;inset:0;z-index:500;display:grid;place-items:center;background:#fff;transition:opacity .4s ease}.splash.done{opacity:0;pointer-events:none}.splash-inner{width:min(45vw,185px);max-width:185px;text-align:center}.splash-inner img{width:100%;height:auto}.track{height:4px;background:#ddd;margin-top:15px}.fill{height:100%;background:#000;animation:fill 1.1s var(--swift) both}@keyframes fill{from{width:0}to{width:100%}}
@media(min-width:700px){.masonry{columns:3;column-gap:18px}.masonry.custom-mode{grid-template-columns:repeat(3,minmax(0,1fr));column-gap:18px}.polaroid{margin-bottom:19px;padding:10px 10px 0}.favorite-star{top:17px;right:17px}.modal{align-items:center}.modal-backdrop{background:rgba(0,0,0,.40)}.sheet{height:auto;max-height:min(90dvh,900px);border:2px solid #000;margin:0;transform:translate3d(0,105%,0)}.wrap{padding:0 28px}.profile-avatar{width:130px;height:130px}}
@media(max-width:370px){.wrap{padding:0 13px}.bar{gap:3px}.tabs .tab{padding:9px 8px;font-size:10px}.sort{font-size:10px;padding:8px}.masonry{column-gap:9px}.masonry.custom-mode{column-gap:9px}.polaroid{padding:5px 5px 0}.favorite-star{width:29px;height:29px;top:10px;right:10px}.favorite-star svg{width:17px;height:17px}.polaroid-foot{padding:8px 2px 12px}.sheet{padding:17px 13px calc(26px + env(safe-area-inset-bottom))}.intro h1{font-size:clamp(29px,7.3vw,40px)}.nav{padding-inline:5px}.nav .plus{width:44px;height:44px}}
@media(max-height:690px){.authpage{padding-top:35px}.authlogo{width:min(31%,95px);margin-bottom:13px}.authbox h1{font-size:27px}.authbox .field{margin:9px 0}.authswitch{margin:16px 0}.tagline{margin-bottom:8px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}.sheet,.flip-stage{transition-duration:0ms!important}}

/* Optimistic favorites must not fade while the network is saving. */
.favorite-star:disabled{opacity:1;cursor:default}
/* Use one responsive masonry grid for every sort mode, preserving visual left-to-right chronological ordering. */
.masonry,.masonry.custom-mode{columns:initial;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:6px;column-gap:12px;row-gap:12px;align-items:start}
.masonry .polaroid,.masonry.custom-mode .polaroid{display:block;width:100%;margin:0;align-self:start}
@media(min-width:700px){.masonry,.masonry.custom-mode{grid-template-columns:repeat(3,minmax(0,1fr));column-gap:18px}}
@media(max-width:370px){.masonry,.masonry.custom-mode{column-gap:9px}}

/* ARCHIVE. v1.6 — iPhone 15 Pro (393 x 852 CSS px) */
:root{--blue:#1685ec}
.blue-dot{color:var(--blue);font-weight:inherit}
html,body{width:100%;overscroll-behavior-x:none;overflow-x:clip;touch-action:pan-y}
body{background:#fff!important}
body.crop-open{overflow:hidden}
button,a{touch-action:manipulation}
.header .archive-header-icon{width:27px;height:27px;object-fit:contain}
.header .iconbtn{color:#000}
.intro-counters{flex:none;display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-end;gap:8px}
.intro-counters .counter{line-height:1.2}
.intro-counters .counter b{font-size:25px}
#archiveCounter{margin-bottom:1px}
/* Real, uninterrupted white navigation surface. Its top rule belongs to the same box. */
.nav{background:#fff!important;border-top:2px solid #000!important;padding:11px 7px calc(6px + env(safe-area-inset-bottom))!important;gap:0;justify-content:space-between;isolation:isolate}
.nav::before{display:none!important;content:none!important}
.nav button{width:20%;max-width:none;min-height:51px;gap:4px;padding:2px 0;font-size:8px;letter-spacing:.025em;flex:none}
.nav svg{width:21px;height:21px;stroke-width:1.9}
.nav .plus{width:49px;height:49px;border-radius:12px}
.nav .plus svg{width:27px;height:27px}
.nav .add-nav{align-self:center}
.page{padding-bottom:calc(118px + env(safe-area-inset-bottom))}
/* Cards contain one archive-specific square image and metadata. */
.archive-list{display:grid;gap:10px;margin:18px 0 16px}
.archive-row{position:relative;min-width:0;display:flex}
.archivepick{display:flex;align-items:center;gap:14px;width:100%;min-height:109px;margin:0;border:2px solid #000;padding:12px 55px 12px 12px;text-align:left;overflow:hidden}
.archivepick .archive-info{min-width:0;flex:1;overflow-wrap:anywhere}
.archivepick strong{font-size:17px;line-height:1.3}
.archivepick small{font-size:10px;line-height:1.45;margin-top:7px;letter-spacing:.025em}
.archive-cover{width:76px;height:76px;flex:none;border:1px solid currentColor;display:grid;place-items:center;background:#fff;overflow:hidden}
.archive-cover img{width:100%;height:100%;object-fit:cover}
.archive-cover .archive-cover-default{width:68%;height:68%;object-fit:contain}
.archive-row-edit{position:absolute;right:13px;top:50%;transform:translateY(-50%);display:grid;place-items:center;background:#fff;border:1px solid #000;width:39px;height:39px;color:var(--blue)}
.archive-row-edit svg{width:19px;height:19px}
.archive-row-edit:active{transform:translateY(-50%) scale(.94)!important}
.archive-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:9px;margin:19px 0 28px}
.archive-actions .solid{min-height:57px;padding:11px 6px;text-align:center;font-size:10px;letter-spacing:.005em;white-space:nowrap}
.empty-archives{border:1.5px dashed #aaa;padding:24px 12px;color:#777;text-align:center;font-size:11px}
.archive-cover-preview{width:130px;height:130px;display:grid;place-items:center;border:2px solid #000;background:#fff;margin:8px auto 16px;overflow:hidden}
.archive-cover-preview img{width:100%;height:100%;object-fit:cover}
.archive-cover-preview img.archive-cover-default{width:62%;height:62%;object-fit:contain}
#editArchiveRemovePhoto{margin-top:9px;min-height:38px}
/* The search page reuses the same moment cards and masonry sizing. */
.search-note{color:#777;font-size:12px;line-height:1.4;margin:6px 0 18px;min-height:20px}
.search-entry{position:relative}
.search-entry svg{position:absolute;left:13px;top:50%;transform:translateY(-50%);width:20px;height:20px;color:var(--blue);pointer-events:none}
.field .search-entry input{padding-left:43px!important}
#searchResults{padding-top:2px}
/* Account is its own tab, not a popup. */
#accountView .section-title{margin-top:22px}
.account-archive-row{display:flex;align-items:stretch;gap:8px;margin:9px 0}
.account-archive-row .profile-archive{flex:1;margin:0;min-width:0;overflow-wrap:anywhere}
.manage-archive{width:42px;flex:none;border:1px solid #000;background:#fff;color:var(--blue);font-size:17px;font-weight:800;letter-spacing:1px}
.manage-actions{display:grid;gap:12px;margin-top:22px}
.manage-name{font-family:Anton,Impact,sans-serif;font-size:25px;overflow-wrap:anywhere}
.danger-btn{border-color:#000}
.danger-copy{font-size:13px;color:#444;margin:23px 0;line-height:1.6}
.cancel-danger{margin-top:10px}
.account-logout{margin:28px 0 25px}
.profile-center{padding:19px 0 28px}
.profile-avatar{border-radius:0!important;width:120px;height:120px;border:2px solid #000}
.profile-avatar img{border-radius:0!important}
.profile-editor-photo .profile-avatar{width:118px;height:118px}
.profile-user{font-size:30px;margin-top:14px}
.profile-section{margin:15px 0 15px}
/* Small real preview of the moment card, updated from editable fields. */
.live-preview{border-top:1.5px solid #000;margin:22px 0;padding-top:20px}
.live-preview-heading{font-size:22px;margin:0 0 4px}
.live-preview>p{font-size:10px;color:#777;letter-spacing:.03em;margin:0 0 14px}
.live-preview-card{width:min(65%,210px);padding:7px 7px 0;border:1px solid #000;box-shadow:2px 2px 0 #000;background:#fff;overflow:hidden}
.live-preview-frame{width:100%;min-height:130px;display:grid;place-items:center;background:#f5f5f5}
.live-preview-frame img{width:100%;height:auto;max-height:255px;object-fit:contain}
.live-preview-frame span{font-size:9px;color:#777;font-weight:700;letter-spacing:.07em}
.live-preview-copy{padding:10px 3px 13px;min-width:0}
.live-preview-copy strong{display:block;font-size:13px;line-height:1.25;overflow-wrap:anywhere}
.live-preview-copy small{display:block;font-size:10px;color:#777;margin-top:6px;overflow-wrap:anywhere}
.live-preview-copy p{font-size:10px;line-height:1.4;margin:7px 0 0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere}
/* Square cropper, same pattern for account and archive pictures. */
.crop-overlay{position:fixed;z-index:700;inset:0;padding:calc(19px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));display:flex;align-items:center;justify-content:center;background:#fff;overflow:hidden}
.crop-panel{width:100%;max-width:345px;text-align:center}
.crop-panel h2{font-size:29px;margin:0 0 8px}
.crop-panel p{font-size:12px;color:#777;line-height:1.4;margin:0 0 20px}
.crop-frame{width:min(72vw,290px);aspect-ratio:1;position:relative;margin:0 auto;background:#f0f0f0;border:2px solid #000;touch-action:none;overflow:hidden;user-select:none;-webkit-user-select:none}
.crop-frame img{max-width:none;position:absolute;left:50%;top:50%;pointer-events:none;user-select:none;-webkit-user-select:none}
.crop-zoom-label{display:block;font-size:11px;font-weight:700;letter-spacing:.08em;text-align:left;margin:24px auto 8px;width:min(72vw,290px)}
.crop-zoom{width:min(72vw,290px);display:block;margin:0 auto 24px;accent-color:var(--blue);height:28px}
.crop-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
/* No interactive animation on favorites. One touch = filled/unfilled immediately. */
.favorite-star,.favorite-star svg,.favorite-star svg path{transition:none!important;animation:none!important}
.favorite-star.star-pop svg{animation:none!important}
/* Login and registration fit the 393px-wide app canvas; no page or nested panel scrolling. */
.authpage{width:100%;max-width:100%;height:100dvh;overflow:hidden;overscroll-behavior:none;padding:clamp(25px,5dvh,49px) 20px calc(9px + env(safe-area-inset-bottom));align-items:flex-start}
.authbox{overflow:hidden!important;max-height:100%;overscroll-behavior:none}
.authlogo{margin-bottom:20px}
.authswitch{margin:24px 0 8px}
body.auth-visible{overflow:hidden;height:100dvh;overscroll-behavior:none}
/* Do not display system UI zoom artifacts caused by small controls. */
input,select,textarea{font-size:16px!important;touch-action:manipulation}
@media(max-width:420px){.wrap{padding:0 17px}.intro h1{font-size:clamp(29px,7.2vw,36px)}.header .wordmark{width:clamp(151px,38vw,200px)}.profile-archive{padding:13px}.nav button{font-size:8px}}
@media(max-height:680px){.authpage{padding-top:16px}.authlogo{width:92px;margin-bottom:12px}.authbox h1{font-size:25px}.authswitch{margin-top:11px}}
@media(prefers-reduced-motion:reduce){.crop-overlay *{animation:none!important;transition:none!important}}

.favorite-star:not(:disabled):active{transform:none!important}

/* ARCHIVE. v1.7 — permanent scroll surface, iPhone 15 Pro 393x852 */
:root{--archive-nav-clearance:100px}
/* The main page is the only vertical scroller while logged in. The nav overlays none of the last content. */
html:has(#app:not([hidden])),body:has(#app:not([hidden])){height:100%;min-height:0;overflow:hidden!important;overscroll-behavior:none}
#app{height:100dvh;max-height:100dvh;overflow:hidden;position:relative;background:#fff}
#pageScroller{height:100dvh;height:100%;max-height:100%;width:100%;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none;touch-action:pan-y;padding-bottom:calc(var(--archive-nav-clearance) + 30px + env(safe-area-inset-bottom))!important;scroll-padding-bottom:calc(var(--archive-nav-clearance) + 25px)}
#pageScroller::-webkit-scrollbar{display:none}
#app .footer{position:relative;display:block;margin-top:26px;margin-bottom:16px}
/* The navigation's black rule stays attached to the same continuous white surface. */
#app .nav{z-index:40;background:#fff!important}
/* Header archive switcher (content never collides with the ARCHIVE. wordmark). */
#app .header{position:relative;z-index:50;gap:10px}
#app .header .wordmark{flex-shrink:0;width:clamp(145px,37vw,190px)}
.archive-switch-area{position:relative;flex:1;min-width:0;display:flex;justify-content:flex-end;z-index:55}
.archive-switch-btn{border:1.5px solid #000;background:#fff;display:flex;align-items:center;gap:6px;min-width:0;max-width:100%;height:45px;padding:5px 7px;color:#000}
.archive-switch-photo{height:31px;width:31px;flex:none;object-fit:cover;aspect-ratio:1;border:1px solid #000}
.archive-switch-photo.is-default{object-fit:contain;border:0;padding:1px}
.archive-switch-label{min-width:0;font-size:10px;letter-spacing:.015em;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left}
.archive-switch-chevron{width:16px;height:16px;color:var(--blue);flex:none;transition:transform .22s var(--spring)}
.archive-switch-btn[aria-expanded=true] .archive-switch-chevron{transform:rotate(180deg)}
.archive-switch-menu{position:absolute;right:0;top:calc(100% + 7px);width:min(258px,calc(100vw - 34px));max-height:min(375px,60dvh);overflow-y:auto;background:#fff;border:1.5px solid #000;box-shadow:3px 4px 0 #000;animation:dropIn .22s var(--spring) both;z-index:100;padding:5px}
.archive-switch-option{display:flex;align-items:center;gap:9px;width:100%;padding:8px 7px;border:0;background:#fff;text-align:left;min-height:50px;color:#000}
.archive-switch-option + .archive-switch-option{border-top:1px solid #e7e7e7}
.archive-switch-option.is-active{background:#f3f3f3}
.archive-switch-option:active{background:#ebebeb}
.archive-switch-photo-frame{height:34px;width:34px;flex:none;display:grid;place-items:center;border:1px solid #000;overflow:hidden}
.archive-switch-photo-frame img{height:100%;width:100%;object-fit:cover}
.archive-switch-photo-frame img.is-default{height:75%;width:75%;object-fit:contain}
.archive-switch-option-name{flex:1;min-width:0;font-size:12px;font-weight:700;line-height:1.3;overflow-wrap:anywhere}
.archive-switch-check{font-weight:800;color:var(--blue);font-size:16px}
.archive-switch-empty{font-size:11px;color:#777;padding:11px;line-height:1.4;margin:0}
/* New moment: thumbnail sits in the header, full preview opens without destroying the editor. */
.sheethead h2{flex:1;min-width:0;line-height:1.1}
.sheethead-tools{display:flex;align-items:center;gap:8px;flex:none}
.preview-thumb{background:#fff;color:#000;border:1px solid #000;width:62px;min-height:70px;padding:3px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;transition:transform .2s var(--spring)}
.preview-thumb-photo{display:grid;place-items:center;width:52px;height:48px;overflow:hidden;background:#f6f6f6;color:#aaa}
.preview-thumb-photo img{width:100%;height:100%;object-fit:cover}
.preview-thumb-photo>span{font-size:21px;color:#777;font-weight:400;line-height:1}
.preview-thumb-label{font-size:8px;font-weight:800;letter-spacing:.04em}
.preview-overlay{position:fixed;inset:0;z-index:650;background:#fff;overflow-y:auto;overscroll-behavior:contain;padding:calc(18px + env(safe-area-inset-top)) 20px calc(30px + env(safe-area-inset-bottom));display:flex;align-items:flex-start;justify-content:center}
.preview-panel{width:min(100%,370px);margin:auto 0}
.preview-panel-head{display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:2px solid #000;padding-bottom:15px}
.preview-panel-head h2{margin:0;font-size:28px}
.preview-description{font-size:11px;color:#777;margin:14px 0 18px}
.preview-full-card{border:1.5px solid #000;padding:9px 9px 0;box-shadow:3px 3px 0 #000;background:#fff;width:min(100%,300px);margin:0 auto 25px}
.preview-full-photo{display:grid;place-items:center;background:#f6f6f6;width:100%;min-height:165px}
.preview-full-photo img{width:100%;max-height:320px;object-fit:contain}
.preview-full-photo span{font-size:12px;font-weight:700;color:#777}
.preview-full-info{padding:13px 5px 17px}
.preview-full-info strong{display:block;font-size:17px;line-height:1.35;overflow-wrap:anywhere}
.preview-full-info small{display:block;color:#777;font-size:11px;margin-top:9px}
.preview-full-info p{font-size:12px;margin:10px 0 0;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere}
body.preview-open{overflow:hidden}
/* Auth logo is not moved; the heading/form underneath moves down to balance whitespace. */
.authpage{height:100dvh;overflow:hidden;align-items:flex-start}
.authbox{overflow:hidden!important}
.authlogo{margin-bottom:50px}
.authpage:has(#confirmWrap:not([hidden])) .authlogo{margin-bottom:33px}
.authpage:has(#confirmWrap:not([hidden])) .authswitch{margin-top:18px}
/* Slightly smaller, visually centered splash logo and loader. */
.splash-inner{width:min(39vw,160px);max-width:160px;transform:translateY(-7px)}
/* No surprise back-scrolling on mobile. */
#pageScroller:focus{outline:none}
@media(prefers-reduced-motion:reduce){.archive-switch-menu{animation:none}.archive-switch-chevron{transition:none}.preview-thumb{transition:none}}

/* v1.7 QA refinements: real footer clearance measured from its fixed navigation box. */
#pageScroller{padding-bottom:calc(var(--archive-nav-clearance,82px) + 20px)!important;scroll-padding-bottom:calc(var(--archive-nav-clearance,82px) + 18px)}
#app .footer{margin-bottom:0}
/* Keep mini live preview in view while the long editor is scrolled or keyboard is showing. */
.sheethead{position:sticky;top:0;background:#fff;z-index:20}
.preview-thumb{width:73px;min-height:78px;gap:1px}
.preview-thumb-photo{width:61px;height:47px}
.preview-thumb-title{display:block;max-width:65px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:8px;font-weight:800;line-height:1.2;text-align:center}
.preview-thumb-label{font-size:7px;color:#777;line-height:1.15}
@media(max-width:370px){.preview-thumb{width:65px}.preview-thumb-photo{width:53px;height:43px}.preview-thumb-title{max-width:56px}.sheethead h2{font-size:25px}}

/* ARCHIVE. v1.8 — minimal, mobile-first profile and editor redesign */
/* Profile: larger square photo on the left; username, e-mail and edit button on the right. */
#accountView .profile-center{display:grid;grid-template-columns:clamp(120px,39vw,166px) minmax(0,1fr);align-items:center;column-gap:clamp(10px,3.8vw,22px);text-align:left;padding:19px 0 24px;min-width:0}
#accountView .profile-center .profile-avatar{width:100%;height:auto;aspect-ratio:1;align-self:center;border-radius:0;}
#accountView .profile-details{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;min-width:0;overflow-wrap:anywhere}
#accountView .profile-user{font-size:clamp(22px,6.6vw,33px);line-height:1.12;margin:0;max-width:100%;overflow-wrap:anywhere}
#accountView .profile-email{font-size:clamp(11px,3.15vw,13px);line-height:1.38;color:#777;margin:7px 0 14px;max-width:100%;overflow-wrap:anywhere}
#accountView .profile-edit-btn{min-width:0;width:min(100%,175px);min-height:42px;padding:9px 7px;font-size:11px;letter-spacing:.035em;text-align:center;white-space:nowrap}
#accountView .profile-section{margin:0 0 14px;padding-top:17px}
@media(min-width:700px){#accountView .profile-center{grid-template-columns:170px minmax(0,1fr);max-width:590px;column-gap:25px}#accountView .profile-user{font-size:35px}#accountView .profile-email{font-size:14px}#accountView .profile-edit-btn{width:175px}}
@media(max-width:350px){#accountView .profile-center{grid-template-columns:110px minmax(0,1fr);column-gap:10px}#accountView .profile-user{font-size:22px}#accountView .profile-edit-btn{font-size:10px;min-height:39px}}

/* Archive tiles stay WHITE, are not buttons, and cannot change archive when tapped. */
#archivesView .archivepick,#archivesView .archivepick.selected{background:#fff!important;color:#000!important;cursor:default;transition:none!important}
#archivesView .archivepick:active{transform:none!important}
#archivesView .archive-row-edit{z-index:1}

/* The editor preview sits alongside Title/Date/Location, not beside the modal heading. */
.moment-editor-top{display:grid;grid-template-columns:minmax(0,1fr) minmax(125px,40%);align-items:start;gap:12px;max-width:100%;margin-top:21px}
.moment-editor-fields{min-width:0}
.moment-editor-fields .field{margin:0 0 18px}
.moment-editor-fields .field label{font-size:10px;letter-spacing:.04em;line-height:1.35;min-height:15px}
.moment-editor-fields .date-shell{gap:5px;padding:0 10px}
.moment-editor-fields .date-shell svg{width:17px;height:17px}
.moment-editor-fields .date-label{font-size:13px;min-width:0}
.moment-editor-fields .field input:not([type=file]):not([type=checkbox]){padding:10px}
.moment-editor-fields .location-credit{font-size:8px;line-height:1.4}
.moment-editor-fields .location-results{position:relative;z-index:3}
.moment-preview-wrap{min-width:0;display:flex;flex-direction:column;align-items:stretch;gap:7px}
.moment-preview-eyebrow{font-size:10px;line-height:1.35;font-weight:700;letter-spacing:.055em}
.moment-preview-wrap .preview-thumb{width:100%;min-width:0;min-height:246px;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;gap:0;text-align:left;background:#fff;border:1.5px solid #000;padding:7px;box-shadow:2px 2px 0 #000;color:#000}
.moment-preview-wrap .preview-thumb-photo{width:100%;height:auto;aspect-ratio:4/5;display:grid;place-items:center;background:#f6f6f6;overflow:hidden}
.moment-preview-wrap .preview-thumb-photo img{width:100%;height:100%;object-fit:cover}
.moment-preview-wrap .preview-thumb-photo>span{font-size:26px}
.moment-preview-wrap .preview-thumb-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;white-space:normal;overflow:hidden;max-width:none;font-size:12px;line-height:1.3;margin:9px 2px 4px;text-align:left;overflow-wrap:anywhere}
.moment-preview-wrap .preview-thumb-location{display:block;color:#666;font-size:9px;line-height:1.3;margin:0 2px 4px;overflow-wrap:anywhere}
.moment-preview-wrap .preview-thumb-date{font-size:9px;line-height:1.25;color:#777;margin:0 2px 6px;overflow-wrap:anywhere}
.moment-preview-wrap .preview-thumb-label{display:block;font-size:8px;color:var(--blue);font-weight:700;line-height:1.25;letter-spacing:.02em;margin: auto 2px 1px;text-align:left}
/* Selected photo is shown only in the live preview. Keep an unobtrusive remove action. */
.photo-remove-button{display:block;width:max-content;margin:10px 0 0 auto;padding:5px 0;border:0;background:transparent;color:#777;font-size:10px;font-weight:700;letter-spacing:.045em;text-decoration:underline}
@media(max-width:370px){.moment-editor-top{grid-template-columns:minmax(0,1fr) minmax(118px,40%);gap:9px}.moment-editor-fields .field label{font-size:9px}.moment-editor-fields .date-label{font-size:12px}.moment-preview-wrap .preview-thumb{padding:5px;min-height:223px}.moment-preview-eyebrow{font-size:9px}}
@media(min-width:700px){.moment-editor-top{grid-template-columns:minmax(0,1fr) minmax(165px,36%);gap:20px}.moment-preview-wrap .preview-thumb{min-height:305px}.moment-preview-wrap .preview-thumb-photo{aspect-ratio:1/1}.moment-preview-wrap .preview-thumb-title{font-size:14px}}
