.photo-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.photo-heading h2{font-size:20px;margin:0}.photo-heading p{font-size:12px;color:var(--muted);margin:5px 0 0;word-break:break-word}.photo-heading button{font-size:13px;white-space:nowrap}.photo-summary{display:flex;gap:28px;padding:18px 0;border-bottom:1px solid var(--line)}.photo-stat{display:flex;gap:7px;align-items:baseline;flex-wrap:wrap}.photo-stat strong{font-size:24px;color:var(--ink);font-variant-numeric:tabular-nums}.photo-stat span{font-size:12px;color:var(--muted)}.photo-filters{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin:16px 0 10px}.photo-filters label{font-size:11px;gap:5px}.photo-search{flex:1;min-width:210px}.photo-filters input,.photo-filters select{padding:8px 10px;border-radius:6px;font-size:12px;min-height:36px}.photo-filters>label:not(.photo-search){max-width:160px}.photo-filters>button{font-size:12px;min-height:36px}.photo-result-line{display:flex;justify-content:space-between;gap:10px;color:var(--muted);font-size:11px;margin:12px 0}.photo-result-line #photoResult{color:#40526a}.photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:14px;align-content:start;min-height:220px}.photo-card{border:1px solid var(--line);border-radius:9px;overflow:hidden;background:#fff;min-width:0;box-shadow:0 1px 3px #1232;transition:box-shadow .15s}.photo-card:hover{box-shadow:0 4px 16px #1232}.photo-preview{width:100%;aspect-ratio:4/3;display:block;position:relative;padding:0;border-radius:0;background:repeating-linear-gradient(135deg,#f2f5f9,#f2f5f9 12px,#eef2f7 12px,#eef2f7 24px);overflow:hidden;min-height:0;transform:none!important}.photo-preview img{width:100%;height:100%;object-fit:cover;display:block;opacity:0;transition:opacity .18s}.photo-preview.image-loaded img{opacity:1}.photo-image-hint{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:18px;color:#60738a;font-size:12px;font-weight:500}.image-loaded .photo-image-hint{inset:auto 0 0;background:linear-gradient(transparent,#07172ba6);color:#fff;padding:22px 10px 10px;opacity:0}.image-loaded:hover .photo-image-hint,.image-loaded:focus-visible .photo-image-hint{opacity:1}.photo-preview.image-failed .photo-image-hint{color:#b65630}.photo-card-details{padding:12px;display:grid;gap:5px}.photo-asset-name{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.photo-code{font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.photo-card-meta{display:flex;align-items:center;gap:8px;justify-content:space-between;margin:5px 0}.photo-badge{font-size:10px;border-radius:4px;padding:3px 6px;color:#17644e;background:#eaf7f1;white-space:nowrap}.photo-badge.expired{color:#a85f20;background:#fff2e5}.photo-badge.pending{color:#66758a;background:#f0f3f7}.photo-uploader{font-size:11px;color:#596d85;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.photo-time{font-size:10px;color:#8a98aa}.photo-retry{font-size:12px;justify-self:start}.photo-empty{grid-column:1/-1;min-height:220px;display:grid;align-content:center;justify-items:center;padding:30px;text-align:center;line-height:1.8;color:#8491a3;font-size:14px;border:1px dashed var(--line);border-radius:8px;background:#fbfcfe}.photo-error{color:#ab542c}.photo-pagination{display:flex;align-items:center;justify-content:flex-end;gap:14px;padding-top:20px;font-size:12px;color:var(--muted)}.photo-pagination button{min-height:32px;font-size:12px;padding:7px 12px}
.photo-viewer{padding:0;border:1px solid #d9e2ed;border-radius:14px;width:min(1260px,95vw);max-width:95vw;max-height:94vh;background:#fff;color:var(--ink);box-shadow:0 25px 100px #081b4380}.photo-viewer::backdrop{background:#0c1a30ba;backdrop-filter:blur(3px)}.photo-viewer-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 20px;border-bottom:1px solid var(--line)}.photo-viewer-header h2{font-size:18px;margin:0;max-width:65vw;word-break:break-word}.photo-viewer-header span{font-size:12px;color:var(--muted)}.photo-viewer-body{display:grid;grid-template-columns:minmax(0,1fr) 260px;min-height:460px}.photo-stage{min-width:0;background:#eef2f6}.photo-stage-toolbar{display:flex;gap:4px;align-items:center;flex-wrap:wrap;padding:8px 12px;border-bottom:1px solid #d9e2ed;background:#f9fbfd}.photo-stage-toolbar button{font-size:12px;padding:6px 9px;min-height:32px;border-radius:5px;background:white;color:#40526a;border:1px solid var(--line)}.photo-tool-spacer{flex:1}.photo-image-stage{height:min(68vh,740px);min-height:360px;display:grid;place-items:center;position:relative;overflow:auto;padding:18px}.photo-image-stage>img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;transform-origin:center;transition:transform .15s}.photo-viewer-message{position:absolute;inset:0;display:grid;place-items:center;text-align:center;padding:30px;color:#66758a;font-size:14px}.photo-details{padding:20px;border-left:1px solid var(--line);overflow:auto;max-height:78vh}.photo-variants{display:flex;gap:4px;background:#eef3f9;border-radius:7px;padding:4px}.photo-variants:empty{display:none}.photo-variants button{flex:1;min-height:34px;padding:7px;background:transparent;color:#66758a;font-size:13px;border-radius:5px}.photo-variants button.active{background:white;color:var(--blue);box-shadow:0 1px 5px #1232}.photo-detail-hint{font-size:11px;line-height:1.7;color:#7b8ba0}.photo-details dl{margin:20px 0;display:grid;gap:6px}.photo-details dt{font-size:11px;color:#8491a3}.photo-details dd{font-size:13px;margin:0 0 10px;word-break:break-word}.photo-details>button,.photo-details>a{width:100%;margin:4px 0;font-size:12px;min-height:36px;border-radius:6px}button:focus-visible,a:focus-visible{outline:3px solid #7fb2ff;outline-offset:2px}
@media(min-width:1600px){.photo-grid{grid-template-columns:repeat(auto-fill,minmax(215px,1fr))}}@media(max-width:1000px){.photo-grid{grid-template-columns:repeat(auto-fill,minmax(170px,1fr))}.photo-summary{gap:16px}.photo-stat strong{font-size:21px}.photo-viewer-body{grid-template-columns:minmax(0,1fr) 220px}.photo-details{padding:14px}}
@media(max-width:600px){.photo-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.photo-card-details{padding:9px}.photo-heading h2{font-size:18px}.photo-summary{gap:12px}.photo-stat{display:grid;gap:2px}.photo-stat strong{font-size:20px}.photo-stat span{font-size:10px}.photo-result-line{font-size:10px}.photo-filters{gap:7px}.photo-search{min-width:100%;}.photo-filters>label:not(.photo-search){flex:1;max-width:none;min-width:90px}.photo-filters input,.photo-filters select{min-width:0}.photo-viewer-body{grid-template-columns:1fr}.photo-image-stage{height:45vh;min-height:230px}.photo-details{max-height:none;border-left:0;border-top:1px solid var(--line)}.photo-details dl{grid-template-columns:85px 1fr;gap:8px;margin:16px 0}.photo-details dd{margin:0}.photo-viewer-header{padding:12px}.photo-asset-name{font-size:13px}.photo-preview{aspect-ratio:1/1}.photo-stage-toolbar{padding:7px}.photo-pagination{justify-content:center}}
/* Explicit grid-item dimensions keep tall originals inside the fit-to-window box. */
.photo-image-stage>img{width:100%;height:100%;min-width:0;min-height:0}
