:root{--bg:#0a0a0f;--surface:#14161b;--accent:#7dd3fc;--text:#e2e8f0;--muted:#a0aec0;--border:#2d3748}
*{box-sizing:border-box}
html,body{height:100%;overflow-x:hidden}
body{margin:0;padding-bottom:32px;font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,sans-serif;background:var(--bg);color:var(--text);display:flex;flex-direction:column;align-items:stretch}
header{padding:20px 16px;text-align:center}
h1{margin:0;font-size:1.6rem}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(96px,1fr));gap:12px;width:100%;max-width:1100px;padding:0 8px;margin:0 auto}
.grid img{max-width:100%;height:auto}
.card{background:var(--surface);border:1px solid var(--border);border-radius:10px;overflow:hidden;padding:6px;display:flex;align-items:center;justify-content:center;cursor:pointer;aspect-ratio:1/1;min-height:0}
.card img{display:block;width:100%;height:100%;object-fit:cover;border-radius:6px}
.modal{position:fixed;inset:0;background:rgba(0,0,0,0.75);display:flex;align-items:center;justify-content:center;padding:18px}
.modal.hidden{display:none}
.modal img{max-width:100%;max-height:100%;border-radius:8px;border:4px solid rgba(255,255,255,0.03)}
footer{padding:18px;color:var(--muted)}


@media (max-width:600px){
  header{padding:18px 12px}
  h1{font-size:1.8rem}
  .grid{gap:10px}
  .card{border-radius:8px}
  .card img{border-radius:6px}
}

@media (max-width:420px){
  .grid{grid-template-columns:repeat(auto-fit,minmax(80px,1fr));gap:8px}
}

body.no-scroll{overflow:hidden;touch-action:none}
