/* Album geometry and overlays adapted from https://rainzt.cn/gallery/. */
@font-face{font-family:GalleryWenKai;src:url('/fonts/LXGWWenKaiScreen.ttf') format('truetype');font-display:swap}
.olx-gallery{--rg-bg:#fff;--rg-ink:#262626;--rg-muted:#737373;--rg-line:#e5e7eb;--rg-soft:#e6f1ff;--rg-accent:#58a6f8;font-family:GalleryWenKai,'Microsoft YaHei',sans-serif;color:var(--rg-ink);width:100%;min-width:0;line-height:1.5}
html.dark .olx-gallery{--rg-bg:#191e26;--rg-ink:#f5f5f5;--rg-muted:#a3a3a3;--rg-line:#343c48;--rg-soft:#27394b}
.olx-gallery *{box-sizing:border-box}
.olx-gallery [hidden]{display:none!important}
.olx-gallery .rg-panel{padding:24px 36px;background:var(--rg-bg);border:1px solid var(--rg-line);border-radius:16px;overflow:hidden}
.olx-gallery .rg-heading{display:flex;align-items:center;gap:12px;margin:0 0 12px}
.olx-gallery .rg-heading h1{font-size:30px;font-weight:700;line-height:1.2;margin:0;color:var(--rg-ink)}
.olx-gallery .rg-icon{display:grid;place-items:center;width:32px;height:32px;border-radius:8px;background:var(--rg-accent);color:white}
.olx-gallery svg{width:1em;height:1em;flex:none;fill:currentColor}
.olx-gallery .rg-icon svg{width:24px;height:24px}
.olx-gallery .rg-intro{margin:0 0 20px;font-size:16px;color:var(--rg-muted)}
.olx-gallery .rg-search{position:relative;display:block;margin:0 0 12px}
.olx-gallery .rg-search svg{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:var(--rg-muted);font-size:18px;pointer-events:none}
.olx-gallery .rg-search input{display:block;width:100%;padding:10px 16px 10px 40px;border:1px solid var(--rg-line);border-radius:12px;background:transparent;color:var(--rg-ink);font:inherit;font-size:14px;outline:none;transition:border-color .2s,box-shadow .2s}
.olx-gallery .rg-search input:focus{border-color:var(--rg-accent);box-shadow:0 0 0 1px var(--rg-accent)}
.olx-gallery .rg-search input::placeholder{color:var(--rg-muted)}
.olx-gallery .rg-filters{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 24px}
.olx-gallery .rg-filters button{padding:6px 12px;border:0;border-radius:8px;color:#4487bd;background:var(--rg-soft);font:inherit;font-size:14px;font-weight:600;cursor:pointer;transition:background .2s,color .2s}
.olx-gallery .rg-filters button[aria-pressed=true]{color:#fff;background:var(--rg-accent)}
.olx-gallery .rg-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:16px 0}
.olx-gallery .rg-album{position:relative;display:block;aspect-ratio:4/3;overflow:hidden;border-radius:12px;text-decoration:none;color:#fff;background:#283241;isolation:isolate;transition:transform .3s,box-shadow .3s}
.olx-gallery .rg-album:hover{transform:scale(1.02);box-shadow:0 10px 22px #0002}
.olx-gallery .rg-album>img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .5s}
.olx-gallery .rg-album:hover>img{transform:scale(1.05)}
.olx-gallery .rg-album:after,.olx-gallery .rg-hero:after{content:'';position:absolute;inset:0;background:linear-gradient(to top,#000b,#0003,transparent);pointer-events:none}
.olx-gallery .rg-count{position:absolute;z-index:2;top:8px;right:8px;padding:4px 8px;border-radius:999px;background:#0008;backdrop-filter:blur(4px);font-size:12px;color:#fff;line-height:1.4}
.olx-gallery .rg-info{position:absolute;z-index:1;bottom:0;left:0;right:0;padding:16px;color:#fff}
.olx-gallery .rg-info h2{margin:0;font-size:16px;font-weight:700;line-height:1.4;color:#fff;text-shadow:0 2px 5px #0004}
.olx-gallery .rg-info p{margin:4px 0 0;font-size:12px;line-height:1.6;color:#ffffffbf;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.olx-gallery .rg-meta{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;margin-top:6px;font-size:12px;color:#ffffffb3}
.olx-gallery .rg-meta span{display:inline-flex;align-items:center;gap:4px}
.olx-gallery .rg-tags{display:flex;flex-wrap:wrap;gap:4px;margin-top:8px}
.olx-gallery .rg-tags span{padding:2px 6px;font-size:10px;line-height:1.5;border-radius:4px;background:#ffffff33;color:#ffffffe6;backdrop-filter:blur(4px)}
.olx-gallery .rg-empty{padding:40px 12px;text-align:center;color:var(--rg-muted)}
.olx-gallery .rg-hero{position:relative;isolation:isolate;width:100%;aspect-ratio:3/1;min-height:250px;max-height:360px;overflow:hidden;border-radius:16px;background:#273448}
.olx-gallery .rg-hero>img{display:block;width:100%;height:100%;object-fit:cover}
.olx-gallery .rg-back{position:absolute;z-index:2;top:16px;left:16px;display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:8px;background:#0005;color:#ffffffe6;text-decoration:none;font-size:14px;backdrop-filter:blur(8px)}
.olx-gallery .rg-back:hover{background:#0008;color:white}
.olx-gallery .rg-hero .rg-info{padding:24px}
.olx-gallery .rg-hero h1{margin:0 0 8px;font-size:30px;line-height:1.2;font-weight:700;color:white;text-shadow:0 2px 5px #0005}
.olx-gallery .rg-hero .rg-info p{font-size:14px;white-space:normal;max-width:42rem;margin-bottom:8px}
.olx-gallery .rg-hero .rg-meta{font-size:14px;color:#fffc;gap:10px 16px}
.olx-gallery .rg-hero .rg-tags span{font-size:12px;padding:2px 8px}
.olx-gallery .rg-photos{margin-top:16px;padding:24px}
.olx-gallery .rg-masonry{columns:2;column-gap:12px}
.olx-gallery .rg-photo{position:relative;display:block;break-inside:avoid;margin:0 0 12px;border-radius:12px;overflow:hidden;background:var(--rg-soft);cursor:zoom-in}
.olx-gallery .rg-photo img{display:block;width:100%;height:auto;transition:transform .5s}
.olx-gallery .rg-photo:hover img{transform:scale(1.05)}
.olx-gallery .rg-photo:after{content:'＋';position:absolute;inset:0;display:grid;place-items:center;font-family:system-ui,sans-serif;font-size:30px;color:white;background:#0003;opacity:0;transition:opacity .2s;pointer-events:none}
.olx-gallery .rg-photo:hover:after{opacity:1}
.olx-gallery :focus-visible{outline:3px solid var(--rg-accent);outline-offset:3px}
.olx-gallery .rg-source{margin:20px 0 0;color:var(--rg-muted);font-size:12px}.olx-gallery .rg-source a{color:var(--rg-accent);text-decoration:none}
@media(min-width:1600px){.olx-gallery .rg-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:640px){.olx-gallery .rg-panel{padding:20px}.olx-gallery .rg-grid{grid-template-columns:1fr}.olx-gallery .rg-hero{min-height:280px}.olx-gallery .rg-hero .rg-info{padding:20px}.olx-gallery .rg-hero h1{font-size:26px}.olx-gallery .rg-photos{padding:12px}.olx-gallery .rg-masonry{column-gap:10px}.olx-gallery .rg-photo{margin-bottom:10px}}
@media(prefers-reduced-motion:reduce){.olx-gallery *{transition:none!important}}
