.pvdc-interaction,
.pvdc-stage,
.pvdc-static,
.pvdc-static > .question-visual {
  width: 100%;
  min-width: 0;
}

.pvdc-stage {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.pvdc-static > .question-visual {
  margin: 0;
}

.pvdc-static .diagram-visual {
  display: block;
  width: 100%;
  height: auto;
}

.pvdc-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pvdc-slot-button {
  position: absolute;
  min-height: 48px;
  margin: 0;
  padding: 0;
  border: 3px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: transparent;
  pointer-events: auto;
}

.pvdc-slot-button span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.pvdc-slot-button:not(:disabled) { cursor: pointer; }
.pvdc-slot-button:not(:disabled):hover { background: rgba(20, 155, 215, 0.09); }
.pvdc-slot-button.is-selected { border-color: #6d5fd0; background: rgba(109, 95, 208, 0.16); }
.pvdc-slot-button.is-drag-over { border-color: #149bd7; background: rgba(20, 155, 215, 0.2); }
.pvdc-slot-button:focus-visible { outline: 4px solid rgba(20, 155, 215, 0.42); outline-offset: 3px; }

.pvdc-stage.has-drag-card .pvdc-static .digit-card--tray { opacity: 0; }

.pvdc-drag-card {
  position: absolute;
  z-index: 3;
  display: grid;
  min-width: 48px;
  min-height: 48px;
  place-items: center;
  border: 2px solid #173042;
  border-radius: 8px;
  background: #fff;
  color: #102131;
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  box-shadow: 0 4px 10px rgba(15, 33, 49, 0.14);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.pvdc-drag-card span {
  font-size: clamp(1.55rem, 3.2vw, 2.35rem);
  font-weight: 900;
  line-height: 1;
}

.pvdc-drag-card.is-dragging,
.pvdc-narrow-drag-card.is-dragging {
  z-index: 8;
  cursor: grabbing;
  pointer-events: none;
  box-shadow: 0 12px 24px rgba(15, 33, 49, 0.24);
  transition: none;
}

.pvdc-stage.is-dragging .pvdc-slot-button:not(:disabled) { background: rgba(20, 155, 215, 0.08); }

.pvdc-narrow { display: none; }

.pvdc-current-description {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 600px) {
  .pvdc-stage { display: none; }
  .pvdc-narrow { display: grid; gap: 10px; }
  .pvdc-narrow-current { margin: 0; text-align: center; font-weight: 800; }
  .pvdc-narrow-current strong { display: inline-grid; min-width: 48px; min-height: 48px; margin-left: 8px; place-items: center; border: 2px solid #173042; border-radius: 8px; background: #fff; font-size: 1.65rem; }
  .pvdc-narrow-drag-card { position: relative; z-index: 3; cursor: grab; touch-action: none; user-select: none; transition: transform 150ms ease, box-shadow 150ms ease; }
  .pvdc-narrow-list { display: grid; gap: 7px; }
  .pvdc-narrow-slot { min-height: 52px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 6px 12px; border: 2px solid #8da5b4; border-left-width: 8px; border-radius: 8px; background: #fff; color: #102131; text-align: left; }
  .pvdc-narrow-slot strong { min-width: 72px; text-align: right; }
  .pvdc-narrow-slot.is-selected { outline: 3px solid #6d5fd0; outline-offset: 1px; background: #f2f0ff; }
  .pvdc-narrow-slot.is-drag-over { outline: 3px solid #149bd7; outline-offset: 1px; background: #eaf7fc; }
  .pvdc-narrow-slot:disabled { opacity: 1; cursor: default; background: #f5f8fa; }
  .pvdc-narrow-slot.is-unavailable { color: #596873; background: #e9eef2; }
  .pvdc-tone--teal { border-left-color: #17877f; }
  .pvdc-tone--grey { border-left-color: #687986; }
  .pvdc-tone--peach { border-left-color: #cb7651; }
  .pvdc-tone--purple { border-left-color: #8154b7; }
  .pvdc-tone--blue { border-left-color: #1689bd; }
  .pvdc-tone--green { border-left-color: #2c9466; }
  .pvdc-tone--gold { border-left-color: #bd8610; }
  .pvdc-tone--red { border-left-color: #c94d58; }
}

@media (prefers-reduced-motion: reduce) {
  .pvdc-slot-button,
  .pvdc-narrow-slot { transition: none !important; }
}
