/* Matthew's picture site: big buttons, no words, easy to tap. */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: #fff6e0;           /* soft warm yellow */
  font-family: -apple-system, system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;    /* no "Save Image" pop-up on a long press */
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;     /* no accidental double-tap zoom */
}

/* ---------- picture grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 22px;
  padding: 22px;
}

.tile {
  display: block;
  aspect-ratio: 1 / 1;
  border: 0;
  padding: 0;
  border-radius: 26px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: transform 0.12s;
}

.tile:active { transform: scale(0.94); }

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* logos: show the whole thing on white */
.tile.contain img {
  object-fit: contain;
  padding: 14%;
}

/* Matthew's own pictures: the first and biggest button */
.tile.big {
  grid-column: span 2;
  grid-row: span 2;
  border: 8px solid #ffb300;
}

/* ---------- home button on other pages ---------- */

.home-button {
  position: sticky;
  top: 14px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  margin: 14px 0 0 22px;
  border-radius: 50%;
  background: #ffb300;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  font-size: 70px;
  text-decoration: none;
}

.home-button:active { transform: scale(0.92); }

/* ---------- full-screen picture viewer ---------- */

.viewer {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.viewer[hidden] { display: none; }

.viewer-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.viewer button {
  position: absolute;
  border: 0;
  border-radius: 50%;
  width: 110px;
  height: 110px;
  font-size: 54px;
  color: #000;
  background: rgba(255, 255, 255, 0.85);
  cursor: pointer;
}

.viewer button:active { transform: scale(0.92); }

.viewer .prev  { left: 18px;  top: 50%; margin-top: -55px; }
.viewer .next  { right: 18px; top: 50%; margin-top: -55px; }
.viewer .close { right: 18px; top: 18px; }
