/* Shared six-drawing child chooser (3x2: girls top row, boys bottom row;
   Toddler / Preschool / Big kid across). Imprint design: paper and ink,
   calm dark frame + slight lift when chosen, no checkmark badges. */

.hpd-child-grid-wrap {
  width: 100%;
  max-width: var(--hpd-child-max-width, 460px);
}

.hpd-child-grid-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 var(--hpd-child-gap, 10px);
  margin: 0 0 6px;
  text-align: center;
  font: 600 0.875rem/1.25 "Source Sans 3", system-ui, sans-serif;
  color: #4a433a;
}

.hpd-child-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--hpd-child-gap, 10px);
  width: 100%;
}

.hpd-child-grid .hpd-child-tile {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-weight: 400;
  flex-basis: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hpd-child-grid .hpd-child-tile:hover {
  background: transparent;
}

.hpd-child-grid .hpd-child-tile input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  pointer-events: none;
}

.hpd-child-face {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  background: #ffffff;
  border: 1px solid #d9d2c3;
  border-radius: 0;
  padding: 6%;
  box-sizing: border-box;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}

.hpd-child-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(1);
  pointer-events: none;
}

.hpd-child-grid .hpd-child-tile:hover:where(:not(:disabled)) .hpd-child-face {
  border-color: #8f8575;
}

/* Chosen: calm dark ink frame and slight lift. Never a checkmark badge. */
.hpd-child-grid .hpd-child-tile[aria-pressed="true"] .hpd-child-face,
.hpd-child-grid .hpd-child-tile:has(input:checked) .hpd-child-face,
.hpd-child-grid .hpd-child-tile input:checked ~ .hpd-child-face {
  border-color: #1f1b16;
  box-shadow: 0 0 0 2px #1f1b16, 0 10px 18px -14px rgba(31, 27, 22, 0.55);
  transform: translateY(-2px);
}

.hpd-child-grid .hpd-child-tile:focus-visible .hpd-child-face,
.hpd-child-grid .hpd-child-tile input:focus-visible ~ .hpd-child-face {
  outline: 2px solid #1f1b16;
  outline-offset: 3px;
}

.hpd-child-grid .hpd-child-tile:disabled {
  cursor: default;
}

@media (max-width: 480px) {
  .hpd-child-grid-cols {
    font-size: 0.8125rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hpd-child-face {
    transition: none;
  }
}
