:root{--bg:#fff;--ink:#171719;--muted:#818187;--line:#e8e8ed;--accent:#007aff;--surface:#f3f3f7}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;color:var(--ink);background:var(--bg);font:15px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC",sans-serif}button,input,select{font:inherit}a{color:inherit;text-decoration:none}button,.button{border:0;border-radius:20px;padding:10px 16px;min-height:44px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:7px;color:var(--accent);background:var(--surface);font-size:14px}button:disabled{opacity:.45;cursor:default}button:focus-visible,a:focus-visible{outline:3px solid #91bcff;outline-offset:2px}.primary{color:white;background:var(--accent)}.quiet{color:var(--accent);background:var(--surface)}.icon-button{min-width:44px;padding:8px;font-size:20px}.danger{color:#e74343!important}input,select{border:0;border-radius:12px;padding:12px;background:var(--surface);font-size:16px;color:var(--ink);min-width:0}input:focus,select:focus{outline:2px solid #b3d1ff}main{max-width:1320px;margin:auto;padding:20px 20px 120px}h1,h2,h3,p{margin-top:0}h1{font-size:30px;line-height:1.2;letter-spacing:-.8px;margin-bottom:8px}h2{font-size:22px;letter-spacing:-.4px}h3{font-size:16px}p{color:var(--muted)}.section-heading,.page-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}.section-heading h1{font-size:28px}.section-heading p{font-size:12px;margin:0}.actions{display:flex;gap:8px;align-items:center}.back{background:transparent;padding:0;justify-content:start;font-size:14px;min-height:30px}.page-subtitle{font-size:13px;margin:8px 0 24px}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0}.toolbar input{width:260px}.photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px}.photo-grid.compact{grid-template-columns:repeat(auto-fill,minmax(105px,1fr));gap:3px}.photo-grid.small{grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:4px}.photo-grid.large{grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}.photo-card{padding:0;min-height:0;display:block;position:relative;overflow:hidden;border-radius:3px;background:#f1f1f3;cursor:pointer}.photo-card img{display:block;width:100%;aspect-ratio:1;object-fit:cover;background:#ececf0}.photo-caption{display:block;padding:5px;font-size:10px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--muted);background:white}.compact .photo-caption,.small .photo-caption{display:none}.photo-card.selected:after{content:'✓';position:absolute;bottom:5px;right:5px;background:var(--accent);border:2px solid white;color:#fff;border-radius:50%;width:23px;height:23px;display:grid;place-items:center;font-size:12px}.photo-card.selected img{opacity:.75}.timeline-date{grid-column:1 / -1;font-size:17px;letter-spacing:-.25px;margin:0;padding:18px 3px 8px}.timeline-date:first-child{padding-top:6px}.pagination{display:flex;justify-content:center;align-items:center;gap:12px;margin:22px 0;font-size:12px}.empty{padding:60px 15px;text-align:center;color:var(--muted)}.footnote{font-size:12px;color:var(--muted);margin:20px 0 0}#photos>.footnote{display:none}#bottomNav{display:none;position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:720px;z-index:5;padding:8px 12px calc(8px + env(safe-area-inset-bottom));background:#ffffffed;border-top:1px solid #ededf0;backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);justify-content:space-around;gap:3px}body.authenticated #bottomNav{display:flex}#bottomNav a{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:52px;color:#7b7b82;border-radius:18px;font-size:10px;font-weight:500}#bottomNav a.active{color:var(--accent);background:#eaf3ff}#bottomNav svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}#bottomNav a:last-child{flex:.85;border-left:1px solid var(--line);border-radius:0}#bottomNav a:last-child.active{border-radius:18px}.groups{display:flex;gap:7px;overflow:auto;flex-wrap:nowrap;margin:6px 0 12px;max-height:52px}.groups button{flex-shrink:0;min-height:36px;padding:6px 12px;font-size:12px}.groups button.active{background:var(--accent);color:white}#albumCrumbs,#breadcrumbs{display:flex;align-items:center;gap:4px;overflow:auto;white-space:nowrap;font-size:12px}#albumCrumbs button,#breadcrumbs button{background:transparent;min-height:36px;padding:5px 7px;flex-shrink:0}#albumBar p{display:none}#geoFilters{display:flex;gap:5px;margin:8px 0}#geoFilters select{flex:1;width:33%;padding:7px;font-size:16px;min-width:0}#selectionBar{position:fixed;bottom:calc(85px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:calc(100% - 24px);max-width:620px;z-index:4;background:#f5f7faed;backdrop-filter:blur(20px);border:1px solid var(--line);border-radius:20px;padding:10px;display:flex;align-items:center;gap:8px;font-size:12px;box-shadow:0 4px 30px #0001}#selectionBar .primary{margin-left:auto}#selectionBar .quiet{font-size:12px;padding:7px}.collection-section{margin-top:26px}.collection-section h2{font-size:21px;margin-bottom:14px}.collection-row{display:flex;overflow:auto;gap:16px;padding-bottom:8px;scroll-snap-type:x proximity}.collection-card{display:block;flex-shrink:0;width:160px;padding:0;background:none;text-align:left;color:var(--ink);border-radius:0;scroll-snap-align:start}.collection-card img,.album-placeholder{width:160px;height:160px;object-fit:cover;border-radius:18px;display:block;background:#f0f0f5}.album-placeholder{display:grid;place-items:center;font-size:50px;color:#a7b9d5}.collection-card strong{display:block;font-size:14px;margin-top:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600}.collection-card small{display:block;font-size:12px;color:var(--muted);margin-top:2px}.system-list{background:var(--surface);border-radius:18px;overflow:hidden}.system-list>div,.system-list>button{display:flex;align-items:center;justify-content:space-between;width:100%;padding:17px 20px;border-bottom:1px solid #e4e4eb;font-size:14px;text-align:left;border-radius:0;background:transparent}.system-list strong{font-size:12px;color:var(--muted);font-weight:400}.system-list>p{font-size:12px;padding:0 20px;margin:12px 0}.system-list button span{font-size:22px;color:#b7b7bf}.search-field{display:flex;align-items:center;gap:8px;background:var(--surface);padding:0 12px;border-radius:12px;margin:18px 0}.search-field>span{font-size:24px;color:var(--muted)}.search-field input{width:100%;padding:12px 0;outline:0!important}.segments{display:flex;gap:4px;background:var(--surface);border-radius:12px;padding:3px;margin-bottom:16px}.segments button{flex:1;min-height:36px;font-size:13px;background:transparent;border-radius:9px}.segments button.active{background:white;color:var(--ink);box-shadow:0 2px 5px #0001}.search-file-row{display:block;width:100%;padding:15px 12px;text-align:left;border-bottom:1px solid var(--line);border-radius:0;background:transparent;color:var(--ink)}.search-file-row small{display:block;color:var(--muted);font-size:11px;overflow-wrap:anywhere}.file-table{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left}th{font-weight:400;font-size:12px;color:var(--muted)}th,td{padding:15px 12px;border-bottom:1px solid var(--line)}td{font-size:13px}td:first-child{width:58%}td button{padding:0;min-height:44px;justify-content:start;text-align:left;background:transparent}td small{display:block;color:var(--muted);font-size:11px;overflow-wrap:anywhere}.file-icon{color:var(--accent);font-size:23px;margin-right:7px}.download-link{color:var(--accent);white-space:nowrap}dialog{width:440px;max-width:calc(100vw - 24px);max-height:85vh;max-height:85dvh;overflow:auto;border:0;border-radius:24px;padding:26px;background:white;color:var(--ink);box-shadow:0 20px 80px #0002}dialog::backdrop{background:#0006;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}dialog form{display:flex;flex-direction:column;gap:12px}dialog h2{font-size:22px;margin:0 0 12px}dialog p{font-size:13px}dialog label,dialog small{font-size:12px;color:var(--muted)}.brand-mark{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:var(--accent);color:white;font-size:25px;margin-bottom:12px}.full{width:100%}.error{color:#e34b4b!important;font-size:12px;min-height:0;margin:0}.dialog-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;gap:12px}.dialog-heading h2{margin:0}.photo-tool-fields{display:flex;flex-direction:column;gap:10px}.photo-tool-actions{display:flex;gap:10px;margin-top:22px;flex-wrap:wrap}.photo-tool-actions button{flex:1}#photoInfo{display:grid;grid-template-columns:85px minmax(0,1fr);gap:12px;margin:20px 0}#photoInfo dt{color:var(--muted);font-size:12px}#photoInfo dd{margin:0;font-size:13px;overflow-wrap:anywhere}.viewer{width:calc(100vw - 32px);height:calc(100vh - 32px);max-width:1500px;max-height:none;background:#101011;color:#fff;overflow:hidden;padding:12px;border-radius:20px}.viewer::backdrop{background:#000}.viewer-top{display:flex;height:52px;align-items:center;gap:10px;justify-content:space-between}.viewer-top>span{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.viewer .quiet{background:#28282b;color:white}.viewer-top .actions>*{padding:8px 10px;white-space:nowrap}.image-stage{height:calc(100% - 104px);display:flex;align-items:center;justify-content:center;overflow:auto}.image-stage img{max-width:100%;max-height:100%;object-fit:contain;flex-shrink:0}.image-stage.zoomed{align-items:flex-start;justify-content:flex-start}.image-stage.zoomed img{max-width:none;max-height:none}.viewer-bottom{height:52px;display:flex;align-items:center;justify-content:space-between;gap:6px}.upload-job{border-bottom:1px solid var(--line);padding:15px 0}.upload-job strong{font-size:13px;overflow-wrap:anywhere}.upload-job p{font-size:12px;margin:6px 0}progress{width:100%;height:8px;accent-color:var(--accent)}#albumTarget{width:100%}.session-row{display:flex;gap:10px;justify-content:space-between;padding:14px 0;border-bottom:1px solid var(--line)}.session-row strong{font-size:13px}.session-row small{display:block;font-size:11px;overflow-wrap:anywhere}.log-row{display:grid;grid-template-columns:110px 80px 1fr;gap:10px;font-size:11px;padding:12px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.activity{width:760px}#toast{position:fixed;bottom:calc(100px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);max-width:calc(100vw - 30px);background:#242428ef;color:white;border-radius:16px;padding:12px 20px;z-index:20;font-size:13px}
@media(max-width:600px){main{padding:calc(14px + env(safe-area-inset-top)) 16px calc(110px + env(safe-area-inset-bottom))}.photos-page main{padding-left:3px;padding-right:3px;padding-top:calc(8px + env(safe-area-inset-top))}.section-heading{gap:8px}.photos-page .section-heading{padding:0 12px;margin-bottom:8px}.photos-page .section-heading h1{font-size:24px;letter-spacing:-.7px;margin:0}.photos-page .section-heading p{font-size:10px;max-width:190px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.photos-page .section-heading .actions{gap:6px}.photos-page .section-heading .actions button{min-height:40px;padding:8px 12px}.photos-page .section-heading .icon-button{border-radius:50%;min-width:40px;padding:8px}.photo-grid.compact{grid-template-columns:repeat(5,minmax(0,1fr));gap:2px}.photo-grid.small{grid-template-columns:repeat(3,minmax(0,1fr));gap:3px}.photo-grid.medium{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.photo-grid.large{grid-template-columns:1fr}.timeline-date{font-size:16px;padding:16px 12px 8px}.timeline-date:first-child{padding-top:6px}.photo-card{border-radius:2px}.page-heading{margin-bottom:8px}.page-heading h1{font-size:30px;margin:0}.collection-card,.collection-card img,.album-placeholder{width:148px}.collection-card img,.album-placeholder{height:148px}.collection-row{margin-right:-16px}.collection-section{margin-top:24px}.collection-section h2{font-size:21px}.collection-card strong{font-size:13px}.toolbar{display:block;margin:12px 0}.toolbar input{width:100%;margin-top:10px}#files .section-heading h1{font-size:28px}#files .section-heading .actions{gap:5px}#files .actions button{font-size:12px;padding:8px 10px}.file-table{overflow:visible}.file-table thead{display:none}.file-table tr{display:grid;grid-template-columns:minmax(0,1fr) auto;padding:10px 0;border-bottom:1px solid var(--line);column-gap:8px}.file-table td{border:0;padding:0;width:auto!important}.file-table td:first-child{grid-column:1;grid-row:1;font-size:14px;overflow-wrap:anywhere}.file-table td:nth-child(2){grid-column:1;grid-row:2;font-size:11px;color:var(--muted);padding-left:34px}.file-table td:nth-child(3){grid-column:1;grid-row:3;font-size:10px;color:var(--muted);padding-left:34px}.file-table td:last-child{grid-column:2;grid-row:1 / 4;display:flex;align-items:center}.download-link{display:inline-flex;align-items:center;min-height:44px;font-size:13px}.viewer{width:100vw;height:100vh;height:100dvh;max-width:100vw;max-height:100dvh;border-radius:0;padding:calc(4px + env(safe-area-inset-top)) 0 env(safe-area-inset-bottom);margin:0}.viewer-top{padding:0 10px;height:56px;gap:5px}.viewer-top>span{font-size:10px}.viewer-top .actions{gap:4px}.viewer-top .actions>*{font-size:12px;padding:8px;min-width:36px}.image-stage{height:calc(100% - 108px)}.viewer-bottom{padding:0 10px}.viewer-bottom button{font-size:12px;padding:8px 10px}.log-row{grid-template-columns:80px 60px 1fr;gap:5px;font-size:10px}#geoFilters,#albumCrumbs,.groups{margin-left:9px;margin-right:9px}#bottomNav{padding-left:8px;padding-right:8px}#selectionBar .primary{font-size:12px;padding:8px 12px}}
@media(prefers-reduced-motion:no-preference){.collection-card img{transition:opacity .2s}.collection-card:hover img{opacity:.85}}
/* The library toolbar floats over the photo canvas. */
.photos-page #photos>.section-heading{position:fixed;top:0;left:50%;transform:translateX(-50%);width:100%;max-width:1320px;z-index:3;margin:0;padding:10px 20px;background:linear-gradient(180deg,#ffffffa8,#ffffff68);backdrop-filter:blur(20px) saturate(170%);-webkit-backdrop-filter:blur(20px) saturate(170%);border-bottom:1px solid #ffffff50;box-shadow:0 1px 10px #00000004}.photos-page #photos>.section-heading .quiet{background:#ffffff75;box-shadow:inset 0 0 0 1px #ffffff80}.photos-page #photos>.section-heading p{color:#606067}.photos-page main{padding-top:0}.photos-page #photoGrid{scroll-margin-top:76px}.photos-page #photoGrid>.timeline-date:first-child{padding-top:80px}.photos-page #albumBar,.photos-page #geoFilters{padding-top:76px}.photos-page #albumBar:not([hidden])+#selectionBar+#geoFilters{padding-top:0}.photos-page #albumBar:not([hidden])~#photoGrid>.timeline-date:first-child,.photos-page #geoFilters:not([hidden])~#photoGrid>.timeline-date:first-child,.photos-page #groups:not([hidden])~#photoGrid>.timeline-date:first-child{padding-top:6px}
@media(max-width:600px){.photos-page main{padding-top:0}.photos-page #photos>.section-heading{padding:calc(8px + env(safe-area-inset-top)) 15px 8px;background:linear-gradient(180deg,#ffffff9c,#ffffff5c)}.photos-page #photoGrid>.timeline-date:first-child{padding-top:calc(68px + env(safe-area-inset-top))}.photos-page #albumBar,.photos-page #geoFilters{padding-top:calc(68px + env(safe-area-inset-top))}.photos-page #albumBar:not([hidden])+#selectionBar+#geoFilters{padding-top:0}.photos-page #albumBar:not([hidden])~#photoGrid>.timeline-date:first-child,.photos-page #geoFilters:not([hidden])~#photoGrid>.timeline-date:first-child,.photos-page #groups:not([hidden])~#photoGrid>.timeline-date:first-child{padding-top:6px}}

.photos-page #albumBar[hidden]~#geoFilters[hidden]+#groups:not([hidden]){padding-top:76px;max-height:128px}
@media(max-width:600px){.photos-page #albumBar[hidden]~#geoFilters[hidden]+#groups:not([hidden]){padding-top:calc(68px + env(safe-area-inset-top));max-height:calc(120px + env(safe-area-inset-top))}}
/* Reference: edge-to-edge library canvas with independent glass controls. */
.photos-page #photos>.section-heading{background:linear-gradient(180deg,#00000088 0%,#00000055 58%,#00000000 100%);backdrop-filter:none;-webkit-backdrop-filter:none;border:0;box-shadow:none;color:white;padding:26px 24px 42px;align-items:center;pointer-events:none}.photos-page #photos>.section-heading>div{pointer-events:auto}.photos-page #photos>.section-heading h1{font-size:42px;font-weight:750;letter-spacing:-1.3px;text-shadow:0 1px 12px #0005}.photos-page #photos>.section-heading p{font-size:16px;font-weight:600;color:#fff;text-shadow:0 1px 8px #0008}.photos-page #photos>.section-heading .quiet{background:#ffffff24;color:white;border:1px solid #ffffff40;box-shadow:inset 0 1px 1px #ffffff30,0 3px 12px #0002;backdrop-filter:blur(18px) saturate(150%);-webkit-backdrop-filter:blur(18px) saturate(150%);min-height:52px;border-radius:28px;padding:12px 22px;font-size:18px}.photos-page #photos>.section-heading .icon-button{width:52px;min-width:52px;padding:12px;font-size:0}.photos-page #photos>.section-heading .icon-button:before{content:'';width:22px;height:16px;background:linear-gradient(white,white) 0 0/22px 2px no-repeat,linear-gradient(white,white) 0 7px/16px 2px no-repeat,linear-gradient(white,white) 0 14px/10px 2px no-repeat;border-radius:1px}.photos-page main{padding-left:0;padding-right:0;padding-top:0}.photos-page #photoGrid>.timeline-date:first-child{display:none}.photos-page #photoGrid .photo-card{border-radius:3px}.photos-page #collectionBack{color:white}.photos-page #albumBar,.photos-page #geoFilters{padding-top:160px}
@media(max-width:600px){.photos-page #photos>.section-heading{padding:calc(22px + env(safe-area-inset-top)) 14px 38px;gap:10px}.photos-page .section-heading h1,.photos-page #photos>.section-heading h1{font-size:36px;line-height:1.15;margin-bottom:7px;letter-spacing:-1px}.photos-page #photos>.section-heading p{font-size:12px;line-height:1.4;max-width:220px;white-space:normal}.photos-page #photos>.section-heading .actions{gap:9px}.photos-page #photos>.section-heading .quiet{min-height:48px;font-size:16px;padding:10px 18px}.photos-page #photos>.section-heading .icon-button{width:48px;min-width:48px;padding:10px}.photos-page #photoGrid>.timeline-date:first-child{display:none}.photos-page #albumBar,.photos-page #geoFilters{padding-top:calc(140px + env(safe-area-inset-top))}.photos-page #albumBar[hidden]~#geoFilters[hidden]+#groups:not([hidden]){padding-top:calc(140px + env(safe-area-inset-top));max-height:calc(192px + env(safe-area-inset-top))}}
@media(max-width:600px){.photos-page #photos>.section-heading .icon-button{font-size:0}}
/* Native-photo viewing gestures and thumbnail scrubber. */
.viewer{position:relative;display:none;flex-direction:column;background:#080809}.viewer[open]{display:flex}.viewer-top{flex-shrink:0;height:68px;padding:8px 12px}.viewer-title{text-align:center;flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.4}.viewer-title strong{font-size:14px;font-weight:600}.viewer-title small{font-size:11px;color:#c7c7ce;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.viewer .glass-control{color:white;background:#ffffff16;border:1px solid #ffffff24;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);min-width:42px;height:42px;padding:8px;border-radius:24px}.viewer #closeViewer{font-size:30px;line-height:1}.viewer-top .actions{min-width:42px}.viewer .image-stage{height:auto;flex:1;min-height:0;touch-action:pan-x pan-y}.viewer-bottom{height:54px;flex-shrink:0;justify-content:space-evenly}.viewer-bottom svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.viewer #photoDetailsBtn{font-size:25px}.viewer-strip{display:flex;align-items:center;gap:3px;overflow-x:auto;overflow-y:hidden;height:64px;flex-shrink:0;padding:7px 12px;scrollbar-width:none}.viewer-strip::-webkit-scrollbar{display:none}.strip-photo{padding:0;width:32px;min-width:32px;height:44px;min-height:0;overflow:hidden;border-radius:3px;background:#222;opacity:.65}.strip-photo img{width:100%;height:100%;object-fit:cover;display:block}.strip-photo.active{width:48px;min-width:48px;height:50px;opacity:1;outline:2px solid white;outline-offset:-2px}.viewer.hide-chrome .viewer-top,.viewer.hide-chrome .viewer-bottom,.viewer.hide-chrome .viewer-strip{visibility:hidden}.collection-card{border-radius:18px}.collection-card img{box-shadow:0 2px 9px #00000008}.collection-section{border-top:1px solid #ededf1;padding-top:18px}.collection-section:first-child{border-top:0;padding-top:0}
@media(max-width:600px){.photo-grid.compact{grid-template-columns:repeat(5,minmax(0,1fr));gap:2px}.viewer{padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}.viewer-top{height:64px}.viewer .image-stage{height:auto}.viewer-bottom{height:56px}.viewer-bottom #prevPhoto,.viewer-bottom #nextPhoto{background:transparent;font-size:28px;color:#d6d6dc}.viewer-strip{height:60px}.viewer-title strong{font-size:13px}.viewer .glass-control{min-height:44px;min-width:44px}.collection-card,.collection-card img,.album-placeholder{width:156px}.collection-card img,.album-placeholder{height:156px}}

.viewer .image-stage{touch-action:none}.viewer .image-stage.zoomed{touch-action:pan-x pan-y}
#photoInfoDialog{width:100%;max-width:720px;max-height:74vh;max-height:74dvh;margin:auto auto 0;border-radius:26px 26px 0 0;padding-bottom:calc(24px + env(safe-area-inset-bottom));background:#fffffff5;backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px)}#photoInfoDialog:before{content:'';display:block;width:36px;height:5px;border-radius:5px;background:#c9c9d0;margin:-10px auto 18px}#photoInfoDialog::backdrop{background:#0002;backdrop-filter:none;-webkit-backdrop-filter:none}

#bottomNav{padding-top:3px;padding-bottom:calc(3px + env(safe-area-inset-bottom))}#bottomNav a{min-height:44px;gap:1px;font-size:9px;border-radius:14px}#bottomNav svg{width:20px;height:20px}#selectionBar{bottom:calc(60px + env(safe-area-inset-bottom))}.photos-page .section-heading .actions{gap:4px}.photos-page .section-heading .upload-direct{font-size:12px;padding:8px 10px;min-width:44px}@media(max-width:600px){main{padding-bottom:calc(66px + env(safe-area-inset-bottom))}.photos-page main{padding-bottom:calc(58px + env(safe-area-inset-bottom))}.photos-page .section-heading h1{font-size:32px}.photos-page .section-heading>div:first-child{min-width:0}.photos-page .section-heading .actions{flex-shrink:0}}
.photos-page .section-heading>div:first-child{flex:1;overflow:hidden}.photos-page .section-heading #photoSummary{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.viewer-top .actions{order:-1}.viewer #closeViewer{flex-shrink:0;min-width:44px;min-height:44px;font-size:28px;background:#ffffff28;border-color:#ffffff45}.viewer.hide-chrome #closeViewer{visibility:visible}

.viewer-top{display:grid;grid-template-columns:44px minmax(0,1fr) 44px}.viewer #closeViewer{font-size:34px}.viewer-top #photoDetailsBtn{width:44px;height:44px;padding:0}.viewer-bottom .actions{gap:6px}

.viewer .image-stage{position:relative}#imageLoadStatus{position:absolute;left:50%;bottom:16px;transform:translateX(-50%);padding:6px 12px;border-radius:18px;background:#0009;color:#fff;font-size:12px;white-space:nowrap;pointer-events:none;backdrop-filter:blur(12px)}

#aiPanel{padding-bottom:8px}#aiChatForm{display:flex;gap:8px;position:sticky;bottom:calc(58px + env(safe-area-inset-bottom));background:#ffffffed;backdrop-filter:blur(16px);padding:10px 0}#aiQuestion{flex:1;min-width:0}#aiSend{flex-shrink:0}.ai-message{font-size:14px;color:var(--ink);padding:12px 14px;border-radius:18px;white-space:pre-wrap}.ai-message.user{background:#eaf3ff;margin-left:30px}.ai-message.assistant{background:var(--surface);margin-right:20px}.ai-results{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:20px}.ai-photo{display:block;text-align:left;border-radius:12px;padding:0;overflow:hidden;background:var(--surface);color:var(--ink)}.ai-photo img{width:100%;aspect-ratio:1;object-fit:cover;display:block}.ai-photo span{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;font-size:11px;padding:6px 8px}.ai-photo small{display:block;font-size:10px;color:var(--muted);padding:0 8px 8px}.ai-limit{display:flex;align-items:center;gap:8px;padding:12px 0}.ai-limit input{width:90px}.system-list #aiSystemError{color:#b34a32}

#search{max-width:820px;margin:auto}#search>.page-heading{margin-bottom:12px}#search>.page-heading h1{font-size:26px;margin:0}#search>.page-heading small{font-size:12px;color:var(--muted)}.chat-page #search>.page-heading{height:52px}.chat-page #search .segments{margin:0;height:36px}.chat-page #search .segments button{min-height:34px;padding:6px 14px;font-size:12px}.chat-page #aiPanel{position:fixed;top:calc(130px + env(safe-area-inset-top));bottom:max(calc(51px + env(safe-area-inset-bottom)),var(--chat-keyboard,0px));left:50%;transform:translateX(-50%);width:calc(100% - 32px);max-width:820px;display:flex;flex-direction:column;padding:0;background:white}.chat-page #aiProgress{font-size:10px;margin:0;padding:0 0 8px;text-align:center;flex-shrink:0}#aiChatScroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:10px 0 12px}#aiWelcome{text-align:center;padding:clamp(12px,7vh,70px) 8px 20px}#aiWelcome h2{font-size:25px;margin:12px 0 10px}#aiWelcome p{font-size:13px;line-height:1.7}.ai-welcome-icon{font-size:46px;color:var(--accent)}#aiSuggestions{display:flex;flex-direction:column;gap:8px;max-width:290px;margin:24px auto 0}#aiSuggestions button{background:#f6f6f9;color:var(--ink);border:1px solid #ebebf0;justify-content:start;padding:10px 14px;font-size:12px}.chat-page #aiChatForm{position:static;flex-shrink:0;padding:7px 7px 7px 14px;border:1px solid #e7e7ed;border-radius:24px;background:#f6f6f8;align-items:flex-end;margin:4px 0 0}.chat-page #aiQuestion{border:0;background:transparent;resize:none;font:16px/1.45 -apple-system,BlinkMacSystemFont,'PingFang SC',sans-serif;padding:7px 0;min-height:38px;max-height:112px;outline:none}.chat-page #aiSend{width:38px;min-width:38px;height:38px;min-height:38px;border-radius:50%;padding:0;font-size:25px}.ai-disclaimer{font-size:9px;text-align:center;margin:5px 0 7px;color:var(--muted);flex-shrink:0}.ai-message.user{max-width:85%;width:fit-content;margin:6px 0 18px auto;background:#eaf3ff;border-radius:20px 20px 5px 20px;padding:10px 14px;font-size:14px}.ai-reply{margin-bottom:24px}.ai-speaker{display:block;font-size:11px;color:var(--muted);margin:0 0 6px 2px}.ai-reply .assistant{background:transparent;padding:0 2px;margin:0 0 12px;font-size:14px;line-height:1.7}.ai-reply .pending{color:var(--muted);animation:ai-pulse 1.4s ease-in-out infinite}.ai-result-count{display:block;font-size:11px;color:var(--muted);margin-bottom:8px}.ai-reply .ai-results{margin-bottom:10px;gap:5px}.ai-reply .ai-photo span{display:none}.ai-reply .ai-photo small{padding:5px;text-align:center}.ai-followups{display:flex;gap:5px;flex-wrap:wrap}.ai-followups button{min-height:34px;font-size:11px;padding:5px 10px;border:1px solid var(--line);background:white}.chat-page main{padding-top:14px}.chat-page #searchPhotos,.chat-page #searchFiles,.chat-page #moreSearch{display:none}@keyframes ai-pulse{50%{opacity:.45}}@media(prefers-reduced-motion:reduce){.ai-reply .pending{animation:none}}@media(min-width:601px){.chat-page #aiPanel{top:136px}}

.chat-page #aiStop{width:38px;min-width:38px;height:38px;min-height:38px;border-radius:50%;padding:0;font-size:15px;background:#242429}.ai-progress{color:var(--muted);font-size:11px;margin:4px 0 12px}.ai-progress summary{cursor:pointer;padding:5px 0;min-height:30px}.ai-progress ul{list-style:none;border-left:1px solid var(--line);padding:2px 0 2px 14px;margin:0 0 0 5px}.ai-progress li{padding:5px 0}.ai-progress li:before{content:'○';margin-right:8px}.ai-progress li.active:before{content:'◌';display:inline-block;animation:ai-spin 1.2s linear infinite}.ai-progress li.complete:before{content:'✓';color:#39a273}.assistant.streaming:after{content:'';display:inline-block;width:6px;height:14px;background:var(--ink);margin-left:3px;vertical-align:middle;animation:ai-pulse 1s infinite}@keyframes ai-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.ai-progress li.active:before,.assistant.streaming:after{animation:none}}

.chat-page #aiInputToggle{background:transparent;width:38px;min-width:38px;padding:0;min-height:38px;font-size:24px;color:#686872;flex-shrink:0}.chat-page #aiVoiceBtn{flex:1;border:0;border-radius:18px;min-height:38px;padding:6px 12px;background:transparent;color:var(--ink);font-size:14px}.chat-page #aiVoiceBtn svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}.chat-page #aiVoiceBtn.listening{color:#d93b43;background:#ffe8e9}.ai-voice-status{font-size:11px;color:var(--muted);text-align:center;margin:4px 0;flex-shrink:0}.chat-page #aiQuestion[readonly]{color:var(--ink)}

.chat-page #aiInputToggle{order:10;width:46px;min-width:46px;height:38px;border-left:1px solid #ddddE5;border-radius:0;padding:6px 0 6px 8px;margin-left:3px}.chat-page #aiInputToggle svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}

#aiVoiceBtn{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}#aiVoiceBtn.listening{box-shadow:inset 0 0 0 1px #e8545b33}

.chat-heading-actions{display:flex;gap:4px;align-items:center}.chat-heading-actions button{padding:8px 10px}#aiHistoryDialog{width:min(440px,calc(100vw - 24px));max-height:75dvh}#aiHistoryList{display:grid;gap:4px}.chat-history-item{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:6px;background:transparent;color:inherit;padding:14px;border:0;border-bottom:1px solid var(--line,#ddd);width:100%}.chat-history-item strong{font-size:15px;font-weight:500;overflow-wrap:anywhere}.chat-history-item small{opacity:.6}.chat-history-item.current{background:rgba(0,122,255,.08);border-radius:12px}

#photoInfoDialog .dialog-heading{position:sticky;top:-26px;z-index:2;background:#fff;padding:12px 0;margin-top:-12px}#closePhotoInfo{flex-shrink:0;min-width:84px;color:#007aff;background:#eaf3ff;font-weight:600}

.location-actions{display:flex;gap:8px;margin:-4px 0 14px;flex-wrap:wrap}.location-actions button{font-size:13px;min-height:40px}

/* Grouped settings keep values readable on narrow phone screens. */
#system{max-width:680px;margin:0 auto}#system>.page-subtitle{margin-bottom:26px}.settings-group{margin:0 0 24px}.settings-group>h2{font-size:13px;letter-spacing:0;font-weight:500;color:var(--muted);margin:0 16px 8px}.settings-group .system-list{border-radius:16px}.settings-group .system-list>div,.settings-group .system-list>button{padding:14px 16px;min-height:52px;gap:18px}.settings-group .system-list>div:last-child,.settings-group .system-list>button:last-child{border-bottom:0}.settings-group .system-list strong{max-width:62%;text-align:right;overflow-wrap:anywhere;font-size:13px;line-height:1.55}.settings-group .system-list>div>span{flex-shrink:0}.settings-group .ai-limit{padding:14px 16px;justify-content:space-between;font-size:14px;border-bottom:1px solid #e4e4eb}.limit-input{display:flex;align-items:center;gap:8px;color:var(--muted)}.settings-group .ai-limit input{width:90px;text-align:right;background:white;border:1px solid var(--line);padding:8px 10px;border-radius:10px}.settings-group .system-list>.settings-buttons{justify-content:stretch;gap:10px;border-bottom:0}.settings-buttons button{flex:1;min-height:44px;font-size:13px;border-radius:12px;background:white}.settings-buttons button.primary{background:var(--accent);color:white}.settings-note{margin:8px 16px 0;font-size:12px;line-height:1.65;color:var(--muted)}.settings-note:empty{display:none}.settings-logout{border-radius:16px;margin:4px 0 24px}.settings-logout>button{padding:14px 16px;border:0;min-height:52px}#system .page-heading{margin-bottom:8px}

/* Modal stays in the viewport even when the library is scrolled to its end. */
html.viewer-open{overflow:hidden}html.viewer-open body{position:fixed;top:var(--viewer-scroll);left:0;right:0;width:100%;overflow:hidden}dialog.viewer{position:fixed;inset:0;margin:0;width:100vw;height:100vh;height:100dvh;max-width:none;max-height:none;border-radius:0;overflow:hidden}dialog.viewer .viewer-top,dialog.viewer .viewer-strip,dialog.viewer .viewer-bottom{flex-shrink:0}

/* Continuous photo gestures; transforms never change the page scroll position. */
.viewer .image-stage,.viewer .image-stage.zoomed{display:block;overflow:hidden;touch-action:none;overscroll-behavior:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.viewer .image-stage img,.viewer .image-stage.zoomed img{position:absolute;inset:0;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;transform-origin:center;will-change:transform;pointer-events:none}
.viewer .image-stage .neighbor-image{z-index:0}.viewer #largeImage{z-index:1}.viewer #imageLoadStatus{z-index:2}
dialog.viewer{background:rgba(8,8,9,var(--dismiss-alpha,1))}.viewer::backdrop{background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none}
.viewer.dragging-dismiss .viewer-top,.viewer.dragging-dismiss .viewer-strip,.viewer.dragging-dismiss .viewer-bottom{opacity:var(--dismiss-alpha,1)}
.viewer-strip{touch-action:pan-y}.viewer.hide-chrome .viewer-top,.viewer.hide-chrome .viewer-bottom,.viewer.hide-chrome .viewer-strip{opacity:0;pointer-events:none}.viewer.hide-chrome #closeViewer{opacity:1;pointer-events:auto}
#photoGrid{touch-action:pan-y}.photo-card{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
#uploadDialog{width:min(520px,calc(100vw - 20px));max-height:85dvh;border-radius:24px;padding:20px;overflow:auto}
#uploadDialog .dialog-heading{position:sticky;top:-20px;background:white;z-index:3;margin-top:-20px;padding:18px 0 12px}
.upload-overall{position:sticky;top:45px;background:#f5f7fb;border-radius:16px;padding:14px;z-index:2;margin:12px 0}.upload-total-line{display:flex;justify-content:space-between;gap:12px;font-size:15px}.upload-total-line #uploadPercent{font-size:22px;color:var(--accent);font-variant-numeric:tabular-nums}.upload-overall progress{height:10px;margin:12px 0 6px}.upload-overall p{font-size:12px;margin:0 0 5px}.upload-overall small{font-size:11px;color:var(--muted)}
.upload-job{display:flex;align-items:center;gap:12px;padding:12px 0}.upload-job>img{width:48px;height:48px;object-fit:cover;border-radius:8px;flex-shrink:0}.upload-job-body{flex:1;min-width:0}.upload-job strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.upload-job progress{height:5px}.upload-job p{font-size:11px}#retryUploads{width:100%;margin-top:14px}.upload-bubble{position:fixed;z-index:15;bottom:calc(64px + env(safe-area-inset-bottom));right:12px;border-radius:22px;min-height:40px;padding:8px 14px;background:#007aff;color:white;box-shadow:0 3px 18px #0002;font-size:12px}html.viewer-open .upload-bubble{display:none}
@media(prefers-reduced-motion:reduce){.viewer *{scroll-behavior:auto}}
/* Earliest photos remain tappable; scrolling still carries photos behind the glass header. */
.photos-page #photoGrid{padding-top:calc(140px + env(safe-area-inset-top));scroll-padding-top:140px}

/* Native video controls remain usable on iPhone; poster occupies the photo stage. */
#videoPlayer{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;touch-action:auto;background:#000;z-index:3}#videoPlayer[hidden]{display:none}.video-options{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:5px 14px;font-size:11px;background:#111;color:#ddd}.video-options[hidden]{display:none}.video-options span{flex:1}.video-options button{font-size:11px;padding:7px}.viewer:has(#videoControls:not([hidden])){grid-template-rows:auto minmax(0,1fr) auto auto auto}.video-badge{position:absolute;right:3px;bottom:3px;padding:1px 3px;border-radius:3px;background:#0008;color:white;font-size:10px;line-height:1.3;z-index:1}.timeline-nav{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(65px + env(safe-area-inset-bottom));z-index:12;display:flex;gap:2px;padding:3px;border:1px solid #ffffff38;border-radius:24px;background:#f4f4f4c9;backdrop-filter:blur(24px);box-shadow:0 3px 16px #0002;white-space:nowrap}.timeline-nav button{border:0;background:transparent;font-size:12px;padding:7px 14px;border-radius:20px}.timeline-nav button.active{background:#fff;box-shadow:0 1px 6px #0002}.timeline-overview{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;padding:150px 8px 100px}.time-cover{position:relative;aspect-ratio:1.3;border:0;overflow:hidden;border-radius:14px;background:#ddd;padding:0;text-align:left}.time-cover img{width:100%;height:100%;object-fit:cover}.time-cover strong,.time-cover small{position:absolute;left:12px;color:white;text-shadow:0 1px 5px #000}.time-cover strong{bottom:28px;font-size:24px}.time-cover small{bottom:10px;font-size:12px}#photoGrid[hidden],.timeline-overview[hidden]{display:none}.photos-page .footnote{padding-bottom:65px}

.upload-video-icon{display:grid;place-items:center;width:44px;min-width:44px;height:44px;border-radius:8px;background:#eaf3ff;color:#007aff}

/* Glass time selector floats lower when the main menu slides off screen. */
.photos-page .timeline-nav{bottom:calc(var(--gallery-menu-height,65px) + 10px);background:rgba(245,247,250,.17);border:1px solid rgba(255,255,255,.48);backdrop-filter:blur(24px) saturate(160%);-webkit-backdrop-filter:blur(24px) saturate(160%);box-shadow:0 3px 18px #0002,inset 0 1px 0 #ffffff50;transition:bottom .24s ease,background .24s ease}
.photos-page .timeline-nav button{color:#07529e;text-shadow:0 1px 4px #ffffffc0;background:transparent}
.photos-page .timeline-nav button.active{background:#ffffff40;box-shadow:inset 0 0 0 1px #ffffff60,0 1px 5px #0001;color:#004ea0}
#bottomNav{transition:transform .24s ease,opacity .24s ease,visibility .24s}
.photos-page.gallery-nav-hidden #bottomNav{transform:translate(-50%,100%);opacity:0;visibility:hidden;pointer-events:none}
.photos-page.gallery-nav-hidden .timeline-nav{bottom:calc(12px + env(safe-area-inset-bottom))}
.photos-page.gallery-selecting .timeline-nav{visibility:hidden;pointer-events:none}
@media(prefers-reduced-motion:reduce){#bottomNav,.photos-page .timeline-nav{transition:none}}

/* Compact single-row glass header, including the collection back control. */
.photos-page #photos>.section-heading,.collections-page #collections>.page-heading{position:fixed;top:0;left:50%;transform:translateX(-50%);width:100%;max-width:1320px;z-index:3;display:flex;align-items:center;gap:8px;height:calc(64px + env(safe-area-inset-top));margin:0;padding:calc(8px + env(safe-area-inset-top)) 12px 8px;background:linear-gradient(180deg,#00000060,#00000028);backdrop-filter:blur(16px) saturate(140%);-webkit-backdrop-filter:blur(16px) saturate(140%);border:0;color:#fff;pointer-events:auto;box-shadow:none}
.photos-page #photos>.section-heading .library-identity,.collections-page #collections>.page-heading .library-identity{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}
.library-labels{min-width:0;flex:1}
.photos-page #photos>.section-heading h1,.collections-page #collections>.page-heading h1{font-size:17px;line-height:1.25;font-weight:650;letter-spacing:0;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:0 1px 4px #0007}
.photos-page #photos>.section-heading p,.collections-page #collections>.page-heading p{font-size:11px;line-height:1.35;font-weight:400;color:#ffffffe6;margin:1px 0 0;white-space:nowrap;max-width:none;text-shadow:0 1px 4px #0008}
.photos-page #photos>.section-heading .actions,.collections-page #collections>.page-heading .actions{flex-shrink:0;gap:5px}
.photos-page #photos>.section-heading .quiet,.collections-page #collections>.page-heading .quiet{height:40px;min-height:40px;padding:8px 12px;font-size:13px;border-radius:22px;color:#fff;background:#ffffff20;border:1px solid #ffffff40;box-shadow:inset 0 1px 0 #ffffff38,0 2px 8px #0001;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
.photos-page #photos>.section-heading .library-back,.collections-page #collections>.page-heading .library-back{flex-shrink:0;width:40px;min-width:40px;padding:0;font-size:32px;line-height:1}
.photos-page #photos>.section-heading .upload-direct,.photos-page #photos>.section-heading .icon-button,.collections-page #collections>.page-heading .icon-upload,.collections-page #collections>.page-heading .icon-button{width:40px;min-width:40px;padding:8px}
.photos-page #photos>.section-heading .icon-button{font-size:20px;letter-spacing:1px}
.photos-page #photos>.section-heading .icon-button:before{content:none}
.upload-direct svg,.icon-upload svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.photos-page #photoGrid{padding-top:calc(72px + env(safe-area-inset-top));scroll-padding-top:72px}
.photos-page #albumBar,.photos-page #geoFilters{padding-top:calc(72px + env(safe-area-inset-top))}
.photos-page #albumBar[hidden]~#geoFilters[hidden]+#groups:not([hidden]){padding-top:calc(72px + env(safe-area-inset-top));max-height:calc(124px + env(safe-area-inset-top))}
.photos-page .timeline-overview{padding-top:calc(72px + env(safe-area-inset-top))}
.collections-page main{padding-top:calc(78px + env(safe-area-inset-top))}
.collections-page #collections>.page-subtitle{font-size:12px;margin:0 0 12px}

/* Clear glass lets photo detail remain visible through both edges. */
.photos-page #photos>.section-heading,.collections-page #collections>.page-heading{background:linear-gradient(180deg,rgba(0,0,0,.12),rgba(0,0,0,.03));backdrop-filter:blur(4px) saturate(110%);-webkit-backdrop-filter:blur(4px) saturate(110%)}
.photos-page #photos>.section-heading .quiet,.collections-page #collections>.page-heading .quiet{background:rgba(255,255,255,.06);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);text-shadow:0 1px 3px #0009}
.photos-page .timeline-nav{background:rgba(255,255,255,.06);backdrop-filter:blur(4px) saturate(110%);-webkit-backdrop-filter:blur(4px) saturate(110%);border-color:#ffffff55}
.photos-page #bottomNav,.collections-page #bottomNav{background:rgba(255,255,255,.09);backdrop-filter:blur(4px) saturate(110%);-webkit-backdrop-filter:blur(4px) saturate(110%);border-top:1px solid #ffffff40}
.photos-page #bottomNav a,.collections-page #bottomNav a{color:#fff;text-shadow:0 1px 3px #0009,0 0 5px #0005}
.photos-page #bottomNav a.active,.collections-page #bottomNav a.active{background:#ffffff30;color:#fff;box-shadow:inset 0 0 0 1px #ffffff38}
.upload-type-icon{display:grid;place-items:center;flex-shrink:0;width:40px;height:40px;border-radius:10px;background:#eaf3ff;color:#007aff;font-size:22px}.upload-job-body>small{font-size:10px;color:var(--muted)}

.upload-source-actions{display:grid;gap:10px}.upload-source-actions button{min-height:48px;text-align:center}.upload-source-actions+.footnote{line-height:1.65}

.upload-menu-label{display:flex;flex-direction:column;gap:4px}.upload-menu-label small{font-size:11px;color:var(--muted)}#myUploadsBtn>.upload-menu-label{font-size:14px;color:var(--ink)}#myUploadsDialog{width:min(520px,calc(100vw - 20px))}.upload-record{padding:14px 0;border-bottom:1px solid var(--line)}.upload-record strong{display:block;font-size:13px;overflow-wrap:anywhere}.upload-record small{display:block;font-size:11px;color:var(--muted);margin:5px 0}.upload-record p{margin:5px 0;font-size:12px}

/* Match the white foreground of the upper glass controls. */
.photos-page .timeline-nav button,.photos-page .timeline-nav button.active{color:#fff;text-shadow:0 1px 3px #0009,0 0 5px #0005}

/* The main navigation is a solid bar; only the floating time control uses glass while scrolling. */
#bottomNav,.photos-page #bottomNav,.collections-page #bottomNav{background:#fff;backdrop-filter:none;-webkit-backdrop-filter:none;border-top:1px solid #e4e4e8}
#bottomNav a,.photos-page #bottomNav a,.collections-page #bottomNav a{color:#55555d;text-shadow:none}
#bottomNav a.active,.photos-page #bottomNav a.active,.collections-page #bottomNav a.active{color:#17171b;background:#f0f0f3;box-shadow:none}
.photos-page.gallery-at-bottom .timeline-nav{visibility:hidden;opacity:0;pointer-events:none}

/* Only the time-control foreground follows the system appearance. */
.photos-page .timeline-nav button,.photos-page .timeline-nav button.active{color:#000;text-shadow:0 1px 2px #ffffffcc,0 0 4px #ffffff80}
@media(prefers-color-scheme:dark){.photos-page .timeline-nav button,.photos-page .timeline-nav button.active{color:#fff;text-shadow:0 1px 2px #0009,0 0 4px #0005}}

.upload-behavior-note{font-size:12px;color:var(--muted);line-height:1.6}#cancelUpload{margin-top:12px;color:#b42328;background:#fff2f2}


/* A custom visual bar avoids Safari's native blue progress fill. */
:where(.upload-job,#uploadDialog){--upload-color:#8e8e93;--upload-tint:#f0f0f3}
[data-state="sending"]{--upload-color:#007aff;--upload-tint:#eaf3ff}
[data-state="saving"]{--upload-color:#b86a00;--upload-tint:#fff3dc}
[data-state="done"]{--upload-color:#168344;--upload-tint:#e5f6eb}
[data-state="paused"]{--upload-color:#6c6c74;--upload-tint:#eeeef2}
[data-state="failed"]{--upload-color:#c62828;--upload-tint:#ffeded}
.upload-job .upload-state-badge{display:inline-block;margin-top:6px;padding:3px 7px;border-radius:6px;font-size:10px;font-weight:600;color:var(--upload-color);background:var(--upload-tint)}
.upload-job progress,#uploadOverall{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}
.upload-progress-track{height:6px;overflow:hidden;border-radius:6px;background:#e9e9ee}
.upload-progress-track>span{display:block;height:100%;width:0;border-radius:inherit;background:var(--upload-color)}
.upload-overall .overall-track{height:10px;margin:12px 0 6px}
.upload-overall .upload-total-line #uploadPercent{color:var(--upload-color)}

.upload-top-actions{display:flex;gap:8px;flex-wrap:wrap}.upload-top-actions:has(button:not([hidden])){margin-top:12px}.upload-top-actions #cancelUpload,.upload-top-actions #retryUploads{flex:1;width:auto;margin:0;min-height:40px;font-size:13px}

#systemTasksDialog{width:min(520px,calc(100vw - 20px))}#systemTaskSummary{font-size:12px;color:var(--muted)}

.ai-collection-group{font-size:14px;font-weight:600;margin:16px 0 10px}

/* No empty pagination or reserved time-bar gap below the latest photo row. */
.photos-page #photos>.pagination:has(#morePhotos[hidden]){display:none}
.photos-page main{padding-bottom:var(--gallery-menu-height,58px)}

.event-collection-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 10px;margin:16px 0}.event-collection-grid .collection-card,.event-collection-grid .collection-card img{width:100%}.event-collection-grid .collection-card img{height:auto;aspect-ratio:1}.event-collection-grid .collection-card strong{white-space:normal;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;line-height:1.4}

/* Shared task controls use readable status badges and direct actions on phones. */
.task-entry-right{display:flex;align-items:center;gap:10px}.task-entry-right b{font-size:11px;font-weight:600;padding:4px 8px;background:#ffebe8;color:#a62b1c;border-radius:20px;white-space:nowrap}
#systemTasksDialog{padding:20px;max-height:calc(100dvh - 32px);width:min(620px,calc(100vw - 20px))}.task-dialog-heading{margin-bottom:12px}
.task-views{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;background:var(--surface,#f2f2f7);border-radius:12px;padding:4px;margin:16px 0 12px}.task-views button{min-height:42px;padding:6px 2px;border:0;border-radius:9px;background:transparent;color:var(--muted);font-size:12px}.task-views button.active{background:var(--bg,#fff);color:var(--text);box-shadow:0 1px 5px #00000012}.task-views b{font-size:10px;display:block;font-weight:500;margin-top:3px}
.task-filters{display:grid;grid-template-columns:1fr 1.15fr;gap:8px}.task-filters input,.task-filters select{min-width:0;width:100%;margin:0;font-size:14px;min-height:42px;padding:9px 10px}.task-summary-line{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:12px 0}.task-summary-line p{margin:0}.task-summary-line button{min-height:36px;white-space:nowrap;padding:6px 12px}
.system-task{border-top:1px solid var(--line,#e5e5ea);padding:16px 0}.task-row-heading{display:flex;gap:12px;justify-content:space-between;align-items:start}.task-row-heading strong{font-size:14px;overflow-wrap:anywhere;min-width:0;line-height:1.5}.task-status-badge{flex:none;font-size:10px;line-height:1.5;padding:4px 7px;border-radius:7px;background:#e9eef7;color:#315b99;max-width:120px}.system-task>small{display:block;font-size:11px;color:var(--muted);margin-top:5px}.system-task p{font-size:12px;line-height:1.6;margin:7px 0}.task-attempts,.task-guidance{color:var(--muted)}.task-error{color:#b32c21}.task-row-actions{display:flex;gap:10px;margin-top:12px}.task-row-actions button{min-height:42px;padding:9px 16px;font-size:13px}.system-task[data-state=stopped] .task-status-badge{background:#ffe7e4;color:#a32a21}.system-task[data-state=retrying] .task-status-badge{background:#fff0d6;color:#8a570b}.system-task[data-state=ignored] .task-status-badge{background:#ececf1;color:#61616b}.system-task[data-state=complete] .task-status-badge{background:#e3f4e9;color:#276840}
#taskConfirmName{overflow-wrap:anywhere;font-weight:600}#taskConfirmDialog{width:min(440px,calc(100vw - 24px))}
@media(prefers-color-scheme:dark){.task-views{background:#26262c}.task-views button.active{background:#42424a}.task-entry-right b,.system-task[data-state=stopped] .task-status-badge{background:#482526;color:#ffaba4}.system-task[data-state=retrying] .task-status-badge{background:#483821;color:#f7cb89}.system-task[data-state=ignored] .task-status-badge{background:#35353e;color:#c4c4cd}.task-status-badge{background:#253649;color:#bbd3f5}.system-task[data-state=complete] .task-status-badge{background:#223b2d;color:#a5ddbd}.task-error{color:#ffaba4}}
