:root{
  --bg: #0f0f10;
  --card: #151517;
  --text: #f2f2f3;
  --muted: #b9b9be;
  --radius: 18px;
  --gap: 12px;
}

*{ box-sizing: border-box; }
html, body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* Fixes common “doesn’t resize on mobile” issues */
img{ max-width: 100%; height: auto; }

.header{
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(15,15,16,0.72);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.brand{ padding: 14px 16px; }
.logo{
  font-weight: 600;
  letter-spacing: 0.2px;
  font-size: 15px;
  line-height: 1.2;
}
.sub{
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.wrap{
  padding: 14px 12px 22px;
  max-width: 980px;
  margin: 0 auto;
}

.gallery{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

/* On very small phones, switch to 1 column for better scaling */
@media (max-width: 360px){
  .gallery{ grid-template-columns: 1fr; }
  .tile.full{ grid-column: auto; }
}

.tile{
  display:block;
  background: var(--card);
  border-radius: var(--radius);
  overflow:hidden;
  border: 1px solid rgba(255,255,255,0.06);
  touch-action: manipulation;
}

.tile.full{ grid-column: 1 / -1; }

.tile img{
  width:100%;
  height:100%;
  display:block;
  object-fit: cover;
  aspect-ratio: 4 / 5;
}

/* Full-width statement tiles */
.tile.full img{ aspect-ratio: 16 / 10; }

.footer{
  padding: 18px 4px 0;
  color: var(--muted);
  font-size: 13px;
}
.hint{
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.9;
}

/* Viewer overlay */
.viewer{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display:none;
  align-items: center;
  justify-content: center;
  padding: 14px;
  z-index: 50;
}
.viewer.open{ display:flex; }
.viewer img{
  max-width: 100%;
  max-height: 100%;
  border-radius: 14px;
}
.close{
  position: fixed;
  top: 10px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(21,21,23,0.65);
  color: #fff;
  font-size: 28px;
  line-height: 40px;
  cursor: pointer;
}
