/* Album zdjęć, pełnoekranowy podgląd i foldery plików. */
.album{min-height:200px}
.album-day{margin-bottom:26px}
.album-day h2{display:flex;align-items:baseline;gap:9px;font-size:15px;font-weight:650;color:#2a4231;margin:0 0 11px;letter-spacing:-.2px}
.album-day h2:first-letter{text-transform:uppercase}
.album-day h2 small{font-size:11px;font-weight:500;color:#8a947f}
.album-row{display:flex;overflow:hidden}
.album-row.full .album-tile{flex-grow:1}
.album-tile{position:relative;flex:0 1 auto;min-width:0;padding:0;border:0;background:#e4e7da;overflow:hidden;cursor:zoom-in;border-radius:3px;display:grid;place-items:center}
.album-tile img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .25s ease,filter .2s;user-select:none;-webkit-user-drag:none}
.album-tile:hover img{transform:scale(1.025);filter:brightness(.93)}
.album-tile:focus-visible{outline:3px solid #c54b34;outline-offset:2px}
.album-video{position:absolute;top:7px;right:8px;display:flex;align-items:center;gap:5px;font-size:11px;font-weight:650;color:#fff;text-shadow:0 1px 3px #0009}
.album-video svg{width:15px;height:15px;filter:drop-shadow(0 1px 2px #0008)}
.album-missing{color:#89957d}.album-missing .icon{width:30px;height:30px}
main.drag{outline:2px dashed #6e9460;outline-offset:-10px;background:#eef3e5}

html.lb-open,html.lb-open body{overflow:hidden}
.lightbox{position:fixed;inset:0;z-index:200;background:#0c0e0d;color:#f3f1ea;display:flex;flex-direction:column;animation:lbIn .16s ease-out}
@keyframes lbIn{from{opacity:0}to{opacity:1}}
.lb-top{position:absolute;inset:0 0 auto 0;z-index:2;display:flex;align-items:center;gap:10px;padding:10px 14px;background:linear-gradient(#000a,#0000);min-height:64px}
.lb-title{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.lb-title strong{font-size:14px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lb-title small{font-size:11px;color:#c9cdc2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lb-count{font-size:12px;color:#c9cdc2;margin-right:6px;white-space:nowrap}
.lb-button{display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:transparent;color:#f3f1ea;flex:none}
.lb-button:hover{background:#ffffff1c}
.lb-button svg,.lb-button .icon{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.lb-stage{flex:1;display:flex;align-items:center;justify-content:center;overflow:hidden;touch-action:none;user-select:none}
.lb-stage img,.lb-stage video{max-width:100vw;max-height:100vh;max-height:100dvh;object-fit:contain;display:block;transition:transform .2s ease}
.lb-stage img{cursor:zoom-in}
.lb-stage img.zoomed{transform:scale(2.2);cursor:zoom-out}
.lb-stage video{width:auto;background:#000;outline:none}
.lb-nav{position:absolute;top:50%;z-index:2;transform:translateY(-50%);width:52px;height:52px;border-radius:50%;background:#1d211fcc;color:#fff;display:grid;place-items:center;opacity:.75;transition:opacity .15s,background .15s}
.lb-nav:hover{opacity:1;background:#2c322f}
.lb-nav.prev{left:16px}.lb-nav.next{right:16px}
.lb-nav svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

.toolbar:has(.folder-crumbs){flex-wrap:wrap}
.folder-crumbs{display:flex;align-items:center;flex-wrap:wrap;gap:4px;min-width:0;flex:1 1 300px;font-size:13px}
.folder-crumbs button{display:inline-flex;align-items:center;gap:7px;background:transparent;color:#355238;font-weight:600;padding:7px 9px;border-radius:8px;max-width:100%;overflow-wrap:anywhere;text-align:left}
.folder-crumbs button:hover{background:#e5eadb}
.folder-crumbs button:last-child{color:#1f3526}
.folder-crumbs .icon{width:16px;height:16px}
.folder-crumbs span{color:#a7af9c}
.folder-heading{font-size:12px;font-weight:700;letter-spacing:.8px;text-transform:uppercase;color:#7a8474;margin:4px 0 12px}
.folder-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px;margin-bottom:26px}
.folder-tile{display:flex;align-items:center;gap:13px;text-align:left;background:#fffefa;border:1px solid #dbe0d0;border-radius:14px;padding:14px 16px;color:#2b3f2e;transition:background .15s,box-shadow .15s;min-width:0}
.folder-tile:hover{background:#f6f8ef;box-shadow:0 4px 14px #2b412d12}
.folder-tile>span:last-child{min-width:0;display:flex;flex-direction:column;gap:4px}
.folder-tile strong{font-size:13px;font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.folder-tile small{font-size:11px;color:#7d8873}
.folder-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:11px;background:#f3e3c8;color:#9a6a2c;flex:none}
.folder-icon .icon{width:21px;height:21px}
.page-heading p a{color:#b64a34;font-weight:600}

@media(max-width:590px){
  .album-day{margin-bottom:18px}.album-day h2{font-size:14px;margin-bottom:8px}.album-tile{border-radius:0}
  .lb-top{padding:6px 6px;min-height:56px}.lb-count{display:none}.lb-nav{display:none}
  .folder-grid{grid-template-columns:1fr 1fr;gap:9px}.folder-tile{padding:12px;gap:10px}.folder-icon{width:34px;height:34px}
}
@media(hover:none){.lb-nav{display:none}}

/* Zaznaczanie wielu plików */
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
html.drag-selecting,html.drag-selecting *{user-select:none!important;-webkit-user-select:none!important}
html.drag-selecting{cursor:crosshair}
#album [data-sel],#fileResults [data-sel]{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
.sel-check{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;border:2px solid #fff;background:#0000002e;color:transparent;box-shadow:0 1px 4px #0004;transition:opacity .15s,background .15s;cursor:pointer}
.sel-check svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.album-tile .sel-check{position:absolute;top:8px;left:8px;z-index:1;opacity:0}
.album-tile:hover .sel-check,.select-mode .album-tile .sel-check,.album-tile:focus-visible .sel-check{opacity:1}
.sel-check:hover{background:#ffffff59}
[data-sel].selected .sel-check{background:#c54b34;border-color:#c54b34;color:#fff;opacity:1}
.album-tile{transition:background .15s}
.album-tile.selected{background:#f3d9cf}
.album-tile.selected img{transform:scale(.86);border-radius:6px;filter:none}
.select-mode .album-tile{cursor:pointer}.select-mode .album-tile:hover img{transform:none}.select-mode .album-tile.selected:hover img{transform:scale(.86)}
.folder-tile{position:relative}
.folder-tile .sel-check{position:absolute;top:-8px;left:-8px;opacity:0;border-color:#fffefa;background:#c9cfbf}
.folder-tile:hover .sel-check,.select-mode .folder-tile .sel-check{opacity:1}
.folder-tile.selected{background:#fbe7df;border-color:#e6a995;box-shadow:0 0 0 2px #e6a99566}
.file-table .sel-cell{width:44px;padding-right:0}
.file-table .sel-check{border-color:#b9c2ad;background:#fff;box-shadow:none}
.file-table .sel-check:hover{border-color:#c54b34;background:#fff}
.file-table tr.selected td{background:#fbeee8}
.file-table tr.selected .sel-check{background:#c54b34;border-color:#c54b34;color:#fff}
.select-mode .file-table tbody tr{cursor:pointer}
.marquee{position:fixed;z-index:180;border:1.5px solid #c54b34;background:#c54b3420;border-radius:4px;pointer-events:none}
.sel-bar{position:fixed;inset:0 0 auto 0;z-index:150;min-height:66px;display:flex;align-items:center;gap:12px;padding:10px 22px 10px 14px;background:#172c29;color:#f5f1e6;box-shadow:0 6px 24px #10221d40;animation:selIn .15s ease-out}
@keyframes selIn{from{transform:translateY(-100%)}to{transform:none}}
.sel-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.sel-text strong{font-size:15px;font-weight:650}.sel-text small{font-size:11px;color:#a8c0b0}
.sel-bar .button.subtle{color:#e5ecdf;border-color:#ffffff30;background:transparent}.sel-bar .button.subtle:hover{background:#ffffff14}
@media(max-width:590px){.sel-bar{padding:8px 10px 8px 6px;gap:6px}.sel-bar [data-selact=all]{display:none}.sel-text strong{font-size:14px}.album-tile .sel-check{top:5px;left:5px;width:21px;height:21px}.album-tile:not(.selected) .sel-check{opacity:0}.select-mode .album-tile .sel-check{opacity:1}}
@media(hover:none){.album-tile:hover .sel-check{opacity:0}.select-mode .album-tile .sel-check,.album-tile.selected .sel-check{opacity:1}}

/* Tryb przejściowy */
.transit-card{border-color:#e3b9a8;background:#fffaf6}
.lb-purged{display:flex;flex-direction:column;align-items:center;gap:14px;max-height:100%}
.lb-purged img{max-height:calc(100vh - 140px)}
.lb-purged p{margin:0;font-size:13px;color:#d6d9cf;text-align:center;padding:0 20px}

/* Foldery prywatne i Rodzinka */
.folder-grid.roots{grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}
.folder-tile.root{padding:22px;gap:16px}.folder-tile.root strong{font-size:16px}
.folder-icon.mine{background:#e2ead8;color:#486b3c}.folder-icon.family{background:#f6dcd2;color:#b04a33}
.folder-tile.root .folder-icon{width:52px;height:52px;border-radius:15px}
.album-link{display:flex;align-items:center;gap:16px;width:100%;text-align:left;background:#fffefa;border:1px solid #dbe0d0;border-radius:14px;padding:12px 16px;margin-bottom:26px;color:#2b3f2e}
.album-link:hover{background:#f6f8ef}
.album-link-thumbs{display:flex;gap:4px;flex:none}.album-link-thumbs img{width:54px;height:54px;object-fit:cover;border-radius:8px;background:#e4e7da}
.album-link strong{display:block;font-size:14px}.album-link small{color:#b04a33;font-weight:600}
.album-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:-8px 0 20px}
.chips{display:flex;gap:8px;flex-wrap:wrap}
.chip{display:inline-flex;align-items:center;gap:6px;border:1px solid #d3d8c9;background:#fffefa;color:#355238;border-radius:20px;padding:7px 14px;font-size:12px;font-weight:600}
.chip:hover{background:#eef2e6}.chip.active{background:#172c29;border-color:#172c29;color:#f5f1e6}.chip .icon{width:14px;height:14px}
.upload-dest{font-size:11px;color:#7d8873}.upload-dest b{color:#355238}
@media(max-width:590px){.sel-bar .sel-write span{display:none}.folder-grid.roots{grid-template-columns:1fr}.album-link-thumbs img:nth-child(n+3){display:none}}

/* Ulubione, wspomnienia, wyszukiwanie, pokaz slajdów */
.album-fav{position:absolute;bottom:6px;left:8px;color:#fff;font-size:16px;text-shadow:0 1px 4px #0009;pointer-events:none}
.lb-button.on{color:#ff8e74}.lb-button.on svg{fill:currentColor}
#lbPlay svg{fill:currentColor;stroke:none}
.memories{margin:-6px 0 22px}.memories h2{font-size:15px;color:#2a4231;margin:0 0 10px}
.memory-row{display:flex;gap:12px;overflow-x:auto;padding-bottom:4px}
.memory{position:relative;flex:none;width:200px;height:132px;border-radius:16px;overflow:hidden;padding:0;background:#e4e7da;text-align:left}
.memory img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .3s}.memory:hover img{transform:scale(1.04)}
.memory span{position:absolute;inset:auto 0 0 0;padding:28px 12px 10px;background:linear-gradient(#0000,#000a);color:#fff;display:flex;flex-direction:column;gap:2px}
.memory strong{font-size:15px}.memory small{color:#eee;font-size:11px}
.album-search{display:flex;gap:10px;align-items:center;margin:-6px 0 18px;flex-wrap:wrap}.album-search .search{flex:1;min-width:220px;max-width:460px}
.album-search select{border:1px solid #d3d8c9;background:#f8f8f1;border-radius:9px;padding:10px 12px;color:#2b3b2b}
.album-day{scroll-margin-top:90px}
@media(max-width:590px){.memory{width:150px;height:104px}.album-search select{width:100%}}

/* Mapa zdjęć i miejsca */
.view-toggle{display:inline-flex;border:1px solid #d3d8c9;border-radius:10px;overflow:hidden;background:#fffefa}
.view-toggle button{display:inline-flex;align-items:center;gap:6px;padding:9px 13px;background:transparent;color:#355238;font-size:12px;font-weight:600}
.view-toggle button.active{background:#172c29;color:#f5f1e6}.view-toggle .icon{width:15px;height:15px}
.place-strip{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:-6px 0 18px}.place-strip>span{font-size:12px;color:#7d8873;font-weight:600}
.place-strip .chip small{color:#8a947f;font-weight:500}
.photo-map{height:calc(100vh - 330px);min-height:380px;border-radius:16px;overflow:hidden;border:1px solid #d9dfcf;background:#e9ece2;z-index:0}
.map-note{font-size:12px;color:#7d8873;margin:10px 0 0}
.map-photo{background:none;border:0}
.map-photo img{width:100%;height:100%;object-fit:cover;border-radius:10px;border:3px solid #fffefa;box-shadow:0 3px 10px #0005;display:block;background:#e4e7da}
.map-photo.cluster b{position:absolute;top:-8px;right:-8px;min-width:24px;height:24px;padding:0 6px;border-radius:12px;background:#c54b34;color:#fff;font-size:12px;display:grid;place-items:center;box-shadow:0 2px 6px #0004}
.leaflet-container{font:inherit}.leaflet-control-attribution{font-size:10px}
@media(max-width:590px){.photo-map{height:60vh;min-height:300px}.view-toggle{width:100%}.view-toggle button{flex:1;justify-content:center}}
