/* /generator/ - trait remix UI. Reuses /pets/pets.css for the basic
   site shell (overview-card, pets-section, btn classes); this file
   only adds the canvas stage + slot rows. */

.gen-stage {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 18px;
  align-items: start;
}
@media (max-width: 720px) {
  .gen-stage { grid-template-columns: 1fr; }
}

.gen-canvas-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: linear-gradient(180deg, #f4f1ea 0%, #e9dec7 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 240px;
}
.gen-canvas-wrap canvas {
  width: 192px;
  height: 208px;
  image-rendering: pixelated;
  background: transparent;
}

.gen-meta { min-width: 0; }
.gen-meta .form-actions { margin-top: 14px; flex-wrap: wrap; }

/* Slot rows: each is a horizontally scrollable strip of all installed
   Petdex pets. We render the FULL frame (no cropping) so the user can
   see what they're picking; the actual band-cropping happens in the
   canvas compositor. */
.gen-slot { margin-top: 18px; }
.gen-slot-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.gen-slot-head h3 {
  font-family: 'EB Garamond', serif;
  margin: 0; font-size: 18px;
}
.gen-slot-head input[type=search] {
  flex: 1 1 auto;
  min-width: 200px;
}
.gen-tile-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 4px 10px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.gen-tile-row::-webkit-scrollbar { height: 8px; }
.gen-tile-row::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }

.gen-tile {
  flex: 0 0 auto;
  width: 80px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  cursor: pointer;
  text-align: center;
  scroll-snap-align: start;
  transition: border-color 0.12s ease;
}
.gen-tile:hover { border-color: var(--gold); }
.gen-tile.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(245,195,82,0.25);
}
/* Tile thumb container is just a clean cream square. The band thumb
   inside (rendered by _bandThumbHTML) is the cropped slice of that
   pet's spritesheet showing ONLY the relevant body part - no head row
   shows full pets etc. */
.gen-tile-thumb {
  width: 72px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #f4f1ea 0%, #e9dec7 100%);
  border-radius: 6px;
  margin: 0 auto 3px;
  overflow: hidden;
}
.gen-tile-thumb-head .gen-band-thumb { margin-top: 4px; }
.gen-tile-thumb-body .gen-band-thumb { /* center */ }
.gen-tile-thumb-legs .gen-band-thumb { margin-bottom: 4px; }
.gen-tile-name {
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--bone);
  letter-spacing: 0.02em;
}
