/* =========================================
   COLOURING — PAGE + COVER STYLES ONLY
   ========================================= */

/* Header */
.colouring-header {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin-bottom: 10px;
}

.colouring-header h1 {
  font-size: 14pt;
  margin: 0;
}

.info-btn {
  position: absolute;
  right: 10px;
  top: 0;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

/* Gallery grid (Instagram-style) */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 6px;
}

.tile {
  position: relative;
  background: #fff;
  border: 2px solid #000;
  cursor: pointer;
}

.tile {
  aspect-ratio: 3 / 4;   /* portrait-friendly thumbnail */
  overflow: hidden;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;     /* 👈 THIS is the zoom + crop */
  display: block;
}

.tile .heart {
  position: absolute;
  bottom: 4px;
  left: 4px;
  font-size: 16px;
}

/* Mobile */
@media (max-width: 600px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Info popup */
#infoModal {
  display: none;
}

#infoModal.show {
  display: flex;
}

/* =========================================
   COVER BUILDER
   ========================================= */
/* Center & contain cover canvas */
.canvas-area {
  display: flex;
  align-items: flex-start; /* 👈 top */
  justify-content: center;
  overflow: hidden;
  padding-top: 0;
}

.cover-canvas {
  background: #fff;
  border: 2px solid #000;
}

.cover-text {
  padding: 4px 6px;
  background: rgba(255,255,255,0.8);
}

.cover-sticker {
  user-select: none;
  touch-action: none;
}

.delete-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #c0c0c0;
  border: 2px solid #000;
  font-size: 10px;
  cursor: pointer;
}