/* Outer wrapper that preserves the chosen background ratio */
.pigs-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #000; /* canvas (can be overridden) */
}

/* Background image layer (optional) */
.pigs-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Grid layer that sits above the bg */
.pigs-grid {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-content: center;
  padding: 16px; /* fallback - will be overridden by JS */
  box-sizing: border-box;
}

/* Invisible spacer used to center the last row if it's not full */
.pigs-spacer {
  visibility: hidden;
}

/* Post-it tiles */
.pigs-tile {
  display: grid;
  place-items: center;
  background: #b22972;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
  padding: 8px;                 /* configurable */
  aspect-ratio: 1 / 1;          /* perfect square tiles */
  transform: rotate(-0.5deg);
}

.pigs-tile:nth-child(odd) {
  transform: rotate(0.7deg);
}

.pigs-tile p {
  margin: 0;
  text-align: center;
  /* serif-y, chunky look close to your mock */
  font-family: Georgia, "Times New Roman", Times, serif;
  font-weight: 800;
  /* Font size with responsive scaling */
  font-size: calc(var(--font-size, 16px) * var(--font-scale, 1.2));
  line-height: 1.15;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 0 rgba(0,0,0,.15);
  position: relative;
  z-index: 1;
}

.pigs-tile img {
  pointer-events: none;
}

/* Editor preview styles - clean preview without visual indicators */
.pigs-wrap-editor {
  /* Clean preview without borders or labels */
}

/* Ensure editor preview uses the same font sizing */
.pigs-wrap-editor .pigs-tile p {
  font-size: calc(var(--font-size, 16px) * var(--font-scale, 1.2));
}

/* Editor aid for older styles */
.pigs-wrap.is-editor .pigs-tile { 
  outline: 1px dashed rgba(255,255,255,.15); 
}

/* Audio control */
.pigs-audio-control {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.pigs-audio-control:hover {
  background: rgba(0, 0, 0, 0.6);
  transform: scale(1.05);
}

.pigs-audio-icon {
  color: #fff;
  flex-shrink: 0;
}

.pigs-audio-text {
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  user-select: none;
}

@media (max-width: 600px) {
  .pigs-audio-control {
    bottom: 10px;
    left: 10px;
    padding: 8px 12px;
  }
  
  .pigs-audio-text {
    font-size: 11px;
  }
}

