*{box-sizing:border-box}
:root{
  --bg:#0b0b0d;--panel:#131318;--panel2:#181820;
  --text:#f4f4f6;--muted:#a8a8b3;--line:#282833;--accent:#f3f3f6
}
html{scroll-behavior:smooth}
body{
  margin:0;background:var(--bg);color:var(--text);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif
}
.topbar{
  position:sticky;top:0;z-index:20;
  display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:16px;
  padding:12px 18px;background:rgba(11,11,13,.94);
  backdrop-filter:blur(14px);border-bottom:1px solid var(--line)
}
.brand{font-size:24px;font-weight:800}
.tabs{display:flex;justify-content:center;gap:6px}
.tabs a{
  color:var(--muted);text-decoration:none;font-weight:700;
  padding:8px 12px;border-radius:999px;border:1px solid transparent
}
.tabs a.active{color:var(--text);background:var(--panel2);border-color:var(--line)}
.cta{
  text-decoration:none;font-weight:700;background:var(--accent);color:#0d0d10;
  padding:10px 14px;border-radius:999px;white-space:nowrap
}
main{width:min(1420px,calc(100% - 28px));margin:0 auto;padding:30px 0 80px}
.hero{
  display:flex;justify-content:space-between;align-items:end;gap:22px;
  margin-bottom:22px
}
.hero-copy{min-width:0}
.hero h1{font-size:clamp(34px,5vw,56px);margin:0 0 7px;letter-spacing:-.04em}
.hero p{margin:0;color:var(--muted);font-size:15px}
.pack-note{
  display:inline-flex;align-items:center;margin-top:11px;padding:7px 10px;
  border:1px solid var(--line);border-radius:999px;background:var(--panel);
  color:#d8d8df;font-size:13px
}
.pack-note strong{color:var(--text);margin-right:4px}
.searchbox{width:min(320px,100%)}
.searchbox input{
  width:100%;border:1px solid var(--line);background:var(--panel);
  color:var(--text);border-radius:12px;padding:11px 13px;font:inherit;outline:none
}
.searchbox input:focus{border-color:#555565}
.gallery-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px
}
.character-card{
  min-width:0;background:var(--panel);border:1px solid var(--line);
  border-radius:15px;padding:10px
}
.character-head{
  display:flex;justify-content:space-between;align-items:center;gap:10px;
  margin:0 2px 9px
}
.character-title{
  margin:0;font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
.character-count{font-size:11px;color:var(--muted);white-space:nowrap}
.preview-grid{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px
}
/* Animation packs normally have 2 samples. Keep the same 3-slot thumbnail size,
   but center the pair instead of leaving an empty slot on the right. */
.preview-grid.gif-two{display:flex;justify-content:center;gap:6px}
.preview-grid.gif-two .preview{flex:0 0 calc((100% - 12px)/3)}
.preview-grid.gif-one{display:flex;justify-content:center}
.preview-grid.gif-one .preview{flex:0 0 calc((100% - 12px)/3)}
.preview{
  position:relative;aspect-ratio:3/4;padding:0;border:0;border-radius:10px;
  overflow:hidden;background:#0d0d10;cursor:zoom-in
}
.preview img{
  width:100%;height:100%;display:block;object-fit:cover;opacity:0;
  transition:transform .16s ease,opacity .18s ease
}
.preview img.loaded{opacity:1}
.preview:hover img.loaded{transform:scale(1.025);opacity:.94}
.badge{
  position:absolute;right:5px;bottom:5px;background:rgba(0,0,0,.72);
  color:#fff;font-size:10px;font-weight:800;padding:4px 6px;border-radius:999px
}
.no-results{
  margin-top:24px;padding:22px;text-align:center;color:var(--muted);
  border:1px dashed var(--line);border-radius:14px
}
.lightbox{
  position:fixed;inset:0;z-index:100;display:none;align-items:center;justify-content:center;
  background:rgba(0,0,0,.94)
}
.lightbox.open{display:flex}
.lightbox-center{display:flex;flex-direction:column;align-items:center;gap:10px}
.lightbox-media{
  width:min(92vw,1100px);height:84vh;display:flex;align-items:center;justify-content:center
}
.lightbox-media img{max-width:100%;max-height:100%;object-fit:contain;user-select:none}
.media-loading{color:#c7c7d0;font-size:14px;padding:18px 22px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}
.media-loading.error{color:#ffb3b3}
.lightbox-caption{color:#ddd;font-size:14px}
.lightbox-close,.lightbox-arrow{
  position:absolute;border:0;background:rgba(20,20,24,.76);color:#fff;cursor:pointer
}
.lightbox-close{top:16px;right:16px;width:44px;height:44px;border-radius:50%;font-size:30px}
.lightbox-arrow{
  top:50%;transform:translateY(-50%);width:48px;height:64px;border-radius:14px;font-size:40px
}
.lightbox-arrow.prev{left:14px}.lightbox-arrow.next{right:14px}

@media(max-width:1050px){
  .gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:720px){
  .topbar{grid-template-columns:auto auto;padding:10px 12px}
  .brand{font-size:20px}.cta{font-size:13px;padding:9px 11px}
  .tabs{grid-column:1/-1;grid-row:2;justify-content:flex-start}
  main{width:min(100% - 20px,1420px);padding-top:24px}
  .hero{display:block}.searchbox{margin-top:16px;width:100%}
  .gallery-grid{grid-template-columns:1fr}
  .preview-grid{gap:6px}
  .lightbox-arrow{width:40px;height:54px;font-size:34px}
  .lightbox-arrow.prev{left:7px}.lightbox-arrow.next{right:7px}
}
