/* Sequência Lógica: cartas, encaixes e tela cheia (lógica em scripts/features/sequences.js). */
body[data-design] .sequence-card {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

body[data-design] .sequence-card img {
  pointer-events: none;
}

.sequence-image {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: clamp(8px, 1.6vw, 18px);
  box-sizing: border-box;
}

body[data-design] .sequence-image img {
  object-position: center;
}

body[data-design] .sequence-card.is-dragging {
  opacity: 1;
  position: relative;
  z-index: 40;
  border-color: #2563eb;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.16), var(--shadow-soft);
  transition: none;
}

body.training-fullscreen .trainer:has(.sequence-workspace) {
  width: 100%;
  min-height: 100dvh;
  height: 100dvh;
  align-content: stretch;
  align-items: stretch;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(8px, 1.5vh, 16px);
  padding:
    calc(env(safe-area-inset-top, 0px) + clamp(12px, 2vh, 22px))
    calc(env(safe-area-inset-right, 0px) + clamp(10px, 2vw, 28px))
    calc(env(safe-area-inset-bottom, 0px) + clamp(10px, 2vh, 24px))
    calc(env(safe-area-inset-left, 0px) + clamp(10px, 2vw, 28px));
}

body.training-fullscreen .trainer:has(.sequence-workspace) .prompt-zone {
  width: 100%;
  max-width: none;
  min-height: clamp(84px, 16vh, 150px);
  padding: clamp(10px, 2vh, 22px);
}

body.training-fullscreen .sequence-workspace {
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  align-self: stretch;
  justify-self: stretch;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(10px, 2vh, 22px);
  padding: clamp(8px, 1.6vw, 18px);
  border-width: clamp(4px, 0.7vw, 8px);
  overflow: visible;
}

body.training-fullscreen .sequence-source,
body.training-fullscreen .sequence-slots {
  min-height: 0;
  height: 100%;
  align-items: stretch;
  justify-content: center;
  gap: clamp(8px, 1.5vw, 18px);
  padding: 0;
}

body.training-fullscreen .sequence-card,
body.training-fullscreen .sequence-slot {
  width: 100%;
  min-height: 0;
  height: auto;
  max-height: 100%;
  aspect-ratio: 4 / 3;
  align-self: center;
}

body.training-fullscreen .sequence-source .sequence-card {
  max-height: 100%;
}

body.training-fullscreen .sequence-slot .sequence-card {
  min-height: 100%;
}

body.training-fullscreen .sequence-image {
  padding: clamp(10px, min(2vw, 2vh), 22px);
}

body.training-fullscreen[data-sequence-prompt="hide"] .sequence-card,
body.training-fullscreen[data-sequence-prompt="hide"] .sequence-slot {
  aspect-ratio: 3 / 4;
}
