/* Keep long licence text inside its own card on narrow screens. */
@media(max-width:800px),(pointer:coarse){
 .license-name .license-info{display:contents}
 .license-choice .license-name .info-content{position:static;flex:1 0 100%;box-sizing:border-box;width:100%;max-width:100%;min-width:0;overflow-wrap:anywhere;padding:12px}
 .license-name .info-trigger{min-height:30px;min-width:30px}
}
.cms-photo-thumb{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;padding:0;border:0;border-radius:6px;background:transparent;box-shadow:none;cursor:zoom-in;min-height:44px;min-width:44px;line-height:1}
.cms-photo-thumb img{display:block;width:54px;height:44px;border-radius:6px;object-fit:cover}
.cms-photo-thumb:focus-visible{outline:3px solid var(--blue);outline-offset:2px}
.cms-ranked{display:flex;align-items:center;gap:10px}
.cms-ranked>a{flex:1;min-width:0}
.cms-popular{border-bottom:1px solid var(--line);padding:8px 0}
.cms-popular .list-row{border:0;padding:4px 0;overflow-wrap:anywhere}
.cms-preview-dialog{box-sizing:border-box;max-width:96vw;width:max-content;max-height:94vh;max-height:94dvh;overflow:auto;padding:12px;border:0;border-radius:12px;background:#10243c;color:#fff}
.cms-preview-dialog::backdrop{background:rgba(9,19,34,.82)}
.cms-preview-dialog header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:8px}
.cms-preview-dialog header strong{min-width:0;overflow-wrap:anywhere}
.cms-preview-dialog button{min-height:44px;flex:none}
.cms-preview-dialog img{display:block;width:auto;height:auto;max-width:100%;max-height:calc(90vh - 90px);max-height:calc(90dvh - 90px);margin:auto;object-fit:contain}
.cms-preview-dialog p:empty,.cms-preview-dialog img[hidden]{display:none}
html:has(.cms-preview-dialog[open]){overflow:hidden}
.stats-bar{display:block;width:100%;height:9px;background:#e5ebf0;border-radius:5px;overflow:hidden}
.stats-bar+.stats-bar{margin-top:4px}
.stats-bar rect{fill:#33679e}
.stats-bar.downloads rect{fill:#dfaf24}
#all-photos{scroll-margin-top:6rem}
