body.npl-rcap-open {
  overflow: hidden;
}

.npl-rcap {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.npl-rcap[hidden] {
  display: none !important;
}

.npl-rcap__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 30, 0.55);
}

.npl-rcap__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 14px;
  padding: 22px 20px 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}

.npl-rcap__close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: #7a7488;
  cursor: pointer;
}

.npl-rcap__title {
  margin: 0 28px 8px 0;
  font-size: 18px;
  color: #241d37;
}

.npl-rcap__prompt {
  margin: 0 0 14px;
  font-size: 15px;
  color: #3a3348;
}

.npl-rcap__board {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 12px;
  align-items: stretch;
}

.npl-rcap__tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.npl-rcap__tile {
  appearance: none;
  border: 1px solid #ddd7e6;
  border-radius: 10px;
  background: #f7f5fa;
  min-height: 56px;
  font-size: 26px;
  cursor: grab;
  color: #241d37;
}

.npl-rcap__tile:active,
.npl-rcap__tile_dragging {
  cursor: grabbing;
  opacity: 0.7;
}

.npl-rcap__tile_picked {
  outline: 2px solid #6b4eff;
  background: #efeaff;
}

.npl-rcap__drop {
  border: 2px dashed #b7afc8;
  border-radius: 12px;
  min-height: 128px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #faf9fc;
  padding: 8px;
  text-align: center;
}

.npl-rcap__drop_over {
  border-color: #6b4eff;
  background: #f3efff;
}

.npl-rcap__drop_filled {
  border-style: solid;
  border-color: #3a8f5c;
  background: #f1faf4;
}

.npl-rcap__drop_wrong {
  border-color: #c0392b;
  background: #fff5f4;
}

.npl-rcap__drop-label {
  font-size: 12px;
  color: #8a8499;
}

.npl-rcap__drop-slot {
  font-size: 34px;
  min-height: 40px;
  line-height: 1;
}

.npl-rcap__hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: #8a8499;
}

.npl-rcap__error {
  margin: 8px 0 0;
  color: #c0392b;
  font-size: 13px;
}

.npl-rcap__actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  justify-content: flex-end;
}

.npl-rcap__btn {
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
}

.npl-rcap__btn_ghost {
  background: #efeaf6;
  color: #3a3348;
}

.npl-rcap__btn_primary {
  background: #3a3348;
  color: #fff;
}

.npl-rcap__btn_primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .npl-rcap__board {
    grid-template-columns: 1fr;
  }

  .npl-rcap__drop {
    min-height: 88px;
  }
}
