/* Pareamento com Sombras: figuras, sombras e encaixes (a lógica fica em scripts/features/shadow.js). */
body[data-design] .shadow-workspace {
  min-height: min(680px, calc(100vh - 260px));
}

body[data-design] .trainer:has(.shadow-workspace) {
  gap: clamp(10px, 1.8vh, 18px);
  align-content: center;
}

body[data-design] .trainer:has(.shadow-workspace) .prompt-zone {
  min-height: clamp(82px, 12vh, 118px);
  padding: clamp(12px, 2vw, 20px);
}

body[data-design] .trainer:has(.shadow-workspace) .prompt-zone.no-model #promptText {
  font-size: clamp(1.15rem, 2.1vw, 1.7rem);
}

body.training-fullscreen .shadow-workspace {
  width: min(100%, 1180px);
  min-height: calc(100vh - 150px);
}

@media (min-width: 721px) and (max-width: 1180px) {
  body[data-design] .shadow-workspace {
    min-height: min(720px, calc(100vh - 220px));
  }

  body[data-design] .shadow-slot,
  body[data-design] .shadow-card,
  body[data-design] .shadow-source-placeholder {
    border-radius: 16px;
  }
}

@media (max-width: 720px) {
  body[data-design] .shadow-slots,
  body[data-design] .shadow-source {
    gap: 10px;
  }

  body[data-design] .shadow-slot,
  body[data-design] .shadow-card,
  body[data-design] .shadow-source-placeholder {
    border-radius: 14px;
    padding: 8px;
  }
}

@media (max-width: 480px) {
  body[data-design] .shadow-workspace {
    gap: 16px;
  }
}

body[data-design] .shadow-stimulus,
body[data-design] .shadow-stimulus img {
  visibility: visible;
  opacity: 1;
}

body[data-design] .shadow-stimulus {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: clamp(16px, 2.1vw, 28px);
  box-sizing: border-box;
}

body[data-design] .shadow-stimulus img {
  display: block;
  width: min(78%, 170px);
  height: min(78%, 170px);
  max-width: 78%;
  max-height: 78%;
  object-fit: contain;
  object-position: center;
}

body[data-design] .shadow-stimulus.is-shadow {
  padding: clamp(18px, 2.4vw, 32px);
}

body[data-design] .shadow-stimulus.is-shadow img {
  width: min(74%, 160px);
  height: min(74%, 160px);
  max-width: 74%;
  max-height: 74%;
}

body[data-design] .shadow-stimulus.is-shadow.uses-filter-shadow img {
  -webkit-filter: grayscale(1) contrast(0.85);
  filter: grayscale(1) contrast(0.85);
  opacity: 0.42;
}

body[data-design] .shadow-stimulus.is-shadow.uses-original-shadow img {
  -webkit-filter: grayscale(1) contrast(0.85);
  filter: grayscale(1) contrast(0.85);
  opacity: 0.42;
}

body[data-design] .shadow-workspace {
  --shadow-card-size: clamp(142px, min(17vw, 21vh), 220px);
}

body[data-design] .shadow-slots,
body[data-design] .shadow-source {
  grid-auto-rows: var(--shadow-card-size);
  align-items: stretch;
}

body[data-design] .shadow-slot,
body[data-design] .shadow-card,
body[data-design] .shadow-source-placeholder {
  width: 100%;
  height: var(--shadow-card-size);
  min-height: var(--shadow-card-size);
  aspect-ratio: auto;
}

body[data-design] .shadow-card.is-placed {
  width: auto;
  height: auto;
  min-height: 0;
}

@media (max-width: 720px) {
  body[data-design] .shadow-workspace {
    --shadow-card-size: clamp(96px, 22vw, 140px);
  }
}
