.modal-overlay {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--modal-viewport-offset-top, 0px);
  height: var(--modal-viewport-height, 100dvh);
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1100;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-overlay[hidden] {
  display: none;
}
body.modal-open {
  overflow: hidden;
}
.modal-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 18px;
  width: min(360px, 100%);
  max-height: calc(var(--modal-viewport-height, 100dvh) - 32px);
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35);
}
.modal-title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 800;
}
.modal-target {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  overflow-wrap: anywhere;
}
.modal-warn {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--danger);
}
.qty-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.qty-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 52px;
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  color: var(--text);
  background: #fff;
}
.qty-step {
  flex: 0 0 auto;
  width: 52px;
  min-height: 52px;
  font-size: 24px;
  font-weight: 800;
}
.qty-row > .qty-step {
  flex: 0 0 52px;
  width: 52px;
}
.qty-row > .qty-input {
  flex: 1 1 auto;
  width: auto;
}
.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.modal-actions .btn {
  flex: 1 1 0;
  width: auto;
}
.delete-scope {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.delete-scope-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  padding: 10px;
  background: #fff;
}
.delete-scope-option input {
  flex: 0 0 auto;
  margin-top: 3px;
}
.delete-scope-option span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.delete-scope-option strong {
  font-size: 14px;
}
.delete-scope-option small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
